@teambit/semantics.entities.semantic-schema 0.0.78 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-schema.d.ts +3 -3
- package/dist/api-schema.js +160 -115
- package/dist/api-schema.js.map +1 -1
- package/dist/export.d.ts +2 -2
- package/dist/export.js +27 -23
- package/dist/export.js.map +1 -1
- package/dist/index.js +134 -39
- package/dist/index.js.map +1 -1
- package/dist/schema-node-constructor.js +1 -1
- package/dist/schema-node-constructor.js.map +1 -1
- package/dist/schema-node.js +45 -40
- package/dist/schema-node.js.map +1 -1
- package/dist/schema-registry.js +36 -23
- package/dist/schema-registry.js.map +1 -1
- package/dist/schemas/array-literal-expression.js +43 -23
- package/dist/schemas/array-literal-expression.js.map +1 -1
- package/dist/schemas/class.d.ts +17 -17
- package/dist/schemas/class.js +116 -83
- package/dist/schemas/class.js.map +1 -1
- package/dist/schemas/conditional-type.js +58 -36
- package/dist/schemas/conditional-type.js.map +1 -1
- package/dist/schemas/constructor.js +46 -18
- package/dist/schemas/constructor.js.map +1 -1
- package/dist/schemas/decorator.d.ts +12 -12
- package/dist/schemas/decorator.js +64 -40
- package/dist/schemas/decorator.js.map +1 -1
- package/dist/schemas/docs/doc.d.ts +10 -10
- package/dist/schemas/docs/doc.js +66 -51
- package/dist/schemas/docs/doc.js.map +1 -1
- package/dist/schemas/docs/index.js +57 -10
- package/dist/schemas/docs/index.js.map +1 -1
- package/dist/schemas/docs/property-like-tag.d.ts +5 -5
- package/dist/schemas/docs/property-like-tag.js +51 -32
- package/dist/schemas/docs/property-like-tag.js.map +1 -1
- package/dist/schemas/docs/return-tag.d.ts +6 -6
- package/dist/schemas/docs/return-tag.js +47 -29
- package/dist/schemas/docs/return-tag.js.map +1 -1
- package/dist/schemas/docs/tag.d.ts +5 -5
- package/dist/schemas/docs/tag.js +68 -58
- package/dist/schemas/docs/tag.js.map +1 -1
- package/dist/schemas/enum-member.d.ts +11 -11
- package/dist/schemas/enum-member.js +59 -40
- package/dist/schemas/enum-member.js.map +1 -1
- package/dist/schemas/enum.d.ts +8 -8
- package/dist/schemas/enum.js +81 -52
- package/dist/schemas/enum.js.map +1 -1
- package/dist/schemas/export.d.ts +9 -9
- package/dist/schemas/export.js +84 -58
- package/dist/schemas/export.js.map +1 -1
- package/dist/schemas/expression-with-arguments.js +53 -31
- package/dist/schemas/expression-with-arguments.js.map +1 -1
- package/dist/schemas/function-like.d.ts +16 -16
- package/dist/schemas/function-like.js +136 -99
- package/dist/schemas/function-like.js.map +1 -1
- package/dist/schemas/get-accessor.js +67 -42
- package/dist/schemas/get-accessor.js.map +1 -1
- package/dist/schemas/ignored.d.ts +1 -1
- package/dist/schemas/ignored.js +49 -30
- package/dist/schemas/ignored.js.map +1 -1
- package/dist/schemas/index-signature.js +55 -28
- package/dist/schemas/index-signature.js.map +1 -1
- package/dist/schemas/index.js +620 -107
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/indexed-access-type.js +50 -30
- package/dist/schemas/indexed-access-type.js.map +1 -1
- package/dist/schemas/inference-type.d.ts +8 -8
- package/dist/schemas/inference-type.js +54 -38
- package/dist/schemas/inference-type.js.map +1 -1
- package/dist/schemas/interface.d.ts +11 -11
- package/dist/schemas/interface.js +100 -67
- package/dist/schemas/interface.js.map +1 -1
- package/dist/schemas/keyword-type.js +35 -22
- package/dist/schemas/keyword-type.js.map +1 -1
- package/dist/schemas/literal-type.js +35 -22
- package/dist/schemas/literal-type.js.map +1 -1
- package/dist/schemas/literal-value.js +36 -23
- package/dist/schemas/literal-value.js.map +1 -1
- package/dist/schemas/module.d.ts +1 -1
- package/dist/schemas/module.js +81 -57
- package/dist/schemas/module.js.map +1 -1
- package/dist/schemas/named-tuple.d.ts +3 -3
- package/dist/schemas/named-tuple.js +48 -28
- package/dist/schemas/named-tuple.js.map +1 -1
- package/dist/schemas/object-literal-expression.js +47 -30
- package/dist/schemas/object-literal-expression.js.map +1 -1
- package/dist/schemas/parameter.d.ts +5 -5
- package/dist/schemas/parameter.js +83 -61
- package/dist/schemas/parameter.js.map +1 -1
- package/dist/schemas/parenthesized-type.js +45 -26
- package/dist/schemas/parenthesized-type.js.map +1 -1
- package/dist/schemas/property-assignment.d.ts +10 -10
- package/dist/schemas/property-assignment.js +61 -34
- package/dist/schemas/property-assignment.js.map +1 -1
- package/dist/schemas/set-accessor.d.ts +2 -2
- package/dist/schemas/set-accessor.js +60 -35
- package/dist/schemas/set-accessor.js.map +1 -1
- package/dist/schemas/template-literal-type-span.js +48 -28
- package/dist/schemas/template-literal-type-span.js.map +1 -1
- package/dist/schemas/template-literal-type.js +47 -27
- package/dist/schemas/template-literal-type.js.map +1 -1
- package/dist/schemas/this-type.js +29 -19
- package/dist/schemas/this-type.js.map +1 -1
- package/dist/schemas/tuple-type.js +42 -23
- package/dist/schemas/tuple-type.js.map +1 -1
- package/dist/schemas/type-array.js +45 -26
- package/dist/schemas/type-array.js.map +1 -1
- package/dist/schemas/type-intersection.js +45 -26
- package/dist/schemas/type-intersection.js.map +1 -1
- package/dist/schemas/type-literal.js +56 -37
- package/dist/schemas/type-literal.js.map +1 -1
- package/dist/schemas/type-operator.js +48 -28
- package/dist/schemas/type-operator.js.map +1 -1
- package/dist/schemas/type-predicate.d.ts +1 -1
- package/dist/schemas/type-predicate.js +56 -36
- package/dist/schemas/type-predicate.js.map +1 -1
- package/dist/schemas/type-query.js +51 -31
- package/dist/schemas/type-query.js.map +1 -1
- package/dist/schemas/type-ref.d.ts +8 -8
- package/dist/schemas/type-ref.js +138 -101
- package/dist/schemas/type-ref.js.map +1 -1
- package/dist/schemas/type-union.js +50 -31
- package/dist/schemas/type-union.js.map +1 -1
- package/dist/schemas/type.js +74 -43
- package/dist/schemas/type.js.map +1 -1
- package/dist/schemas/unimplemented-schema.js +37 -24
- package/dist/schemas/unimplemented-schema.js.map +1 -1
- package/dist/schemas/unknown-schema.js +37 -24
- package/dist/schemas/unknown-schema.js.map +1 -1
- package/dist/schemas/unresolved-schema.js +32 -22
- package/dist/schemas/unresolved-schema.js.map +1 -1
- package/dist/schemas/variable-like.d.ts +11 -11
- package/dist/schemas/variable-like.js +84 -51
- package/dist/schemas/variable-like.js.map +1 -1
- package/dist/type.js +1 -1
- package/dist/type.js.map +1 -1
- package/dist/unknown-schema-factory.js +13 -7
- package/dist/unknown-schema-factory.js.map +1 -1
- package/package.json +4 -4
- package/types/asset.d.ts +15 -3
- package/dist/preview-1737084088495.js +0 -7
|
@@ -1,12 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DocSchema", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _doc().DocSchema;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PropertyLikeTagSchema", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _propertyLikeTag().PropertyLikeTagSchema;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ReturnTagSchema", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _returnTag().ReturnTagSchema;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "TagSchema", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _tag().TagSchema;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function _doc() {
|
|
31
|
+
const data = require("./doc");
|
|
32
|
+
_doc = function () {
|
|
33
|
+
return data;
|
|
34
|
+
};
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
function _tag() {
|
|
38
|
+
const data = require("./tag");
|
|
39
|
+
_tag = function () {
|
|
40
|
+
return data;
|
|
41
|
+
};
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
function _returnTag() {
|
|
45
|
+
const data = require("./return-tag");
|
|
46
|
+
_returnTag = function () {
|
|
47
|
+
return data;
|
|
48
|
+
};
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
function _propertyLikeTag() {
|
|
52
|
+
const data = require("./property-like-tag");
|
|
53
|
+
_propertyLikeTag = function () {
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
|
|
12
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_doc","data","require","_tag","_returnTag","_propertyLikeTag"],"sources":["index.ts"],"sourcesContent":["export { DocSchema } from './doc';\nexport { TagSchema } from './tag';\nexport { ReturnTagSchema } from './return-tag';\nexport { PropertyLikeTagSchema } from './property-like-tag';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -6,21 +6,21 @@ import { TagSchema } from './tag';
|
|
|
6
6
|
export declare class PropertyLikeTagSchema extends TagSchema {
|
|
7
7
|
readonly location: SchemaLocation;
|
|
8
8
|
readonly name: string;
|
|
9
|
-
readonly comment?: string;
|
|
9
|
+
readonly comment?: string | undefined;
|
|
10
10
|
readonly type?: SchemaNode;
|
|
11
|
-
constructor(location: SchemaLocation, name: string, comment?: string, type?: SchemaNode);
|
|
11
|
+
constructor(location: SchemaLocation, name: string, comment?: string | undefined, type?: SchemaNode);
|
|
12
12
|
toString(): string;
|
|
13
13
|
toFullSignature(options?: {
|
|
14
14
|
showDocs?: boolean;
|
|
15
15
|
}): string;
|
|
16
16
|
toObject(): {
|
|
17
17
|
name: string;
|
|
18
|
-
type: Record<string, any
|
|
18
|
+
type: Record<string, any> | undefined;
|
|
19
19
|
__schema: string;
|
|
20
20
|
location: SchemaLocation;
|
|
21
|
-
signature: string;
|
|
21
|
+
signature: string | undefined;
|
|
22
22
|
tagName: string;
|
|
23
|
-
comment: string;
|
|
23
|
+
comment: string | undefined;
|
|
24
24
|
};
|
|
25
25
|
static fromObject(obj: Record<string, any>): PropertyLikeTagSchema;
|
|
26
26
|
}
|
|
@@ -1,40 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.PropertyLikeTagSchema = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
7
|
+
function _schemaRegistry() {
|
|
8
|
+
const data = require("../../schema-registry");
|
|
9
|
+
_schemaRegistry = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _tag() {
|
|
15
|
+
const data = require("./tag");
|
|
16
|
+
_tag = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* e.g. `@param myParam {string} some comment`
|
|
8
23
|
*/
|
|
9
|
-
class PropertyLikeTagSchema extends
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
class PropertyLikeTagSchema extends _tag().TagSchema {
|
|
25
|
+
constructor(location, name, comment, type) {
|
|
26
|
+
super(location, _tag().TagName.parameter, comment);
|
|
27
|
+
this.location = location;
|
|
28
|
+
this.name = name;
|
|
29
|
+
this.comment = comment;
|
|
30
|
+
this.type = type;
|
|
31
|
+
}
|
|
32
|
+
toString() {
|
|
33
|
+
const comment = this.comment ? ` ${this.comment}` : '';
|
|
34
|
+
const type = this.type ? ` {${this.type.toString()}} ` : '';
|
|
35
|
+
return `@${this.tagName} ${this.name}${type} ${comment}`;
|
|
36
|
+
}
|
|
37
|
+
toFullSignature(options) {
|
|
38
|
+
const typeStr = this.type ? ` {${this.type.toFullSignature(options)}} ` : '';
|
|
39
|
+
const comment = this.comment ? ` ${this.comment}` : '';
|
|
40
|
+
return `@${this.tagName} ${this.name}${typeStr}${comment}`;
|
|
41
|
+
}
|
|
42
|
+
toObject() {
|
|
43
|
+
return {
|
|
44
|
+
...super.toObject(),
|
|
45
|
+
name: this.name,
|
|
46
|
+
type: this.type?.toObject()
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static fromObject(obj) {
|
|
50
|
+
const location = obj.location;
|
|
51
|
+
const name = obj.name;
|
|
52
|
+
const comment = obj.comment;
|
|
53
|
+
const type = obj.type ? _schemaRegistry().SchemaRegistry.fromObject(obj.type) : undefined;
|
|
54
|
+
return new PropertyLikeTagSchema(location, name, comment, type);
|
|
55
|
+
}
|
|
38
56
|
}
|
|
39
57
|
exports.PropertyLikeTagSchema = PropertyLikeTagSchema;
|
|
58
|
+
|
|
40
59
|
//# sourceMappingURL=property-like-tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaRegistry","data","require","_tag","PropertyLikeTagSchema","TagSchema","constructor","location","name","comment","type","TagName","parameter","toString","tagName","toFullSignature","options","typeStr","toObject","fromObject","obj","SchemaRegistry","undefined","exports"],"sources":["property-like-tag.ts"],"sourcesContent":["import { SchemaLocation, SchemaNode } from '../../schema-node';\nimport { SchemaRegistry } from '../../schema-registry';\nimport { TagName, TagSchema } from './tag';\n\n/**\n * e.g. `@param myParam {string} some comment`\n */\nexport class PropertyLikeTagSchema extends TagSchema {\n readonly type?: SchemaNode;\n constructor(\n readonly location: SchemaLocation,\n readonly name: string,\n readonly comment?: string,\n type?: SchemaNode\n ) {\n super(location, TagName.parameter, comment);\n this.type = type;\n }\n\n toString() {\n const comment = this.comment ? ` ${this.comment}` : '';\n const type = this.type ? ` {${this.type.toString()}} ` : '';\n return `@${this.tagName} ${this.name}${type} ${comment}`;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n const typeStr = this.type ? ` {${this.type.toFullSignature(options)}} ` : '';\n const comment = this.comment ? ` ${this.comment}` : '';\n return `@${this.tagName} ${this.name}${typeStr}${comment}`;\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n type: this.type?.toObject(),\n };\n }\n\n static fromObject(obj: Record<string, any>): PropertyLikeTagSchema {\n const location = obj.location;\n const name = obj.name;\n const comment = obj.comment;\n const type = obj.type ? SchemaRegistry.fromObject(obj.type) : undefined;\n return new PropertyLikeTagSchema(location, name, comment, type);\n }\n}\n"],"mappings":";;;;;;AACA,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ACN,IAAI,GAAGS,OAAO,GAAGR,OAAO,EAAE;EAC5D;EAEAS,QAAQA,CAAA,EAAG;IACT,OAAO;MACL,GAAG,KAAK,CAACA,QAAQ,CAAC,CAAC;MACnBV,IAAI,EAAE,IAAI,CAACA,IAAI;MACfE,IAAI,EAAE,IAAI,CAACA,IAAI,EAAEQ,QAAQ,CAAC;IAC5B,CAAC;EACH;EAEA,OAAOC,UAAUA,CAACC,GAAwB,EAAyB;IACjE,MAAMb,QAAQ,GAAGa,GAAG,CAACb,QAAQ;IAC7B,MAAMC,IAAI,GAAGY,GAAG,CAACZ,IAAI;IACrB,MAAMC,OAAO,GAAGW,GAAG,CAACX,OAAO;IAC3B,MAAMC,IAAI,GAAGU,GAAG,CAACV,IAAI,GAAGW,gCAAc,CAACF,UAAU,CAACC,GAAG,CAACV,IAAI,CAAC,GAAGY,SAAS;IACvE,OAAO,IAAIlB,qBAAqB,CAACG,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,IAAI,CAAC;EACjE;AACF;AAACa,OAAA,CAAAnB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -5,21 +5,21 @@ import { TagSchema } from './tag';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class ReturnTagSchema extends TagSchema {
|
|
7
7
|
readonly location: SchemaLocation;
|
|
8
|
-
readonly comment?: string;
|
|
8
|
+
readonly comment?: string | undefined;
|
|
9
9
|
readonly type?: SchemaNode;
|
|
10
|
-
constructor(location: SchemaLocation, comment?: string, type?: SchemaNode);
|
|
10
|
+
constructor(location: SchemaLocation, comment?: string | undefined, type?: SchemaNode);
|
|
11
11
|
toString(): string;
|
|
12
12
|
toFullSignature(options?: {
|
|
13
13
|
showDocs?: boolean;
|
|
14
14
|
}): string;
|
|
15
15
|
toObject(): {
|
|
16
|
-
type: Record<string, any
|
|
16
|
+
type: Record<string, any> | undefined;
|
|
17
17
|
__schema: string;
|
|
18
18
|
location: SchemaLocation;
|
|
19
|
-
name: string;
|
|
20
|
-
signature: string;
|
|
19
|
+
name: string | undefined;
|
|
20
|
+
signature: string | undefined;
|
|
21
21
|
tagName: string;
|
|
22
|
-
comment: string;
|
|
22
|
+
comment: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
static fromObject(obj: Record<string, any>): ReturnTagSchema;
|
|
25
25
|
}
|
|
@@ -1,37 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.ReturnTagSchema = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
7
|
+
function _schemaRegistry() {
|
|
8
|
+
const data = require("../../schema-registry");
|
|
9
|
+
_schemaRegistry = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _tag() {
|
|
15
|
+
const data = require("./tag");
|
|
16
|
+
_tag = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* e.g. `@return {string} some comment`
|
|
8
23
|
*/
|
|
9
|
-
class ReturnTagSchema extends
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
class ReturnTagSchema extends _tag().TagSchema {
|
|
25
|
+
constructor(location, comment, type) {
|
|
26
|
+
super(location, _tag().TagName.return, comment);
|
|
27
|
+
this.location = location;
|
|
28
|
+
this.comment = comment;
|
|
29
|
+
this.type = type;
|
|
30
|
+
}
|
|
31
|
+
toString() {
|
|
32
|
+
const comment = this.comment ? ` ${this.comment}` : '';
|
|
33
|
+
return `@${this.tagName}${comment}`;
|
|
34
|
+
}
|
|
35
|
+
toFullSignature(options) {
|
|
36
|
+
const typeStr = this.type ? ` {${this.type.toFullSignature(options)}}` : '';
|
|
37
|
+
const comment = this.comment ? ` ${this.comment}` : '';
|
|
38
|
+
return `@${this.tagName}${typeStr}${comment}`;
|
|
39
|
+
}
|
|
40
|
+
toObject() {
|
|
41
|
+
return {
|
|
42
|
+
...super.toObject(),
|
|
43
|
+
type: this.type?.toObject()
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
static fromObject(obj) {
|
|
47
|
+
const location = obj.location;
|
|
48
|
+
const comment = obj.comment;
|
|
49
|
+
const type = obj.type ? _schemaRegistry().SchemaRegistry.fromObject(obj.type) : undefined;
|
|
50
|
+
return new ReturnTagSchema(location, comment, type);
|
|
51
|
+
}
|
|
35
52
|
}
|
|
36
53
|
exports.ReturnTagSchema = ReturnTagSchema;
|
|
54
|
+
|
|
37
55
|
//# sourceMappingURL=return-tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaRegistry","data","require","_tag","ReturnTagSchema","TagSchema","constructor","location","comment","type","TagName","return","toString","tagName","toFullSignature","options","typeStr","toObject","fromObject","obj","SchemaRegistry","undefined","exports"],"sources":["return-tag.ts"],"sourcesContent":["import { SchemaLocation, SchemaNode } from '../../schema-node';\nimport { SchemaRegistry } from '../../schema-registry';\nimport { TagName, TagSchema } from './tag';\n\n/**\n * e.g. `@return {string} some comment`\n */\nexport class ReturnTagSchema extends TagSchema {\n readonly type?: SchemaNode;\n\n constructor(\n readonly location: SchemaLocation,\n readonly comment?: string,\n type?: SchemaNode\n ) {\n super(location, TagName.return, comment);\n this.type = type;\n }\n\n toString() {\n const comment = this.comment ? ` ${this.comment}` : '';\n return `@${this.tagName}${comment}`;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n const typeStr = this.type ? ` {${this.type.toFullSignature(options)}}` : '';\n const comment = this.comment ? ` ${this.comment}` : '';\n return `@${this.tagName}${typeStr}${comment}`;\n }\n\n toObject() {\n return {\n ...super.toObject(),\n type: this.type?.toObject(),\n };\n }\n\n static fromObject(obj: Record<string, any>): ReturnTagSchema {\n const location = obj.location;\n const comment = obj.comment;\n const type = obj.type ? SchemaRegistry.fromObject(obj.type) : undefined;\n return new ReturnTagSchema(location, comment, type);\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACO,MAAMG,eAAe,SAASC,gBAAS,CAAC;EAG7CC,WAAWA,CACAC,QAAwB,EACxBC,OAAgB,EACzBC,IAAiB,EACjB;IACA,KAAK,CAACF,QAAQ,EAAEG,cAAO,CAACC,MAAM,EAAEH,OAAO,CAAC;IAAC,KAJhCD,QAAwB,GAAxBA,QAAwB;IAAA,KACxBC,OAAgB,GAAhBA,OAAgB;IAIzB,IAAI,CAACC,IAAI,GAAGA,IAAI;EAClB;EAEAG,QAAQA,CAAA,EAAG;IACT,MAAMJ,OAAO,GAAG,IAAI,CAACA,OAAO,GAAG,IAAI,IAAI,CAACA,OAAO,EAAE,GAAG,EAAE;IACtD,OAAO,IAAI,IAAI,CAACK,OAAO,GAAGL,OAAO,EAAE;EACrC;EAEAM,eAAeA,CAACC,OAAgC,EAAU;IACxD,MAAMC,OAAO,GAAG,IAAI,CAACP,IAAI,GAAG,KAAK,IAAI,CAACA,IAAI,CAACK,eAAe,CAACC,OAAO,CAAC,GAAG,GAAG,EAAE;IAC3E,MAAMP,OAAO,GAAG,IAAI,CAACA,OAAO,GAAG,IAAI,IAAI,CAACA,OAAO,EAAE,GAAG,EAAE;IACtD,OAAO,IAAI,IAAI,CAACK,OAAO,GAAGG,OAAO,GAAGR,OAAO,EAAE;EAC/C;EAEAS,QAAQA,CAAA,EAAG;IACT,OAAO;MACL,GAAG,KAAK,CAACA,QAAQ,CAAC,CAAC;MACnBR,IAAI,EAAE,IAAI,CAACA,IAAI,EAAEQ,QAAQ,CAAC;IAC5B,CAAC;EACH;EAEA,OAAOC,UAAUA,CAACC,GAAwB,EAAmB;IAC3D,MAAMZ,QAAQ,GAAGY,GAAG,CAACZ,QAAQ;IAC7B,MAAMC,OAAO,GAAGW,GAAG,CAACX,OAAO;IAC3B,MAAMC,IAAI,GAAGU,GAAG,CAACV,IAAI,GAAGW,gCAAc,CAACF,UAAU,CAACC,GAAG,CAACV,IAAI,CAAC,GAAGY,SAAS;IACvE,OAAO,IAAIjB,eAAe,CAACG,QAAQ,EAAEC,OAAO,EAAEC,IAAI,CAAC;EACrD;AACF;AAACa,OAAA,CAAAlB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -5,18 +5,18 @@ import { SchemaLocation, SchemaNode } from '../../schema-node';
|
|
|
5
5
|
export declare class TagSchema extends SchemaNode {
|
|
6
6
|
readonly location: SchemaLocation;
|
|
7
7
|
readonly tagName: TagName | string;
|
|
8
|
-
readonly comment?: string;
|
|
9
|
-
constructor(location: SchemaLocation, tagName: TagName | string, comment?: string);
|
|
8
|
+
readonly comment?: string | undefined;
|
|
9
|
+
constructor(location: SchemaLocation, tagName: TagName | string, comment?: string | undefined);
|
|
10
10
|
toString(): string;
|
|
11
11
|
toFullSignature(): string;
|
|
12
12
|
static fromObject(obj: Record<string, any>): TagSchema;
|
|
13
13
|
toObject(): {
|
|
14
14
|
__schema: string;
|
|
15
15
|
location: SchemaLocation;
|
|
16
|
-
name: string;
|
|
17
|
-
signature: string;
|
|
16
|
+
name: string | undefined;
|
|
17
|
+
signature: string | undefined;
|
|
18
18
|
tagName: string;
|
|
19
|
-
comment: string;
|
|
19
|
+
comment: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export declare enum TagName {
|
package/dist/schemas/docs/tag.js
CHANGED
|
@@ -1,65 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TagSchema = exports.TagName = void 0;
|
|
7
|
+
function _schemaNode() {
|
|
8
|
+
const data = require("../../schema-node");
|
|
9
|
+
_schemaNode = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
5
14
|
/**
|
|
6
15
|
* e.g. `@deprecated please use something else`
|
|
7
16
|
*/
|
|
8
|
-
class TagSchema extends
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
class TagSchema extends _schemaNode().SchemaNode {
|
|
18
|
+
constructor(location, tagName, comment) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
21
|
+
this.tagName = tagName;
|
|
22
|
+
this.comment = comment;
|
|
23
|
+
}
|
|
24
|
+
toString() {
|
|
25
|
+
const comment = this.comment ? ` ${this.comment}` : '';
|
|
26
|
+
return `@${this.tagName}${comment}`;
|
|
27
|
+
}
|
|
28
|
+
toFullSignature() {
|
|
29
|
+
return this.toString();
|
|
30
|
+
}
|
|
31
|
+
static fromObject(obj) {
|
|
32
|
+
const location = obj.location;
|
|
33
|
+
const tagName = obj.tagName;
|
|
34
|
+
const comment = obj.comment;
|
|
35
|
+
return new TagSchema(location, tagName, comment);
|
|
36
|
+
}
|
|
37
|
+
toObject() {
|
|
38
|
+
return {
|
|
39
|
+
__schema: this.__schema,
|
|
40
|
+
location: this.location,
|
|
41
|
+
name: this.name,
|
|
42
|
+
signature: this.signature,
|
|
43
|
+
tagName: this.tagName,
|
|
44
|
+
comment: this.comment
|
|
45
|
+
};
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
exports.TagSchema = TagSchema;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
49
|
+
let TagName = exports.TagName = /*#__PURE__*/function (TagName) {
|
|
50
|
+
TagName["augments"] = "augments";
|
|
51
|
+
TagName["author"] = "author";
|
|
52
|
+
TagName["class"] = "class";
|
|
53
|
+
TagName["callback"] = "callback";
|
|
54
|
+
TagName["public"] = "public";
|
|
55
|
+
TagName["private"] = "private";
|
|
56
|
+
TagName["protected"] = "protected";
|
|
57
|
+
TagName["readonly"] = "readonly";
|
|
58
|
+
TagName["override"] = "override";
|
|
59
|
+
TagName["see"] = "see";
|
|
60
|
+
TagName["enum"] = "enum";
|
|
61
|
+
TagName["parameter"] = "parameter";
|
|
62
|
+
TagName["this"] = "this";
|
|
63
|
+
TagName["type"] = "type";
|
|
64
|
+
TagName["template"] = "template";
|
|
65
|
+
TagName["typedef"] = "typedef";
|
|
66
|
+
TagName["property"] = "property";
|
|
67
|
+
TagName["implements"] = "implements";
|
|
68
|
+
TagName["return"] = "return";
|
|
69
|
+
TagName["deprecated"] = "deprecated";
|
|
70
|
+
TagName["exports"] = "exports";
|
|
71
|
+
TagName["link"] = "link";
|
|
72
|
+
return TagName;
|
|
73
|
+
}({});
|
|
74
|
+
|
|
65
75
|
//# sourceMappingURL=tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaNode","data","require","TagSchema","SchemaNode","constructor","location","tagName","comment","toString","toFullSignature","fromObject","obj","toObject","__schema","name","signature","exports","TagName"],"sources":["tag.ts"],"sourcesContent":["import { SchemaLocation, SchemaNode } from '../../schema-node';\n\n/**\n * e.g. `@deprecated please use something else`\n */\nexport class TagSchema extends SchemaNode {\n constructor(\n readonly location: SchemaLocation,\n readonly tagName: TagName | string,\n readonly comment?: string\n ) {\n super();\n }\n\n toString() {\n const comment = this.comment ? ` ${this.comment}` : '';\n return `@${this.tagName}${comment}`;\n }\n\n toFullSignature(): string {\n return this.toString();\n }\n\n static fromObject(obj: Record<string, any>): TagSchema {\n const location = obj.location;\n const tagName = obj.tagName;\n const comment = obj.comment;\n return new TagSchema(location, tagName, comment);\n }\n\n toObject() {\n return {\n __schema: this.__schema,\n location: this.location,\n name: this.name,\n signature: this.signature,\n tagName: this.tagName,\n comment: this.comment,\n };\n }\n}\n\nexport enum TagName {\n augments = 'augments',\n author = 'author',\n class = 'class',\n callback = 'callback',\n public = 'public',\n private = 'private',\n protected = 'protected',\n readonly = 'readonly',\n override = 'override',\n see = 'see',\n enum = 'enum',\n parameter = 'parameter',\n this = 'this',\n type = 'type',\n template = 'template',\n typedef = 'typedef',\n property = 'property',\n implements = 'implements',\n return = 'return',\n deprecated = 'deprecated',\n exports = 'exports',\n link = 'link',\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OA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AO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAA,OAAPA,OAAO;AAAA","ignoreList":[]}
|
|
@@ -4,9 +4,9 @@ export declare class EnumMemberSchema extends SchemaNode {
|
|
|
4
4
|
readonly location: SchemaLocation;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly signature: string;
|
|
7
|
-
readonly value?: string;
|
|
7
|
+
readonly value?: string | undefined;
|
|
8
8
|
readonly doc?: DocSchema;
|
|
9
|
-
constructor(location: SchemaLocation, name: string, signature: string, value?: string, doc?: DocSchema);
|
|
9
|
+
constructor(location: SchemaLocation, name: string, signature: string, value?: string | undefined, doc?: DocSchema);
|
|
10
10
|
toString(): string;
|
|
11
11
|
toFullSignature(options?: {
|
|
12
12
|
showDocs?: boolean;
|
|
@@ -14,23 +14,23 @@ export declare class EnumMemberSchema extends SchemaNode {
|
|
|
14
14
|
toObject(): {
|
|
15
15
|
name: string;
|
|
16
16
|
signature: string;
|
|
17
|
-
value: string;
|
|
17
|
+
value: string | undefined;
|
|
18
18
|
doc: {
|
|
19
19
|
__schema: string;
|
|
20
|
-
name: string;
|
|
20
|
+
name: string | undefined;
|
|
21
21
|
location: SchemaLocation;
|
|
22
|
-
signature: string;
|
|
22
|
+
signature: string | undefined;
|
|
23
23
|
raw: string;
|
|
24
|
-
comment: string;
|
|
24
|
+
comment: string | undefined;
|
|
25
25
|
tags: {
|
|
26
26
|
__schema: string;
|
|
27
27
|
location: SchemaLocation;
|
|
28
|
-
name: string;
|
|
29
|
-
signature: string;
|
|
28
|
+
name: string | undefined;
|
|
29
|
+
signature: string | undefined;
|
|
30
30
|
tagName: string;
|
|
31
|
-
comment: string;
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
31
|
+
comment: string | undefined;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
} | undefined;
|
|
34
34
|
};
|
|
35
35
|
static fromObject(obj: Record<string, any>): EnumMemberSchema;
|
|
36
36
|
}
|