@teambit/semantics.entities.semantic-schema 0.0.13 → 0.0.14

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 CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  FunctionLikeSchema,
7
7
  InterfaceSchema,
8
8
  Module,
9
+ TypeRefSchema,
9
10
  TypeSchema,
10
11
  VariableSchema,
11
12
  } from './schemas';
@@ -46,7 +47,8 @@ export class APISchema extends SchemaNode {
46
47
  getSection(FunctionLikeSchema, 'Functions') +
47
48
  getSection(VariableSchema, 'Variables') +
48
49
  getSection(TypeSchema, 'Types') +
49
- getSection(EnumSchema, 'Enums')
50
+ getSection(EnumSchema, 'Enums') +
51
+ getSection(TypeRefSchema, 'TypeReferences')
50
52
  );
51
53
  }
52
54
 
@@ -38,7 +38,8 @@ class APISchema extends schema_node_1.SchemaNode {
38
38
  getSection(schemas_1.FunctionLikeSchema, 'Functions') +
39
39
  getSection(schemas_1.VariableSchema, 'Variables') +
40
40
  getSection(schemas_1.TypeSchema, 'Types') +
41
- getSection(schemas_1.EnumSchema, 'Enums'));
41
+ getSection(schemas_1.EnumSchema, 'Enums') +
42
+ getSection(schemas_1.TypeRefSchema, 'TypeReferences'));
42
43
  }
