@teambit/semantics.entities.semantic-schema 0.0.10 → 0.0.11
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/api-schema.ts +16 -29
- package/dist/api-schema.d.ts +6 -19
- package/dist/api-schema.js +20 -11
- package/dist/api-schema.js.map +1 -1
- package/dist/{schemas/export.d.ts → export.d.ts} +5 -10
- package/dist/{schemas/export.js → export.js} +4 -5
- package/dist/export.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/schema-node.d.ts +9 -8
- package/dist/schema-node.js +16 -0
- package/dist/schema-node.js.map +1 -1
- package/dist/schema-obj-to-class.d.ts +10 -0
- package/dist/schema-obj-to-class.js +56 -0
- package/dist/schema-obj-to-class.js.map +1 -0
- package/dist/schemas/class.d.ts +2 -9
- package/dist/schemas/class.js +15 -9
- package/dist/schemas/class.js.map +1 -1
- package/dist/schemas/constructor.d.ts +4 -15
- package/dist/schemas/constructor.js +16 -8
- package/dist/schemas/constructor.js.map +1 -1
- package/dist/schemas/function-like.d.ts +5 -17
- package/dist/schemas/function-like.js +22 -18
- package/dist/schemas/function-like.js.map +1 -1
- package/dist/schemas/get-accessor.d.ts +7 -14
- package/dist/schemas/get-accessor.js +17 -11
- package/dist/schemas/get-accessor.js.map +1 -1
- package/dist/schemas/index-signature.d.ts +6 -12
- package/dist/schemas/index-signature.js +19 -9
- package/dist/schemas/index-signature.js.map +1 -1
- package/dist/schemas/index.d.ts +0 -1
- package/dist/schemas/index.js +1 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/inference-type.d.ts +5 -8
- package/dist/schemas/inference-type.js +5 -8
- package/dist/schemas/inference-type.js.map +1 -1
- package/dist/schemas/interface.d.ts +6 -12
- package/dist/schemas/interface.js +16 -9
- package/dist/schemas/interface.js.map +1 -1
- package/dist/schemas/keyword-type.d.ts +4 -7
- package/dist/schemas/keyword-type.js +5 -8
- package/dist/schemas/keyword-type.js.map +1 -1
- package/dist/schemas/literal-type.d.ts +5 -4
- package/dist/schemas/literal-type.js +5 -2
- package/dist/schemas/literal-type.js.map +1 -1
- package/dist/schemas/module.d.ts +5 -8
- package/dist/schemas/module.js +16 -6
- package/dist/schemas/module.js.map +1 -1
- package/dist/schemas/parameter.d.ts +5 -13
- package/dist/schemas/parameter.js +17 -12
- package/dist/schemas/parameter.js.map +1 -1
- package/dist/schemas/set-accessor.d.ts +7 -12
- package/dist/schemas/set-accessor.js +17 -11
- package/dist/schemas/set-accessor.js.map +1 -1
- package/dist/schemas/tuple-type.d.ts +5 -10
- package/dist/schemas/tuple-type.js +16 -8
- package/dist/schemas/tuple-type.js.map +1 -1
- package/dist/schemas/type-array.d.ts +5 -10
- package/dist/schemas/type-array.js +16 -8
- package/dist/schemas/type-array.js.map +1 -1
- package/dist/schemas/type-intersection.d.ts +5 -10
- package/dist/schemas/type-intersection.js +16 -8
- package/dist/schemas/type-intersection.js.map +1 -1
- package/dist/schemas/type-literal.d.ts +5 -10
- package/dist/schemas/type-literal.js +16 -8
- package/dist/schemas/type-literal.js.map +1 -1
- package/dist/schemas/type-operator.d.ts +6 -12
- package/dist/schemas/type-operator.js +16 -9
- package/dist/schemas/type-operator.js.map +1 -1
- package/dist/schemas/type-query.d.ts +6 -10
- package/dist/schemas/type-query.js +17 -10
- package/dist/schemas/type-query.js.map +1 -1
- package/dist/schemas/type-ref.d.ts +4 -10
- package/dist/schemas/type-ref.js +5 -14
- package/dist/schemas/type-ref.js.map +1 -1
- package/dist/schemas/type-union.d.ts +5 -10
- package/dist/schemas/type-union.js +16 -8
- package/dist/schemas/type-union.js.map +1 -1
- package/dist/schemas/type.d.ts +7 -14
- package/dist/schemas/type.js +17 -11
- package/dist/schemas/type.js.map +1 -1
- package/dist/schemas/variable.d.ts +6 -14
- package/dist/schemas/variable.js +16 -13
- package/dist/schemas/variable.js.map +1 -1
- package/{schemas/export.ts → export.ts} +5 -8
- package/index.ts +1 -2
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.11.tgz +0 -0
- package/package.json +6 -3
- package/{preview-1652757984397.js → preview-1652930732694.js} +1 -1
- package/schema-node.ts +13 -6
- package/schema-obj-to-class.ts +36 -0
- package/schemas/class.ts +8 -9
- package/schemas/constructor.ts +10 -10
- package/schemas/function-like.ts +17 -20
- package/schemas/get-accessor.ts +10 -12
- package/schemas/index-signature.ts +13 -9
- package/schemas/index.ts +0 -1
- package/schemas/inference-type.ts +4 -9
- package/schemas/interface.ts +10 -9
- package/schemas/keyword-type.ts +4 -9
- package/schemas/literal-type.ts +5 -3
- package/schemas/module.ts +9 -7
- package/schemas/parameter.ts +12 -13
- package/schemas/set-accessor.ts +10 -12
- package/schemas/tuple-type.ts +10 -8
- package/schemas/type-array.ts +10 -8
- package/schemas/type-intersection.ts +10 -8
- package/schemas/type-literal.ts +10 -8
- package/schemas/type-operator.ts +10 -9
- package/schemas/type-query.ts +10 -11
- package/schemas/type-ref.ts +12 -18
- package/schemas/type-union.ts +9 -8
- package/schemas/type.ts +10 -10
- package/schemas/variable.ts +9 -14
- package/tsconfig.json +1 -0
- package/dist/schemas/export.js.map +0 -1
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.10.tgz +0 -0
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
-
export declare class GetAccessorSchema
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class GetAccessorSchema extends SchemaNode {
|
|
3
|
+
readonly location: Location;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly signature: string;
|
|
6
|
+
readonly type: SchemaNode;
|
|
7
|
+
constructor(location: Location, name: string, type: SchemaNode, signature: string);
|
|
7
8
|
getSignature(): string;
|
|
8
|
-
toObject(): {
|
|
9
|
-
constructorName: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type: Record<string, any> & {
|
|
12
|
-
constructorName: string;
|
|
13
|
-
};
|
|
14
|
-
signature: string;
|
|
15
|
-
};
|
|
16
9
|
toString(): string;
|
|
17
10
|
}
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
exports.GetAccessorSchema = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
7
14
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
const schema_node_1 = require("../schema-node");
|
|
16
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
17
|
+
class GetAccessorSchema extends schema_node_1.SchemaNode {
|
|
18
|
+
constructor(location, name, type, signature) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
10
21
|
this.name = name;
|
|
11
|
-
this.type = type;
|
|
12
22
|
this.signature = signature;
|
|
23
|
+
this.type = type;
|
|
13
24
|
}
|
|
14
25
|
getSignature() {
|
|
15
26
|
return this.signature;
|
|
16
27
|
}
|
|
17
|
-
toObject() {
|
|
18
|
-
return {
|
|
19
|
-
constructorName: this.constructor.name,
|
|
20
|
-
name: this.name,
|
|
21
|
-
type: this.type.toObject(),
|
|
22
|
-
signature: this.signature,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
28
|
toString() {
|
|
26
29
|
return `get ${chalk_1.default.bold(this.name)}(): ${this.type.toString()}`;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjToInstance)
|
|
34
|
+
], GetAccessorSchema.prototype, "type", void 0);
|
|
29
35
|
exports.GetAccessorSchema = GetAccessorSchema;
|
|
30
36
|
//# sourceMappingURL=get-accessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-accessor.js","sourceRoot":"","sources":["../../schemas/get-accessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-accessor.js","sourceRoot":"","sources":["../../schemas/get-accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,kDAA0B;AAC1B,gDAAsD;AACtD,gEAA6D;AAE7D,MAAa,iBAAkB,SAAQ,wBAAU;IAG/C,YAAqB,QAAkB,EAAW,IAAY,EAAE,IAAgB,EAAW,SAAiB;QAC1G,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,SAAI,GAAJ,IAAI,CAAQ;QAA6B,cAAS,GAAT,SAAS,CAAQ;QAE1G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,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;AAZC;IADC,IAAA,6BAAS,EAAC,yCAAmB,CAAC;+CACL;AAF5B,8CAcC"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
import { ParameterSchema } from './parameter';
|
|
3
3
|
/**
|
|
4
4
|
* e.g. `{ [key: string]: boolean };`
|
|
5
5
|
* the "[key: string]" is the "parameter", and the "boolean" is the "type".
|
|
6
6
|
*/
|
|
7
|
-
export declare class IndexSignatureSchema
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructorName: string;
|
|
13
|
-
parameters: ParameterSchema[];
|
|
14
|
-
type: Record<string, any> & {
|
|
15
|
-
constructorName: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
7
|
+
export declare class IndexSignatureSchema extends SchemaNode {
|
|
8
|
+
readonly location: Location;
|
|
9
|
+
readonly params: ParameterSchema[];
|
|
10
|
+
readonly type: SchemaNode;
|
|
11
|
+
constructor(location: Location, params: ParameterSchema[], type: SchemaNode);
|
|
18
12
|
toString(): string;
|
|
19
13
|
}
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.IndexSignatureSchema = void 0;
|
|
10
|
+
const class_transformer_1 = require("class-transformer");
|
|
11
|
+
const schema_node_1 = require("../schema-node");
|
|
12
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
4
13
|
/**
|
|
5
14
|
* e.g. `{ [key: string]: boolean };`
|
|
6
15
|
* the "[key: string]" is the "parameter", and the "boolean" is the "type".
|
|
7
16
|
*/
|
|
8
|
-
class IndexSignatureSchema {
|
|
9
|
-
constructor(params, type) {
|
|
17
|
+
class IndexSignatureSchema extends schema_node_1.SchemaNode {
|
|
18
|
+
constructor(location, params, type) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
10
21
|
this.params = params;
|
|
11
22
|
this.type = type;
|
|
12
23
|
}
|
|
13
|
-
toObject() {
|
|
14
|
-
return {
|
|
15
|
-
constructorName: this.constructor.name,
|
|
16
|
-
parameters: this.params,
|
|
17
|
-
type: this.type.toObject(),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
24
|
toString() {
|
|
21
25
|
const paramsStr = this.params.map((param) => param.toString()).join(', ');
|
|
22
26
|
return `[${paramsStr}]: ${this.type.toString()}`;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjArrayToInstances)
|
|
31
|
+
], IndexSignatureSchema.prototype, "params", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjToInstance)
|
|
34
|
+
], IndexSignatureSchema.prototype, "type", void 0);
|
|
25
35
|
exports.IndexSignatureSchema = IndexSignatureSchema;
|
|
26
36
|
//# sourceMappingURL=index-signature.js.map
|
|
@@ -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":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AAEtD,gEAAwF;AAExF;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,wBAAU;IAKlD,YAAqB,QAAkB,EAAE,MAAyB,EAAE,IAAgB;QAClF,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAErC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,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,OAAO,IAAI,SAAS,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnD,CAAC;CACF;AAbC;IADC,IAAA,6BAAS,EAAC,+CAAyB,CAAC;oDACF;AAEnC;IADC,IAAA,6BAAS,EAAC,yCAAmB,CAAC;kDACL;AAJ5B,oDAeC"}
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.FunctionLikeSchema = exports.
|
|
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.FunctionLikeSchema = 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
|
-
var export_1 = require("./export");
|
|
7
|
-
Object.defineProperty(exports, "Export", { enumerable: true, get: function () { return export_1.Export; } });
|
|
8
6
|
var function_like_1 = require("./function-like");
|
|
9
7
|
Object.defineProperty(exports, "FunctionLikeSchema", { enumerable: true, get: function () { return function_like_1.FunctionLikeSchema; } });
|
|
10
8
|
var type_ref_1 = require("./type-ref");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iDAA+D;AAAtD,mHAAA,kBAAkB,OAAA;AAC3B,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"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
/**
|
|
3
3
|
* where there is no explicit type, the type is taken from the "quickinfo" of tsserver
|
|
4
4
|
*/
|
|
5
|
-
export declare class InferenceTypeSchema
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructorName: string;
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
5
|
+
export declare class InferenceTypeSchema extends SchemaNode {
|
|
6
|
+
readonly location: Location;
|
|
7
|
+
readonly type: string;
|
|
8
|
+
constructor(location: Location, type: string);
|
|
12
9
|
toString(): string;
|
|
13
10
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InferenceTypeSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
4
5
|
/**
|
|
5
6
|
* where there is no explicit type, the type is taken from the "quickinfo" of tsserver
|
|
6
7
|
*/
|
|
7
|
-
class InferenceTypeSchema {
|
|
8
|
-
constructor(type) {
|
|
8
|
+
class InferenceTypeSchema extends schema_node_1.SchemaNode {
|
|
9
|
+
constructor(location, type) {
|
|
10
|
+
super();
|
|
11
|
+
this.location = location;
|
|
9
12
|
this.type = type;
|
|
10
13
|
}
|
|
11
|
-
toObject() {
|
|
12
|
-
return {
|
|
13
|
-
constructorName: this.constructor.name,
|
|
14
|
-
type: this.type,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
14
|
toString() {
|
|
18
15
|
return this.type;
|
|
19
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inference-type.js","sourceRoot":"","sources":["../../schemas/inference-type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"inference-type.js","sourceRoot":"","sources":["../../schemas/inference-type.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD;;GAEG;AACH,MAAa,mBAAoB,SAAQ,wBAAU;IACjD,YAAqB,QAAkB,EAAW,IAAY;QAC5D,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,SAAI,GAAJ,IAAI,CAAQ;IAE9D,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AARD,kDAQC"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
-
export declare class InterfaceSchema
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructorName: string;
|
|
8
|
-
name: string;
|
|
9
|
-
types: (Record<string, any> & {
|
|
10
|
-
constructorName: string;
|
|
11
|
-
})[];
|
|
12
|
-
};
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class InterfaceSchema extends SchemaNode {
|
|
3
|
+
readonly location: Location;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly members: SchemaNode[];
|
|
6
|
+
constructor(location: Location, name: string, members: SchemaNode[]);
|
|
13
7
|
toString(): string;
|
|
14
8
|
}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
exports.InterfaceSchema = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
7
14
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
const schema_node_1 = require("../schema-node");
|
|
16
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
17
|
+
class InterfaceSchema extends schema_node_1.SchemaNode {
|
|
18
|
+
constructor(location, name, members) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
10
21
|
this.name = name;
|
|
11
22
|
this.members = members;
|
|
12
23
|
}
|
|
13
|
-
toObject() {
|
|
14
|
-
return {
|
|
15
|
-
constructorName: this.constructor.name,
|
|
16
|
-
name: this.name,
|
|
17
|
-
types: this.members.map((type) => type.toObject()),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
24
|
toString() {
|
|
21
25
|
const membersStr = this.members.map((m) => `* ${m.toString()}`).join('\n');
|
|
22
26
|
return `${chalk_1.default.bold.underline(this.name)}\n${membersStr}`;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjArrayToInstances)
|
|
31
|
+
], InterfaceSchema.prototype, "members", void 0);
|
|
25
32
|
exports.InterfaceSchema = InterfaceSchema;
|
|
26
33
|
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../schemas/interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../schemas/interface.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,kDAA0B;AAC1B,gDAAsD;AACtD,gEAAmE;AAEnE,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAqB,QAAkB,EAAW,IAAY,EAAE,OAAqB;QACnF,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,SAAI,GAAJ,IAAI,CAAQ;QAE5D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3E,OAAO,GAAG,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE,CAAC;IAC7D,CAAC;CACF;AAVC;IADC,IAAA,6BAAS,EAAC,+CAAyB,CAAC;gDACN;AAFjC,0CAYC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
/**
|
|
3
3
|
* e.g. 'string', 'boolean', etc.
|
|
4
4
|
*/
|
|
5
|
-
export declare class KeywordTypeSchema
|
|
5
|
+
export declare class KeywordTypeSchema extends SchemaNode {
|
|
6
|
+
readonly location: Location;
|
|
6
7
|
private name;
|
|
7
|
-
constructor(name: string);
|
|
8
|
-
toObject(): {
|
|
9
|
-
constructorName: string;
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
8
|
+
constructor(location: Location, name: string);
|
|
12
9
|
toString(): string;
|
|
13
10
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KeywordTypeSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
4
5
|
/**
|
|
5
6
|
* e.g. 'string', 'boolean', etc.
|
|
6
7
|
*/
|
|
7
|
-
class KeywordTypeSchema {
|
|
8
|
-
constructor(name) {
|
|
8
|
+
class KeywordTypeSchema extends schema_node_1.SchemaNode {
|
|
9
|
+
constructor(location, name) {
|
|
10
|
+
super();
|
|
11
|
+
this.location = location;
|
|
9
12
|
this.name = name;
|
|
10
13
|
}
|
|
11
|
-
toObject() {
|
|
12
|
-
return {
|
|
13
|
-
constructorName: this.constructor.name,
|
|
14
|
-
name: this.name,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
14
|
toString() {
|
|
18
15
|
return this.name;
|
|
19
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyword-type.js","sourceRoot":"","sources":["../../schemas/keyword-type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"keyword-type.js","sourceRoot":"","sources":["../../schemas/keyword-type.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,wBAAU;IAC/C,YAAqB,QAAkB,EAAU,IAAY;QAC3D,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAU,SAAI,GAAJ,IAAI,CAAQ;IAE7D,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CACF;AARD,8CAQC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
/**
|
|
3
3
|
* e.g. const a: 'a';
|
|
4
4
|
*/
|
|
5
|
-
export declare class LiteralTypeSchema
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare class LiteralTypeSchema extends SchemaNode {
|
|
6
|
+
readonly location: Location;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
constructor(location: Location, name: string);
|
|
8
9
|
toObject(): {
|
|
9
10
|
constructorName: string;
|
|
10
11
|
name: string;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LiteralTypeSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
4
5
|
/**
|
|
5
6
|
* e.g. const a: 'a';
|
|
6
7
|
*/
|
|
7
|
-
class LiteralTypeSchema {
|
|
8
|
-
constructor(name) {
|
|
8
|
+
class LiteralTypeSchema extends schema_node_1.SchemaNode {
|
|
9
|
+
constructor(location, name) {
|
|
10
|
+
super();
|
|
11
|
+
this.location = location;
|
|
9
12
|
this.name = name;
|
|
10
13
|
}
|
|
11
14
|
toObject() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"literal-type.js","sourceRoot":"","sources":["../../schemas/literal-type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"literal-type.js","sourceRoot":"","sources":["../../schemas/literal-type.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,wBAAU;IAC/C,YAAqB,QAAkB,EAAW,IAAY;QAC5D,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,SAAI,GAAJ,IAAI,CAAQ;IAE9D,CAAC;IAED,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;AAfD,8CAeC"}
|
package/dist/schemas/module.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class Module extends SchemaNode {
|
|
3
|
+
readonly location: Location;
|
|
4
4
|
exports: SchemaNode[];
|
|
5
5
|
namespace?: string;
|
|
6
|
-
constructor(exports: SchemaNode[]);
|
|
7
|
-
getExportSchemas(): Export[];
|
|
6
|
+
constructor(location: Location, exports: SchemaNode[]);
|
|
8
7
|
toObject(): {
|
|
9
8
|
constructorName: string;
|
|
10
9
|
namespace: string;
|
|
11
|
-
exports:
|
|
12
|
-
constructorName: string;
|
|
13
|
-
})[];
|
|
10
|
+
exports: Record<string, any>[];
|
|
14
11
|
};
|
|
15
12
|
flatExportsRecursively(): void;
|
|
16
13
|
toString(): string;
|
package/dist/schemas/module.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
exports.Module = void 0;
|
|
7
13
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const schema_node_1 = require("../schema-node");
|
|
16
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
17
|
+
class Module extends schema_node_1.SchemaNode {
|
|
18
|
+
constructor(location, exports) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
11
21
|
this.exports = exports;
|
|
12
22
|
}
|
|
13
|
-
getExportSchemas() {
|
|
14
|
-
return this.exports.filter((e) => e instanceof schemas_1.Export);
|
|
15
|
-
}
|
|
16
23
|
toObject() {
|
|
17
24
|
return {
|
|
18
25
|
constructorName: this.constructor.name,
|
|
@@ -38,5 +45,8 @@ class Module {
|
|
|
38
45
|
return `${chalk_1.default.bold.underline(this.namespace)}\n${exportsStr}`;
|
|
39
46
|
}
|
|
40
47
|
}
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjArrayToInstances)
|
|
50
|
+
], Module.prototype, "exports", void 0);
|
|
41
51
|
exports.Module = Module;
|
|
42
52
|
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../schemas/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../schemas/module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0B;AAC1B,yDAA8C;AAC9C,gDAAsD;AACtD,gEAAmE;AAEnE,MAAa,MAAO,SAAQ,wBAAU;IAIpC,YAAqB,QAAkB,EAAE,OAAqB;QAC5D,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAErC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;SACnD,CAAC;IACJ,CAAC;IAED,sBAAsB;QACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC9C,IAAI,GAAG,YAAY,MAAM,EAAE;gBACzB,GAAG,CAAC,sBAAsB,EAAE,CAAC;gBAC7B,IAAI,GAAG,CAAC,SAAS;oBAAE,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;gBACxC,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;aACjC;YACD,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;QACvB,CAAC,EAAE,EAAkB,CAAC,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,SAAS;YACjB,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;QACJ,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3E,OAAO,GAAG,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE,CAAC;IAClE,CAAC;CACF;AAlCC;IADC,IAAA,6BAAS,EAAC,+CAAyB,CAAC;uCACf;AAFxB,wBAoCC"}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
-
export declare class ParameterSchema
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class ParameterSchema extends SchemaNode {
|
|
3
|
+
readonly location: Location;
|
|
3
4
|
readonly name: string;
|
|
4
|
-
readonly type: SchemaNode;
|
|
5
5
|
readonly defaultValue?: any;
|
|
6
6
|
readonly description?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructorName: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type: Record<string, any> & {
|
|
12
|
-
constructorName: string;
|
|
13
|
-
};
|
|
14
|
-
defaultValue: any;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
7
|
+
readonly type: SchemaNode;
|
|
8
|
+
constructor(location: Location, name: string, type: SchemaNode, defaultValue?: any, description?: string);
|
|
17
9
|
toString(): string;
|
|
18
10
|
}
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ParameterSchema = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
10
|
+
const class_transformer_1 = require("class-transformer");
|
|
11
|
+
const schema_node_1 = require("../schema-node");
|
|
12
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
13
|
+
class ParameterSchema extends schema_node_1.SchemaNode {
|
|
14
|
+
constructor(location, name, type, defaultValue, description) {
|
|
15
|
+
super();
|
|
16
|
+
this.location = location;
|
|
6
17
|
this.name = name;
|
|
7
|
-
this.type = type;
|
|
8
18
|
this.defaultValue = defaultValue;
|
|
9
19
|
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
|
-
};
|
|
20
|
+
this.type = type;
|
|
19
21
|
}
|
|
20
22
|
toString() {
|
|
21
23
|
return `${this.name}: ${this.type.toString()}`;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjToInstance)
|
|
28
|
+
], ParameterSchema.prototype, "type", void 0);
|
|
24
29
|
exports.ParameterSchema = ParameterSchema;
|
|
25
30
|
//# sourceMappingURL=parameter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../schemas/parameter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../schemas/parameter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AACtD,gEAA6D;AAE7D,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YACW,QAAkB,EAClB,IAAY,EACrB,IAAgB,EACP,YAAkB,EAClB,WAAoB;QAE7B,KAAK,EAAE,CAAC;QANC,aAAQ,GAAR,QAAQ,CAAU;QAClB,SAAI,GAAJ,IAAI,CAAQ;QAEZ,iBAAY,GAAZ,YAAY,CAAM;QAClB,gBAAW,GAAX,WAAW,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IACjD,CAAC;CACF;AAfC;IADC,IAAA,6BAAS,EAAC,yCAAmB,CAAC;6CACL;AAF5B,0CAiBC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
import { ParameterSchema } from './parameter';
|
|
3
|
-
export declare class SetAccessorSchema
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export declare class SetAccessorSchema extends SchemaNode {
|
|
4
|
+
readonly location: Location;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly signature: string;
|
|
7
|
+
readonly param: ParameterSchema;
|
|
8
|
+
constructor(location: Location, name: string, param: ParameterSchema, signature: string);
|
|
8
9
|
getSignature(): string;
|
|
9
|
-
toObject(): {
|
|
10
|
-
constructorName: string;
|
|
11
|
-
name: string;
|
|
12
|
-
param: ParameterSchema;
|
|
13
|
-
signature: string;
|
|
14
|
-
};
|
|
15
10
|
toString(): string;
|
|
16
11
|
}
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
10
|
};
|
|
5
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
12
|
exports.SetAccessorSchema = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
7
14
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
const schema_node_1 = require("../schema-node");
|
|
16
|
+
const schema_obj_to_class_1 = require("../schema-obj-to-class");
|
|
17
|
+
class SetAccessorSchema extends schema_node_1.SchemaNode {
|
|
18
|
+
constructor(location, name, param, signature) {
|
|
19
|
+
super();
|
|
20
|
+
this.location = location;
|
|
10
21
|
this.name = name;
|
|
11
|
-
this.param = param;
|
|
12
22
|
this.signature = signature;
|
|
23
|
+
this.param = param;
|
|
13
24
|
}
|
|
14
25
|
getSignature() {
|
|
15
26
|
return this.signature;
|
|
16
27
|
}
|
|
17
|
-
toObject() {
|
|
18
|
-
return {
|
|
19
|
-
constructorName: this.constructor.name,
|
|
20
|
-
name: this.name,
|
|
21
|
-
param: this.param,
|
|
22
|
-
signature: this.signature,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
28
|
toString() {
|
|
26
29
|
return `set ${chalk_1.default.bold(this.name)}(${this.param.toString()})`;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjToInstance)
|
|
34
|
+
], SetAccessorSchema.prototype, "param", void 0);
|
|
29
35
|
exports.SetAccessorSchema = SetAccessorSchema;
|
|
30
36
|
//# sourceMappingURL=set-accessor.js.map
|