@teambit/semantics.entities.semantic-schema 0.0.8 → 0.0.9
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/index.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/constructor.d.ts +12 -4
- package/dist/schemas/constructor.js +5 -5
- package/dist/schemas/constructor.js.map +1 -1
- package/dist/schemas/function.d.ts +10 -16
- package/dist/schemas/function.js +6 -3
- package/dist/schemas/function.js.map +1 -1
- package/dist/schemas/get-accessor.d.ts +2 -6
- package/dist/schemas/get-accessor.js.map +1 -1
- package/dist/schemas/index-signature.d.ts +5 -9
- package/dist/schemas/index-signature.js +5 -5
- package/dist/schemas/index-signature.js.map +1 -1
- package/dist/schemas/index.d.ts +9 -1
- package/dist/schemas/index.js +17 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/inference-type.d.ts +13 -0
- package/dist/schemas/inference-type.js +22 -0
- package/dist/schemas/inference-type.js.map +1 -0
- package/dist/schemas/keyword-type.d.ts +13 -0
- package/dist/schemas/keyword-type.js +22 -0
- package/dist/schemas/keyword-type.js.map +1 -0
- package/dist/schemas/literal-type.d.ts +13 -0
- package/dist/schemas/literal-type.js +22 -0
- package/dist/schemas/literal-type.js.map +1 -0
- package/dist/schemas/parameter.d.ts +18 -0
- package/dist/schemas/parameter.js +25 -0
- package/dist/schemas/parameter.js.map +1 -0
- package/dist/schemas/set-accessor.d.ts +3 -3
- package/dist/schemas/set-accessor.js +1 -1
- package/dist/schemas/set-accessor.js.map +1 -1
- package/dist/schemas/tuple-type.d.ts +12 -0
- package/dist/schemas/tuple-type.js +19 -0
- package/dist/schemas/tuple-type.js.map +1 -0
- package/dist/schemas/type-array.d.ts +12 -0
- package/dist/schemas/type-array.js +19 -0
- package/dist/schemas/type-array.js.map +1 -0
- package/dist/schemas/type-operator.d.ts +14 -0
- package/dist/schemas/type-operator.js +21 -0
- package/dist/schemas/type-operator.js.map +1 -0
- package/dist/schemas/type-query.d.ts +16 -0
- package/dist/schemas/type-query.js +27 -0
- package/dist/schemas/type-query.js.map +1 -0
- package/dist/schemas/type-ref.d.ts +5 -3
- package/dist/schemas/type-ref.js +8 -3
- package/dist/schemas/type-ref.js.map +1 -1
- package/dist/schemas/variable.d.ts +2 -6
- package/dist/schemas/variable.js.map +1 -1
- package/index.ts +9 -1
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.9.tgz +0 -0
- package/package.json +2 -2
- package/{preview-1652239597845.js → preview-1652498684867.js} +1 -1
- package/schemas/constructor.ts +5 -5
- package/schemas/function.ts +10 -12
- package/schemas/get-accessor.ts +1 -2
- package/schemas/index-signature.ts +5 -6
- package/schemas/index.ts +9 -1
- package/schemas/inference-type.ts +19 -0
- package/schemas/keyword-type.ts +19 -0
- package/schemas/literal-type.ts +19 -0
- package/schemas/parameter.ts +23 -0
- package/schemas/set-accessor.ts +3 -3
- package/schemas/tuple-type.ts +14 -0
- package/schemas/type-array.ts +14 -0
- package/schemas/type-operator.ts +15 -0
- package/schemas/type-query.ts +23 -0
- package/schemas/type-ref.ts +9 -6
- package/schemas/variable.ts +1 -2
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.8.tgz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { APISchema } from './api-schema';
|
|
2
2
|
export type { SchemaNode } from './schema-node';
|
|
3
|
-
export { Export, Module, StaticProperties, FunctionSchema,
|
|
3
|
+
export { Export, Module, StaticProperties, FunctionSchema, Modifier, TypeRefSchema, VariableSchema, ClassSchema, ConstructorSchema, TypeSchema, TypeIntersectionSchema, TypeUnionSchema, TypeLiteralSchema, IndexSignatureSchema, InterfaceSchema, GetAccessorSchema, SetAccessorSchema, TypeQuerySchema, InferenceTypeSchema, LiteralTypeSchema, KeywordTypeSchema, TypeArraySchema, TypeOperatorSchema, TupleTypeSchema, ParameterSchema, } from './schemas';
|
|
4
4
|
export type { JSONSchema, JSONSchemaObject } from './json-schema';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableSchema = exports.TypeRefSchema = exports.FunctionSchema = exports.Module = exports.Export = exports.APISchema = void 0;
|
|
3
|
+
exports.ParameterSchema = exports.TupleTypeSchema = exports.TypeOperatorSchema = exports.TypeArraySchema = exports.KeywordTypeSchema = exports.LiteralTypeSchema = exports.InferenceTypeSchema = exports.TypeQuerySchema = exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableSchema = exports.TypeRefSchema = exports.FunctionSchema = exports.Module = exports.Export = exports.APISchema = void 0;
|
|
4
4
|
var api_schema_1 = require("./api-schema");
|
|
5
5
|
Object.defineProperty(exports, "APISchema", { enumerable: true, get: function () { return api_schema_1.APISchema; } });
|
|
6
6
|
var schemas_1 = require("./schemas");
|
|
@@ -19,4 +19,12 @@ Object.defineProperty(exports, "IndexSignatureSchema", { enumerable: true, get:
|
|
|
19
19
|
Object.defineProperty(exports, "InterfaceSchema", { enumerable: true, get: function () { return schemas_1.InterfaceSchema; } });
|
|
20
20
|
Object.defineProperty(exports, "GetAccessorSchema", { enumerable: true, get: function () { return schemas_1.GetAccessorSchema; } });
|
|
21
21
|
Object.defineProperty(exports, "SetAccessorSchema", { enumerable: true, get: function () { return schemas_1.SetAccessorSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "TypeQuerySchema", { enumerable: true, get: function () { return schemas_1.TypeQuerySchema; } });
|
|
23
|
+
Object.defineProperty(exports, "InferenceTypeSchema", { enumerable: true, get: function () { return schemas_1.InferenceTypeSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "LiteralTypeSchema", { enumerable: true, get: function () { return schemas_1.LiteralTypeSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "KeywordTypeSchema", { enumerable: true, get: function () { return schemas_1.KeywordTypeSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "TypeArraySchema", { enumerable: true, get: function () { return schemas_1.TypeArraySchema; } });
|
|
27
|
+
Object.defineProperty(exports, "TypeOperatorSchema", { enumerable: true, get: function () { return schemas_1.TypeOperatorSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "TupleTypeSchema", { enumerable: true, get: function () { return schemas_1.TupleTypeSchema; } });
|
|
29
|
+
Object.defineProperty(exports, "ParameterSchema", { enumerable: true, get: function () { return schemas_1.ParameterSchema; } });
|
|
22
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAElB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAElB,qCA0BmB;AAzBjB,iGAAA,MAAM,OAAA;AACN,iGAAA,MAAM,OAAA;AAEN,yGAAA,cAAc,OAAA;AAEd,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,sGAAA,WAAW,OAAA;AACX,4GAAA,iBAAiB,OAAA;AACjB,qGAAA,UAAU,OAAA;AACV,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AACjB,+GAAA,oBAAoB,OAAA;AACpB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,8GAAA,mBAAmB,OAAA;AACnB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,0GAAA,eAAe,OAAA;AACf,0GAAA,eAAe,OAAA"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { SchemaNode } from '../schema-node';
|
|
2
|
-
import {
|
|
2
|
+
import { ParameterSchema } from './parameter';
|
|
3
3
|
export declare class ConstructorSchema implements SchemaNode {
|
|
4
|
-
readonly
|
|
5
|
-
constructor(
|
|
4
|
+
readonly params: ParameterSchema[];
|
|
5
|
+
constructor(params: ParameterSchema[]);
|
|
6
6
|
toString(): string;
|
|
7
7
|
toObject(): {
|
|
8
8
|
constructorName: string;
|
|
9
|
-
args:
|
|
9
|
+
args: {
|
|
10
|
+
constructorName: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: Record<string, any> & {
|
|
13
|
+
constructorName: string;
|
|
14
|
+
};
|
|
15
|
+
defaultValue: any;
|
|
16
|
+
description: string;
|
|
17
|
+
}[];
|
|
10
18
|
};
|
|
11
19
|
}
|
|
@@ -6,17 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ConstructorSchema = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
class ConstructorSchema {
|
|
9
|
-
constructor(
|
|
10
|
-
this.
|
|
9
|
+
constructor(params) {
|
|
10
|
+
this.params = params;
|
|
11
11
|
}
|
|
12
12
|
toString() {
|
|
13
|
-
const
|
|
14
|
-
return `${chalk_1.default.bold('constructor')}(${
|
|
13
|
+
const paramsStr = this.params.map((param) => param.toString()).join(', ');
|
|
14
|
+
return `${chalk_1.default.bold('constructor')}(${paramsStr})`;
|
|
15
15
|
}
|
|
16
16
|
toObject() {
|
|
17
17
|
return {
|
|
18
18
|
constructorName: this.constructor.name,
|
|
19
|
-
args: this.
|
|
19
|
+
args: this.params.map((arg) => arg.toObject()),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructor.js","sourceRoot":"","sources":["../../schemas/constructor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,MAAa,iBAAiB;IAC5B,YAAqB,
|
|
1
|
+
{"version":3,"file":"constructor.js","sourceRoot":"","sources":["../../schemas/constructor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,MAAa,iBAAiB;IAC5B,YAAqB,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IAElD,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,GAAG,eAAK,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,SAAS,GAAG,CAAC;IACtD,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAdD,8CAcC"}
|
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
import { SchemaNode } from '../schema-node';
|
|
2
|
-
import {
|
|
3
|
-
export declare type
|
|
4
|
-
name: string;
|
|
5
|
-
type: TypeRefSchema;
|
|
6
|
-
defaultValue?: any;
|
|
7
|
-
description?: string;
|
|
8
|
-
};
|
|
2
|
+
import { ParameterSchema } from './parameter';
|
|
3
|
+
export declare type Modifier = 'static' | 'public' | 'private' | 'protected' | 'readonly' | 'abstract' | 'async' | 'override';
|
|
9
4
|
export declare class FunctionSchema implements SchemaNode {
|
|
10
5
|
readonly name: string;
|
|
11
|
-
readonly params:
|
|
12
|
-
readonly returnType:
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
readonly params: ParameterSchema[];
|
|
7
|
+
readonly returnType: SchemaNode;
|
|
8
|
+
readonly signature: string;
|
|
9
|
+
readonly modifiers: Modifier[];
|
|
10
|
+
constructor(name: string, params: ParameterSchema[], returnType: SchemaNode, signature: string, modifiers?: Modifier[]);
|
|
15
11
|
serialize(): void;
|
|
16
12
|
toJsonSchema(): void;
|
|
17
13
|
getSignature(): string;
|
|
18
14
|
toObject(): {
|
|
19
15
|
constructorName: string;
|
|
20
16
|
name: string;
|
|
21
|
-
params:
|
|
22
|
-
returnType: {
|
|
17
|
+
params: ParameterSchema[];
|
|
18
|
+
returnType: Record<string, any> & {
|
|
23
19
|
constructorName: string;
|
|
24
|
-
name: string;
|
|
25
|
-
componentId: import("@teambit/component").ComponentID;
|
|
26
|
-
packageName: string;
|
|
27
20
|
};
|
|
28
21
|
signature: string;
|
|
22
|
+
modifiers: Modifier[];
|
|
29
23
|
};
|
|
30
24
|
toString(): string;
|
|
31
25
|
}
|
package/dist/schemas/function.js
CHANGED
|
@@ -8,11 +8,12 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
8
8
|
class FunctionSchema {
|
|
9
9
|
constructor(name,
|
|
10
10
|
// readonly doc: any,
|
|
11
|
-
params, returnType, signature) {
|
|
11
|
+
params, returnType, signature, modifiers = []) {
|
|
12
12
|
this.name = name;
|
|
13
13
|
this.params = params;
|
|
14
14
|
this.returnType = returnType;
|
|
15
15
|
this.signature = signature;
|
|
16
|
+
this.modifiers = modifiers;
|
|
16
17
|
}
|
|
17
18
|
serialize() { }
|
|
18
19
|
toJsonSchema() { }
|
|
@@ -26,11 +27,13 @@ class FunctionSchema {
|
|
|
26
27
|
params: this.params,
|
|
27
28
|
returnType: this.returnType.toObject(),
|
|
28
29
|
signature: this.signature,
|
|
30
|
+
modifiers: this.modifiers,
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
toString() {
|
|
32
|
-
const paramsStr = this.params.map((
|
|
33
|
-
|
|
34
|
+
const paramsStr = this.params.map((param) => param.toString()).join(', ');
|
|
35
|
+
const modifiersStr = this.modifiers.length ? `${this.modifiers.join(' ')} ` : '';
|
|
36
|
+
return `${modifiersStr}${chalk_1.default.bold(this.name)}(${paramsStr}): ${this.returnType.toString()}`;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
exports.FunctionSchema = FunctionSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../schemas/function.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../schemas/function.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B,MAAa,cAAc;IACzB,YACW,IAAY;IACrB,qBAAqB;IACZ,MAAyB,EAEzB,UAAsB,EACtB,SAAiB,EACjB,YAAwB,EAAE;QAN1B,SAAI,GAAJ,IAAI,CAAQ;QAEZ,WAAM,GAAN,MAAM,CAAmB;QAEzB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAiB;IAClC,CAAC;IAEJ,SAAS,KAAI,CAAC;IAEd,YAAY,KAAI,CAAC;IAEjB,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,OAAO,GAAG,YAAY,GAAG,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;IAChG,CAAC;CACF;AAnCD,wCAmCC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { SchemaNode } from '../schema-node';
|
|
2
|
-
import { TypeRefSchema } from './type-ref';
|
|
3
2
|
export declare class GetAccessorSchema implements SchemaNode {
|
|
4
3
|
private name;
|
|
5
4
|
private type;
|
|
6
5
|
private signature;
|
|
7
|
-
constructor(name: string, type:
|
|
6
|
+
constructor(name: string, type: SchemaNode, signature: string);
|
|
8
7
|
getSignature(): string;
|
|
9
8
|
toObject(): {
|
|
10
9
|
constructorName: string;
|
|
11
10
|
name: string;
|
|
12
|
-
type: {
|
|
11
|
+
type: Record<string, any> & {
|
|
13
12
|
constructorName: string;
|
|
14
|
-
name: string;
|
|
15
|
-
componentId: import("@teambit/component").ComponentID;
|
|
16
|
-
packageName: string;
|
|
17
13
|
};
|
|
18
14
|
signature: string;
|
|
19
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-accessor.js","sourceRoot":"","sources":["../../schemas/get-accessor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"get-accessor.js","sourceRoot":"","sources":["../../schemas/get-accessor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,MAAa,iBAAiB;IAC5B,YAAoB,IAAY,EAAU,IAAgB,EAAU,SAAiB;QAAjE,SAAI,GAAJ,IAAI,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAY;QAAU,cAAS,GAAT,SAAS,CAAQ;IAAG,CAAC;IACzF,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,OAAO,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnE,CAAC;CACF;AAlBD,8CAkBC"}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { SchemaNode } from '../schema-node';
|
|
2
|
-
import {
|
|
3
|
-
import { TypeRefSchema } from './type-ref';
|
|
2
|
+
import { ParameterSchema } from './parameter';
|
|
4
3
|
/**
|
|
5
4
|
* e.g. `{ [key: string]: boolean };`
|
|
6
5
|
* the "[key: string]" is the "parameter", and the "boolean" is the "type".
|
|
7
6
|
*/
|
|
8
7
|
export declare class IndexSignatureSchema implements SchemaNode {
|
|
9
|
-
private
|
|
8
|
+
private params;
|
|
10
9
|
private type;
|
|
11
|
-
constructor(
|
|
10
|
+
constructor(params: ParameterSchema[], type: SchemaNode);
|
|
12
11
|
toObject(): {
|
|
13
12
|
constructorName: string;
|
|
14
|
-
parameters:
|
|
15
|
-
type: {
|
|
13
|
+
parameters: ParameterSchema[];
|
|
14
|
+
type: Record<string, any> & {
|
|
16
15
|
constructorName: string;
|
|
17
|
-
name: string;
|
|
18
|
-
componentId: import("@teambit/component").ComponentID;
|
|
19
|
-
packageName: string;
|
|
20
16
|
};
|
|
21
17
|
};
|
|
22
18
|
toString(): string;
|
|
@@ -6,20 +6,20 @@ exports.IndexSignatureSchema = void 0;
|
|
|
6
6
|
* the "[key: string]" is the "parameter", and the "boolean" is the "type".
|
|
7
7
|
*/
|
|
8
8
|
class IndexSignatureSchema {
|
|
9
|
-
constructor(
|
|
10
|
-
this.
|
|
9
|
+
constructor(params, type) {
|
|
10
|
+
this.params = params;
|
|
11
11
|
this.type = type;
|
|
12
12
|
}
|
|
13
13
|
toObject() {
|
|
14
14
|
return {
|
|
15
15
|
constructorName: this.constructor.name,
|
|
16
|
-
parameters: this.
|
|
16
|
+
parameters: this.params,
|
|
17
17
|
type: this.type.toObject(),
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
toString() {
|
|
21
|
-
const
|
|
22
|
-
return `[${
|
|
21
|
+
const paramsStr = this.params.map((param) => param.toString()).join(', ');
|
|
22
|
+
return `[${paramsStr}]: ${this.type.toString()}`;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.IndexSignatureSchema = IndexSignatureSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-signature.js","sourceRoot":"","sources":["../../schemas/index-signature.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index-signature.js","sourceRoot":"","sources":["../../schemas/index-signature.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,oBAAoB;IAC/B,YAAoB,MAAyB,EAAU,IAAgB;QAAnD,WAAM,GAAN,MAAM,CAAmB;QAAU,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAC3E,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,UAAU,EAAE,IAAI,CAAC,MAAM;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,IAAI,SAAS,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnD,CAAC;CACF;AAbD,oDAaC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Module } from './module';
|
|
2
2
|
export { Export, StaticProperties } from './export';
|
|
3
|
-
export { FunctionSchema,
|
|
3
|
+
export { FunctionSchema, Modifier } from './function';
|
|
4
4
|
export { TypeRefSchema } from './type-ref';
|
|
5
5
|
export { VariableSchema } from './variable';
|
|
6
6
|
export { ClassSchema } from './class';
|
|
@@ -13,3 +13,11 @@ export { IndexSignatureSchema } from './index-signature';
|
|
|
13
13
|
export { InterfaceSchema } from './interface';
|
|
14
14
|
export { GetAccessorSchema } from './get-accessor';
|
|
15
15
|
export { SetAccessorSchema } from './set-accessor';
|
|
16
|
+
export { TypeQuerySchema } from './type-query';
|
|
17
|
+
export { InferenceTypeSchema } from './inference-type';
|
|
18
|
+
export { LiteralTypeSchema } from './literal-type';
|
|
19
|
+
export { KeywordTypeSchema } from './keyword-type';
|
|
20
|
+
export { TypeArraySchema } from './type-array';
|
|
21
|
+
export { TypeOperatorSchema } from './type-operator';
|
|
22
|
+
export { TupleTypeSchema } from './tuple-type';
|
|
23
|
+
export { ParameterSchema } from './parameter';
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableSchema = exports.TypeRefSchema = exports.FunctionSchema = exports.Export = exports.Module = void 0;
|
|
3
|
+
exports.ParameterSchema = exports.TupleTypeSchema = exports.TypeOperatorSchema = exports.TypeArraySchema = exports.KeywordTypeSchema = exports.LiteralTypeSchema = exports.InferenceTypeSchema = exports.TypeQuerySchema = exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableSchema = exports.TypeRefSchema = exports.FunctionSchema = exports.Export = exports.Module = void 0;
|
|
4
4
|
var module_1 = require("./module");
|
|
5
5
|
Object.defineProperty(exports, "Module", { enumerable: true, get: function () { return module_1.Module; } });
|
|
6
6
|
var export_1 = require("./export");
|
|
@@ -31,4 +31,20 @@ var get_accessor_1 = require("./get-accessor");
|
|
|
31
31
|
Object.defineProperty(exports, "GetAccessorSchema", { enumerable: true, get: function () { return get_accessor_1.GetAccessorSchema; } });
|
|
32
32
|
var set_accessor_1 = require("./set-accessor");
|
|
33
33
|
Object.defineProperty(exports, "SetAccessorSchema", { enumerable: true, get: function () { return set_accessor_1.SetAccessorSchema; } });
|
|
34
|
+
var type_query_1 = require("./type-query");
|
|
35
|
+
Object.defineProperty(exports, "TypeQuerySchema", { enumerable: true, get: function () { return type_query_1.TypeQuerySchema; } });
|
|
36
|
+
var inference_type_1 = require("./inference-type");
|
|
37
|
+
Object.defineProperty(exports, "InferenceTypeSchema", { enumerable: true, get: function () { return inference_type_1.InferenceTypeSchema; } });
|
|
38
|
+
var literal_type_1 = require("./literal-type");
|
|
39
|
+
Object.defineProperty(exports, "LiteralTypeSchema", { enumerable: true, get: function () { return literal_type_1.LiteralTypeSchema; } });
|
|
40
|
+
var keyword_type_1 = require("./keyword-type");
|
|
41
|
+
Object.defineProperty(exports, "KeywordTypeSchema", { enumerable: true, get: function () { return keyword_type_1.KeywordTypeSchema; } });
|
|
42
|
+
var type_array_1 = require("./type-array");
|
|
43
|
+
Object.defineProperty(exports, "TypeArraySchema", { enumerable: true, get: function () { return type_array_1.TypeArraySchema; } });
|
|
44
|
+
var type_operator_1 = require("./type-operator");
|
|
45
|
+
Object.defineProperty(exports, "TypeOperatorSchema", { enumerable: true, get: function () { return type_operator_1.TypeOperatorSchema; } });
|
|
46
|
+
var tuple_type_1 = require("./tuple-type");
|
|
47
|
+
Object.defineProperty(exports, "TupleTypeSchema", { enumerable: true, get: function () { return tuple_type_1.TupleTypeSchema; } });
|
|
48
|
+
var parameter_1 = require("./parameter");
|
|
49
|
+
Object.defineProperty(exports, "ParameterSchema", { enumerable: true, get: function () { return parameter_1.ParameterSchema; } });
|
|
34
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,uCAAsD;AAA7C,0GAAA,cAAc,OAAA;AACvB,uCAA2C;AAAlC,yGAAA,aAAa,OAAA;AACtB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,yDAA6D;AAApD,2HAAA,sBAAsB,OAAA;AAC/B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,yCAA8C;AAArC,4GAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
/**
|
|
3
|
+
* where there is no explicit type, the type is taken from the "quickinfo" of tsserver
|
|
4
|
+
*/
|
|
5
|
+
export declare class InferenceTypeSchema implements SchemaNode {
|
|
6
|
+
private type;
|
|
7
|
+
constructor(type: string);
|
|
8
|
+
toObject(): {
|
|
9
|
+
constructorName: string;
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InferenceTypeSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* where there is no explicit type, the type is taken from the "quickinfo" of tsserver
|
|
6
|
+
*/
|
|
7
|
+
class InferenceTypeSchema {
|
|
8
|
+
constructor(type) {
|
|
9
|
+
this.type = type;
|
|
10
|
+
}
|
|
11
|
+
toObject() {
|
|
12
|
+
return {
|
|
13
|
+
constructorName: this.constructor.name,
|
|
14
|
+
type: this.type,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return this.type;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.InferenceTypeSchema = InferenceTypeSchema;
|
|
22
|
+
//# sourceMappingURL=inference-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference-type.js","sourceRoot":"","sources":["../../schemas/inference-type.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,mBAAmB;IAC9B,YAAoB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;IAEpC,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAbD,kDAaC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
/**
|
|
3
|
+
* e.g. 'string', 'boolean', etc.
|
|
4
|
+
*/
|
|
5
|
+
export declare class KeywordTypeSchema implements SchemaNode {
|
|
6
|
+
private name;
|
|
7
|
+
constructor(name: string);
|
|
8
|
+
toObject(): {
|
|
9
|
+
constructorName: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeywordTypeSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* e.g. 'string', 'boolean', etc.
|
|
6
|
+
*/
|
|
7
|
+
class KeywordTypeSchema {
|
|
8
|
+
constructor(name) {
|
|
9
|
+
this.name = name;
|
|
10
|
+
}
|
|
11
|
+
toObject() {
|
|
12
|
+
return {
|
|
13
|
+
constructorName: this.constructor.name,
|
|
14
|
+
name: this.name,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return this.name;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.KeywordTypeSchema = KeywordTypeSchema;
|
|
22
|
+
//# sourceMappingURL=keyword-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword-type.js","sourceRoot":"","sources":["../../schemas/keyword-type.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,iBAAiB;IAC5B,YAAoB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;IAEpC,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAbD,8CAaC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
/**
|
|
3
|
+
* e.g. const a: 'a';
|
|
4
|
+
*/
|
|
5
|
+
export declare class LiteralTypeSchema implements SchemaNode {
|
|
6
|
+
private name;
|
|
7
|
+
constructor(name: string);
|
|
8
|
+
toObject(): {
|
|
9
|
+
constructorName: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiteralTypeSchema = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* e.g. const a: 'a';
|
|
6
|
+
*/
|
|
7
|
+
class LiteralTypeSchema {
|
|
8
|
+
constructor(name) {
|
|
9
|
+
this.name = name;
|
|
10
|
+
}
|
|
11
|
+
toObject() {
|
|
12
|
+
return {
|
|
13
|
+
constructorName: this.constructor.name,
|
|
14
|
+
name: this.name,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
toString() {
|
|
18
|
+
return this.name;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.LiteralTypeSchema = LiteralTypeSchema;
|
|
22
|
+
//# sourceMappingURL=literal-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal-type.js","sourceRoot":"","sources":["../../schemas/literal-type.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,iBAAiB;IAC5B,YAAoB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;IAEpC,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AAbD,8CAaC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class ParameterSchema implements SchemaNode {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly type: SchemaNode;
|
|
5
|
+
readonly defaultValue?: any;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
constructor(name: string, type: SchemaNode, defaultValue?: any, description?: string);
|
|
8
|
+
toObject(): {
|
|
9
|
+
constructorName: string;
|
|
10
|
+
name: string;
|
|
11
|
+
type: Record<string, any> & {
|
|
12
|
+
constructorName: string;
|
|
13
|
+
};
|
|
14
|
+
defaultValue: any;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
toString(): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterSchema = void 0;
|
|
4
|
+
class ParameterSchema {
|
|
5
|
+
constructor(name, type, defaultValue, description) {
|
|
6
|
+
this.name = name;
|
|
7
|
+
this.type = type;
|
|
8
|
+
this.defaultValue = defaultValue;
|
|
9
|
+
this.description = description;
|
|
10
|
+
}
|
|
11
|
+
toObject() {
|
|
12
|
+
return {
|
|
13
|
+
constructorName: this.constructor.name,
|
|
14
|
+
name: this.name,
|
|
15
|
+
type: this.type.toObject(),
|
|
16
|
+
defaultValue: this.defaultValue,
|
|
17
|
+
description: this.description,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
toString() {
|
|
21
|
+
return `${this.name}: ${this.type.toString()}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ParameterSchema = ParameterSchema;
|
|
25
|
+
//# sourceMappingURL=parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../schemas/parameter.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAC1B,YACW,IAAY,EACZ,IAAgB,EAChB,YAAkB,EAClB,WAAoB;QAHpB,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAY;QAChB,iBAAY,GAAZ,YAAY,CAAM;QAClB,gBAAW,GAAX,WAAW,CAAS;IAC5B,CAAC;IAEJ,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IACjD,CAAC;CACF;AApBD,0CAoBC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Parameter } from '.';
|
|
2
1
|
import { SchemaNode } from '../schema-node';
|
|
2
|
+
import { ParameterSchema } from './parameter';
|
|
3
3
|
export declare class SetAccessorSchema implements SchemaNode {
|
|
4
4
|
private name;
|
|
5
5
|
private param;
|
|
6
6
|
private signature;
|
|
7
|
-
constructor(name: string, param:
|
|
7
|
+
constructor(name: string, param: ParameterSchema, signature: string);
|
|
8
8
|
getSignature(): string;
|
|
9
9
|
toObject(): {
|
|
10
10
|
constructorName: string;
|
|
11
11
|
name: string;
|
|
12
|
-
param:
|
|
12
|
+
param: ParameterSchema;
|
|
13
13
|
signature: string;
|
|
14
14
|
};
|
|
15
15
|
toString(): string;
|
|
@@ -23,7 +23,7 @@ class SetAccessorSchema {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
toString() {
|
|
26
|
-
return `set ${chalk_1.default.bold(this.name)}(${this.param.
|
|
26
|
+
return `set ${chalk_1.default.bold(this.name)}(${this.param.toString()})`;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.SetAccessorSchema = SetAccessorSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-accessor.js","sourceRoot":"","sources":["../../schemas/set-accessor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,MAAa,iBAAiB;IAC5B,YAAoB,IAAY,EAAU,
|
|
1
|
+
{"version":3,"file":"set-accessor.js","sourceRoot":"","sources":["../../schemas/set-accessor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,MAAa,iBAAiB;IAC5B,YAAoB,IAAY,EAAU,KAAsB,EAAU,SAAiB;QAAvE,SAAI,GAAJ,IAAI,CAAQ;QAAU,UAAK,GAAL,KAAK,CAAiB;QAAU,cAAS,GAAT,SAAS,CAAQ;IAAG,CAAC;IAC/F,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,OAAO,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;IAClE,CAAC;CACF;AAlBD,8CAkBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class TupleTypeSchema implements SchemaNode {
|
|
3
|
+
private elements;
|
|
4
|
+
constructor(elements: SchemaNode[]);
|
|
5
|
+
toObject(): {
|
|
6
|
+
constructorName: string;
|
|
7
|
+
elements: (Record<string, any> & {
|
|
8
|
+
constructorName: string;
|
|
9
|
+
})[];
|
|
10
|
+
};
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TupleTypeSchema = void 0;
|
|
4
|
+
class TupleTypeSchema {
|
|
5
|
+
constructor(elements) {
|
|
6
|
+
this.elements = elements;
|
|
7
|
+
}
|
|
8
|
+
toObject() {
|
|
9
|
+
return {
|
|
10
|
+
constructorName: this.constructor.name,
|
|
11
|
+
elements: this.elements.map((elem) => elem.toObject()),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return `[${this.elements.map((elem) => elem.toString()).join(', ')}]`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.TupleTypeSchema = TupleTypeSchema;
|
|
19
|
+
//# sourceMappingURL=tuple-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuple-type.js","sourceRoot":"","sources":["../../schemas/tuple-type.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAC1B,YAAoB,QAAsB;QAAtB,aAAQ,GAAR,QAAQ,CAAc;IAAG,CAAC;IAC9C,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;SACvD,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACxE,CAAC;CACF;AAXD,0CAWC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class TypeArraySchema implements SchemaNode {
|
|
3
|
+
private type;
|
|
4
|
+
constructor(type: SchemaNode);
|
|
5
|
+
toObject(): {
|
|
6
|
+
constructorName: string;
|
|
7
|
+
type: Record<string, any> & {
|
|
8
|
+
constructorName: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeArraySchema = void 0;
|
|
4
|
+
class TypeArraySchema {
|
|
5
|
+
constructor(type) {
|
|
6
|
+
this.type = type;
|
|
7
|
+
}
|
|
8
|
+
toObject() {
|
|
9
|
+
return {
|
|
10
|
+
constructorName: this.constructor.name,
|
|
11
|
+
type: this.type.toObject(),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return `${this.type.toString()}[]`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.TypeArraySchema = TypeArraySchema;
|
|
19
|
+
//# sourceMappingURL=type-array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-array.js","sourceRoot":"","sources":["../../schemas/type-array.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAC1B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IACxC,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;IACrC,CAAC;CACF;AAXD,0CAWC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class TypeOperatorSchema implements SchemaNode {
|
|
3
|
+
private operatorName;
|
|
4
|
+
private type;
|
|
5
|
+
constructor(operatorName: string, type: SchemaNode);
|
|
6
|
+
toObject(): {
|
|
7
|
+
constructorName: string;
|
|
8
|
+
operatorName: string;
|
|
9
|
+
type: Record<string, any> & {
|
|
10
|
+
constructorName: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
toString(): string;
|
|
14
|
+
}
|