43
44
  listSignatures() {
44
45
  return this.module.exports.map((exp) => exp.signature);
@@ -1 +1 @@
1
- {"version":3,"file":"api-schema.js","sourceRoot":"","sources":["../api-schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA+D;AAC/D,kDAA0B;AAC1B,uCAQmB;AACnB,+CAAqD;AACrD,+DAA4D;AAE5D,MAAa,SAAU,SAAQ,wBAAU;IAIvC,YAAqB,QAAkB,EAAE,MAAc;QACrD,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAErC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CACnB,IAA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e,EAAE,YAAY,CAAC;YACzC,UAAU,CAAC,4BAAkB,EAAE,WAAW,CAAC;YAC3C,UAAU,CAAC,wBAAc,EAAE,WAAW,CAAC;YACvC,UAAU,CAAC,oBAAU,EAAE,OAAO,CAAC;YAC/B,UAAU,CAAC,oBAAU,EAAE,OAAO,CAAC;YAC/B,UAAU,CAAC,uBAAa,EAAE,gBAAgB,CAAC,CAC5C,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAwB;QACxC,OAAO,IAAA,mCAAe,EAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;CACF;AA5CC;IADC,IAAA,6BAAS,EAAC,yCAAmB,CAAC;yCACP;AAF1B,8BA8CC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { APISchema } from './api-schema';
2
2
  export { Export, StaticProperties } from './export';
3
3
  export type { SchemaNode, Location } from './schema-node';
4
- export { Module, FunctionLikeSchema, Modifier, TypeRefSchema, VariableSchema, ClassSchema, ConstructorSchema, TypeSchema, TypeIntersectionSchema, TypeUnionSchema, TypeLiteralSchema, IndexSignatureSchema, InterfaceSchema, GetAccessorSchema, SetAccessorSchema, TypeQuerySchema, InferenceTypeSchema, LiteralTypeSchema, KeywordTypeSchema, TypeArraySchema, TypeOperatorSchema, TupleTypeSchema, ParameterSchema, EnumSchema, ParenthesizedTypeSchema, TypePredicateSchema, IndexedAccessSchema, } from './schemas';
4
+ export { Module, FunctionLikeSchema, Modifier, TypeRefSchema, VariableSchema, ClassSchema, ConstructorSchema, TypeSchema, TypeIntersectionSchema, TypeUnionSchema, TypeLiteralSchema, IndexSignatureSchema, InterfaceSchema, GetAccessorSchema, SetAccessorSchema, TypeQuerySchema, InferenceTypeSchema, LiteralTypeSchema, KeywordTypeSchema, TypeArraySchema, TypeOperatorSchema, TupleTypeSchema, ParameterSchema, EnumSchema, ParenthesizedTypeSchema, TypePredicateSchema, IndexedAccessSchema, TemplateLiteralTypeSchema, TemplateLiteralTypeSpanSchema, } from './schemas';
5
5
  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.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumSchema = 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 = exports.Export = exports.APISchema = void 0;
3
+ exports.TemplateLiteralTypeSpanSchema = exports.TemplateLiteralTypeSchema = exports.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumSchema = 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 = 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 export_1 = require("./export");
@@ -32,4 +32,6 @@ Object.defineProperty(exports, "EnumSchema", { enumerable: true, get: function (
32
32
  Object.defineProperty(exports, "ParenthesizedTypeSchema", { enumerable: true, get: function () { return schemas_1.ParenthesizedTypeSchema; } });
33
33
  Object.defineProperty(exports, "TypePredicateSchema", { enumerable: true, get: function () { return schemas_1.TypePredicateSchema; } });
34
34
  Object.defineProperty(exports, "IndexedAccessSchema", { enumerable: true, get: function () { return schemas_1.IndexedAccessSchema; } });
35
+ Object.defineProperty(exports, "TemplateLiteralTypeSchema", { enumerable: true, get: function () { return schemas_1.TemplateLiteralTypeSchema; } });
36
+ Object.defineProperty(exports, "TemplateLiteralTypeSpanSchema", { enumerable: true, get: function () { return schemas_1.TemplateLiteralTypeSpanSchema; } });
35
37
  //# 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;AAClB,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qCA4BmB;AA3BjB,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAElB,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;AACf,qGAAA,UAAU,OAAA;AACV,kHAAA,uBAAuB,OAAA;AACvB,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qCA8BmB;AA7BjB,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAElB,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;AACf,qGAAA,UAAU,OAAA;AACV,kHAAA,uBAAuB,OAAA;AACvB,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA;AACnB,oHAAA,yBAAyB,OAAA;AACzB,wHAAA,6BAA6B,OAAA"}
@@ -24,3 +24,5 @@ export { EnumSchema } from './enum';
24
24
  export { ParenthesizedTypeSchema } from './parenthesized-type';
25
25
  export { TypePredicateSchema } from './type-predicate';
26
26
  export { IndexedAccessSchema } from './indexed-access-type';
27
+ export { TemplateLiteralTypeSchema } from './template-literal-type';
28
+ export { TemplateLiteralTypeSpanSchema } from './template-literal-type-span';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumSchema = 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;
3
+ exports.TemplateLiteralTypeSpanSchema = exports.TemplateLiteralTypeSchema = exports.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumSchema = 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
6
  var function_like_1 = require("./function-like");
@@ -53,4 +53,8 @@ var type_predicate_1 = require("./type-predicate");
53
53
  Object.defineProperty(exports, "TypePredicateSchema", { enumerable: true, get: function () { return type_predicate_1.TypePredicateSchema; } });
54
54
  var indexed_access_type_1 = require("./indexed-access-type");
55
55
  Object.defineProperty(exports, "IndexedAccessSchema", { enumerable: true, get: function () { return indexed_access_type_1.IndexedAccessSchema; } });
56
+ var template_literal_type_1 = require("./template-literal-type");
57
+ Object.defineProperty(exports, "TemplateLiteralTypeSchema", { enumerable: true, get: function () { return template_literal_type_1.TemplateLiteralTypeSchema; } });
58
+ var template_literal_type_span_1 = require("./template-literal-type-span");
59
+ Object.defineProperty(exports, "TemplateLiteralTypeSpanSchema", { enumerable: true, get: function () { return template_literal_type_span_1.TemplateLiteralTypeSpanSchema; } });
56
60
  //# 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,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;A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AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,2DAA+D;AAAtD,6HAAA,uBAAuB,OAAA;AAChC,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAoE;AAA3D,kIAAA,yBAAyB,OAAA;AAClC,2EAA6E;AAApE,2IAAA,6BAA6B,OAAA"}
@@ -0,0 +1,8 @@
1
+ import { Location, SchemaNode } from '../schema-node';
2
+ export declare class TemplateLiteralTypeSpanSchema extends SchemaNode {
3
+ readonly location: Location;
4
+ readonly literal: string;
5
+ type: SchemaNode;
6
+ constructor(location: Location, literal: string, type: SchemaNode);
7
+ toString(): string;
8
+ }
@@ -0,0 +1,28 @@
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
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TemplateLiteralTypeSpanSchema = 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");
13
+ class TemplateLiteralTypeSpanSchema extends schema_node_1.SchemaNode {
14
+ constructor(location, literal, type) {
15
+ super();
16
+ this.location = location;
17
+ this.literal = literal;
18
+ this.type = type;
19
+ }
20
+ toString() {
21
+ return `${this.type.toString()} ${this.literal}`;
22
+ }
23
+ }
24
+ __decorate([
25
+ (0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjToInstance)
26
+ ], TemplateLiteralTypeSpanSchema.prototype, "type", void 0);
27
+ exports.TemplateLiteralTypeSpanSchema = TemplateLiteralTypeSpanSchema;
28
+ //# sourceMappingURL=template-literal-type-span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-literal-type-span.js","sourceRoot":"","sources":["../../schemas/template-literal-type-span.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AACtD,gEAA6D;AAE7D,MAAa,6BAA8B,SAAQ,wBAAU;IAG3D,YAAqB,QAAkB,EAAW,OAAe,EAAE,IAAgB;QACjF,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,YAAO,GAAP,OAAO,CAAQ;QAE/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;IACnD,CAAC;CACF;AATC;IADC,IAAA,6BAAS,EAAC,yCAAmB,CAAC;2DACd;AAFnB,sEAWC"}
@@ -0,0 +1,9 @@
1
+ import { Location, SchemaNode } from '../schema-node';
2
+ import { TemplateLiteralTypeSpanSchema } from './template-literal-type-span';
3
+ export declare class TemplateLiteralTypeSchema extends SchemaNode {
4
+ readonly location: Location;
5
+ readonly head: string;
6
+ readonly templateSpans: TemplateLiteralTypeSpanSchema[];
7
+ constructor(location: Location, head: string, templateSpans: TemplateLiteralTypeSpanSchema[]);
8
+ toString(): string;
9
+ }
@@ -0,0 +1,29 @@
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
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TemplateLiteralTypeSchema = 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");
13
+ class TemplateLiteralTypeSchema extends schema_node_1.SchemaNode {
14
+ constructor(location, head, templateSpans) {
15
+ super();
16
+ this.location = location;
17
+ this.head = head;
18
+ this.templateSpans = templateSpans;
19
+ }
20
+ toString() {
21
+ const spans = this.templateSpans.map((span) => span.toString()).join('');
22
+ return `${this.head}${spans}`;
23
+ }
24
+ }
25
+ __decorate([
26
+ (0, class_transformer_1.Transform)(schema_obj_to_class_1.schemaObjArrayToInstances)
27
+ ], TemplateLiteralTypeSchema.prototype, "templateSpans", void 0);
28
+ exports.TemplateLiteralTypeSchema = TemplateLiteralTypeSchema;
29
+ //# sourceMappingURL=template-literal-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-literal-type.js","sourceRoot":"","sources":["../../schemas/template-literal-type.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AACtD,gEAAmE;AAGnE,MAAa,yBAA0B,SAAQ,wBAAU;IAGvD,YAAqB,QAAkB,EAAW,IAAY,EAAE,aAA8C;QAC5G,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAU;QAAW,SAAI,GAAJ,IAAI,CAAQ;QAE5D,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,EAAE,CAAC;IAChC,CAAC;CACF;AAVC;IADC,IAAA,6BAAS,EAAC,+CAAyB,CAAC;gEACmB;AAF1D,8DAYC"}
@@ -1,6 +1,6 @@
1
1
  import { Location, SchemaNode } from '../schema-node';
2
2
  /**
3
- * can be also a property.
3
+ * can be also a property or property-signature
4
4
  */
5
5
  export declare class VariableSchema extends SchemaNode {
6
6
  readonly location: Location;
@@ -15,7 +15,7 @@ const chalk_1 = __importDefault(require("chalk"));
15
15
  const schema_node_1 = require("../schema-node");
16
16
  const schema_obj_to_class_1 = require("../schema-obj-to-class");
17
17
  /**
18
- * can be also a property.
18
+ * can be also a property or property-signature
19
19
  */
20
20
  class VariableSchema extends schema_node_1.SchemaNode {
21
21
  constructor(location, name, signature, type) {
package/index.ts CHANGED
@@ -29,5 +29,7 @@ export {
29
29
  ParenthesizedTypeSchema,
30
30
  TypePredicateSchema,
31
31
  IndexedAccessSchema,
32
+ TemplateLiteralTypeSchema,
33
+ TemplateLiteralTypeSpanSchema,
32
34
  } from './schemas';
33
35
  export type { JSONSchema, JSONSchemaObject } from './json-schema';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/semantics.entities.semantic-schema",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "homepage": "https://bit.dev/teambit/semantics/entities/semantic-schema",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.semantics",
8
8
  "name": "entities/semantic-schema",
9
- "version": "0.0.13"
9
+ "version": "0.0.14"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -1 +1 @@
1
- export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.semantics_entities_semantic-schema@0.0.13/dist/semantic-schema.docs.md')]
1
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.semantics_entities_semantic-schema@0.0.14/dist/semantic-schema.docs.md')]
package/schemas/index.ts CHANGED
@@ -24,3 +24,5 @@ export { EnumSchema } from './enum';
24
24
  export { ParenthesizedTypeSchema } from './parenthesized-type';
25
25
  export { TypePredicateSchema } from './type-predicate';
26
26
  export { IndexedAccessSchema } from './indexed-access-type';
27
+ export { TemplateLiteralTypeSchema } from './template-literal-type';
28
+ export { TemplateLiteralTypeSpanSchema } from './template-literal-type-span';
@@ -0,0 +1,16 @@
1
+ import { Transform } from 'class-transformer';
2
+ import { Location, SchemaNode } from '../schema-node';
3
+ import { schemaObjToInstance } from '../schema-obj-to-class';
4
+
5
+ export class TemplateLiteralTypeSpanSchema extends SchemaNode {
6
+ @Transform(schemaObjToInstance)
7
+ type: SchemaNode;
8
+ constructor(readonly location: Location, readonly literal: string, type: SchemaNode) {
9
+ super();
10
+ this.type = type;
11
+ }
12
+
13
+ toString() {
14
+ return `${this.type.toString()} ${this.literal}`;
15
+ }
16
+ }
@@ -0,0 +1,18 @@
1
+ import { Transform } from 'class-transformer';
2
+ import { Location, SchemaNode } from '../schema-node';
3
+ import { schemaObjArrayToInstances } from '../schema-obj-to-class';
4
+ import { TemplateLiteralTypeSpanSchema } from './template-literal-type-span';
5
+
6
+ export class TemplateLiteralTypeSchema extends SchemaNode {
7
+ @Transform(schemaObjArrayToInstances)
8
+ readonly templateSpans: TemplateLiteralTypeSpanSchema[];
9
+ constructor(readonly location: Location, readonly head: string, templateSpans: TemplateLiteralTypeSpanSchema[]) {
10
+ super();
11
+ this.templateSpans = templateSpans;
12
+ }
13
+
14
+ toString() {
15
+ const spans = this.templateSpans.map((span) => span.toString()).join('');
16
+ return `${this.head}${spans}`;
17
+ }
18
+ }
@@ -4,7 +4,7 @@ import { Location, SchemaNode } from '../schema-node';
4
4
  import { schemaObjToInstance } from '../schema-obj-to-class';
5
5
 
6
6
  /**
7
- * can be also a property.
7
+ * can be also a property or property-signature
8
8
  */
9
9
  export class VariableSchema extends SchemaNode {
10
10
  @Transform(schemaObjToInstance)