main
Last change
on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import stampit from 'stampit';
|
---|
2 | import { NotImplementedError } from '@swagger-api/apidom-error';
|
---|
3 | const Parser = stampit({
|
---|
4 | props: {
|
---|
5 | name: '',
|
---|
6 | /**
|
---|
7 | * Whether to allow "empty" files. This includes zero-byte files.
|
---|
8 | */
|
---|
9 | allowEmpty: true,
|
---|
10 | /**
|
---|
11 | * Whether to generate source map during parsing.
|
---|
12 | */
|
---|
13 | sourceMap: false,
|
---|
14 | /**
|
---|
15 | * List of supported file extensions.
|
---|
16 | */
|
---|
17 | fileExtensions: [],
|
---|
18 | /**
|
---|
19 | * List of supported media types.
|
---|
20 | */
|
---|
21 | mediaTypes: []
|
---|
22 | },
|
---|
23 | init({
|
---|
24 | allowEmpty = this.allowEmpty,
|
---|
25 | sourceMap = this.sourceMap,
|
---|
26 | fileExtensions = this.fileExtensions,
|
---|
27 | mediaTypes = this.mediaTypes
|
---|
28 | } = {}) {
|
---|
29 | this.allowEmpty = allowEmpty;
|
---|
30 | this.sourceMap = sourceMap;
|
---|
31 | this.fileExtensions = fileExtensions;
|
---|
32 | this.mediaTypes = mediaTypes;
|
---|
33 | },
|
---|
34 | methods: {
|
---|
35 | async canParse() {
|
---|
36 | throw new NotImplementedError('canParse method in Parser stamp is not yet implemented.');
|
---|
37 | },
|
---|
38 | async parse() {
|
---|
39 | throw new NotImplementedError('parse method in Parser stamp is not yet implemented.');
|
---|
40 | }
|
---|
41 | }
|
---|
42 | });
|
---|
43 | export default Parser; |
---|
Note:
See
TracBrowser
for help on using the repository browser.