@teambit/typescript 1.0.167 → 1.0.169
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/artifacts/__bit_junit.xml +15 -15
- package/artifacts/preview/teambit_typescript_typescript-preview.js +1 -1
- package/artifacts/schema.json +408 -408
- package/dist/{preview-1707967207539.js → preview-1708312624982.js} +2 -2
- package/dist/transformers/array-literal-expression.d.ts +9 -0
- package/dist/transformers/array-literal-expression.js +51 -0
- package/dist/transformers/array-literal-expression.js.map +1 -0
- package/dist/transformers/class-declaration.js +2 -1
- package/dist/transformers/class-declaration.js.map +1 -1
- package/dist/transformers/decorator.d.ts +10 -0
- package/dist/transformers/decorator.js +54 -0
- package/dist/transformers/decorator.js.map +1 -0
- package/dist/transformers/function-like.js +2 -1
- package/dist/transformers/function-like.js.map +1 -1
- package/dist/transformers/index.d.ts +5 -0
- package/dist/transformers/index.js +65 -0
- package/dist/transformers/index.js.map +1 -1
- package/dist/transformers/literal-value.d.ts +10 -0
- package/dist/transformers/literal-value.js +35 -0
- package/dist/transformers/literal-value.js.map +1 -0
- package/dist/transformers/object-literal-expression.d.ts +8 -0
- package/dist/transformers/object-literal-expression.js +51 -0
- package/dist/transformers/object-literal-expression.js.map +1 -0
- package/dist/transformers/property-assignment.d.ts +9 -0
- package/dist/transformers/property-assignment.js +39 -0
- package/dist/transformers/property-assignment.js.map +1 -0
- package/dist/typescript.main.runtime.js +1 -1
- package/dist/typescript.main.runtime.js.map +1 -1
- package/package.json +16 -16
- package/transformers/array-literal-expression.ts +32 -0
- package/transformers/class-declaration.ts +5 -1
- package/transformers/decorator.ts +28 -0
- package/transformers/function-like.ts +5 -1
- package/transformers/index.ts +5 -0
- package/transformers/literal-value.ts +37 -0
- package/transformers/object-literal-expression.ts +27 -0
- package/transformers/property-assignment.ts +23 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.169/dist/typescript.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.169/dist/typescript.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
+
import { ArrayLiteralExpression, Node } from 'typescript';
|
|
3
|
+
import { SchemaExtractorContext, SchemaTransformer } from '..';
|
|
4
|
+
import { Identifier } from '../identifier';
|
|
5
|
+
export declare class ArrayLiteralExpressionTransformer implements SchemaTransformer {
|
|
6
|
+
predicate(node: Node): boolean;
|
|
7
|
+
getIdentifiers(): Promise<Identifier[]>;
|
|
8
|
+
transform(node: ArrayLiteralExpression, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ArrayLiteralExpressionTransformer = void 0;
|
|
7
|
+
function _semanticsEntities() {
|
|
8
|
+
const data = require("@teambit/semantics.entities.semantic-schema");
|
|
9
|
+
_semanticsEntities = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _pMapSeries() {
|
|
15
|
+
const data = _interopRequireDefault(require("p-map-series"));
|
|
16
|
+
_pMapSeries = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _typescript() {
|
|
22
|
+
const data = _interopRequireDefault(require("typescript"));
|
|
23
|
+
_typescript = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
class ArrayLiteralExpressionTransformer {
|
|
30
|
+
predicate(node) {
|
|
31
|
+
return node.kind === _typescript().default.SyntaxKind.ArrayLiteralExpression;
|
|
32
|
+
}
|
|
33
|
+
async getIdentifiers() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
async transform(node, context) {
|
|
37
|
+
const members = await (0, _pMapSeries().default)(node.elements, async element => {
|
|
38
|
+
const schema = await context.computeSchema(element);
|
|
39
|
+
if (schema instanceof _semanticsEntities().UnImplementedSchema) {
|
|
40
|
+
const typeRef = await context.resolveType(element, element.getText());
|
|
41
|
+
return typeRef;
|
|
42
|
+
}
|
|
43
|
+
return schema;
|
|
44
|
+
});
|
|
45
|
+
const location = context.getLocation(node);
|
|
46
|
+
return new (_semanticsEntities().ArrayLiteralExpressionSchema)(members, location);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ArrayLiteralExpressionTransformer = ArrayLiteralExpressionTransformer;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=array-literal-expression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_pMapSeries","_interopRequireDefault","_typescript","obj","__esModule","default","ArrayLiteralExpressionTransformer","predicate","node","kind","ts","SyntaxKind","ArrayLiteralExpression","getIdentifiers","transform","context","members","pMapSeries","elements","element","schema","computeSchema","UnImplementedSchema","typeRef","resolveType","getText","location","getLocation","ArrayLiteralExpressionSchema","exports"],"sources":["array-literal-expression.ts"],"sourcesContent":["import {\n ArrayLiteralExpressionSchema,\n SchemaNode,\n UnImplementedSchema,\n} from '@teambit/semantics.entities.semantic-schema';\nimport pMapSeries from 'p-map-series';\nimport ts, { ArrayLiteralExpression, Node } from 'typescript';\nimport { SchemaExtractorContext, SchemaTransformer } from '..';\nimport { Identifier } from '../identifier';\n\nexport class ArrayLiteralExpressionTransformer implements SchemaTransformer {\n predicate(node: Node): boolean {\n return node.kind === ts.SyntaxKind.ArrayLiteralExpression;\n }\n\n async getIdentifiers(): Promise<Identifier[]> {\n return [];\n }\n\n async transform(node: ArrayLiteralExpression, context: SchemaExtractorContext): Promise<SchemaNode> {\n const members = await pMapSeries(node.elements, async (element) => {\n const schema = await context.computeSchema(element);\n if (schema instanceof UnImplementedSchema) {\n const typeRef = await context.resolveType(element, element.getText());\n return typeRef;\n }\n return schema;\n });\n const location = context.getLocation(node);\n return new ArrayLiteralExpressionSchema(members, location);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAG,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAIvD,MAAMG,iCAAiC,CAA8B;EAC1EC,SAASA,CAACC,IAAU,EAAW;IAC7B,OAAOA,IAAI,CAACC,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACC,sBAAsB;EAC3D;EAEA,MAAMC,cAAcA,CAAA,EAA0B;IAC5C,OAAO,EAAE;EACX;EAEA,MAAMC,SAASA,CAACN,IAA4B,EAAEO,OAA+B,EAAuB;IAClG,MAAMC,OAAO,GAAG,MAAM,IAAAC,qBAAU,EAACT,IAAI,CAACU,QAAQ,EAAE,MAAOC,OAAO,IAAK;MACjE,MAAMC,MAAM,GAAG,MAAML,OAAO,CAACM,aAAa,CAACF,OAAO,CAAC;MACnD,IAAIC,MAAM,YAAYE,wCAAmB,EAAE;QACzC,MAAMC,OAAO,GAAG,MAAMR,OAAO,CAACS,WAAW,CAACL,OAAO,EAAEA,OAAO,CAACM,OAAO,CAAC,CAAC,CAAC;QACrE,OAAOF,OAAO;MAChB;MACA,OAAOH,MAAM;IACf,CAAC,CAAC;IACF,MAAMM,QAAQ,GAAGX,OAAO,CAACY,WAAW,CAACnB,IAAI,CAAC;IAC1C,OAAO,KAAIoB,iDAA4B,EAACZ,OAAO,EAAEU,QAAQ,CAAC;EAC5D;AACF;AAACG,OAAA,CAAAvB,iCAAA,GAAAA,iCAAA"}
|
|
@@ -80,6 +80,7 @@ class ClassDeclarationTransformer {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
async transform(node, context) {
|
|
83
|
+
const decorators = node.decorators?.length ? await (0, _pMapSeries().default)(node.decorators, decorator => context.computeSchema(decorator)) : undefined;
|
|
83
84
|
const className = this.getName(node);
|
|
84
85
|
const extendsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(node, context, _typescript().default.SyntaxKind.ExtendsKeyword);
|
|
85
86
|
const implementsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(node, context, _typescript().default.SyntaxKind.ImplementsKeyword);
|
|
@@ -98,7 +99,7 @@ class ClassDeclarationTransformer {
|
|
|
98
99
|
if (!signature) {
|
|
99
100
|
throw Error(`Missing signature for class ${className} declaration`);
|
|
100
101
|
}
|
|
101
|
-
return new (_semanticsEntities().ClassSchema)(className, (0, _lodash().compact)(members), context.getLocation(node), signature, doc, typeParameters, extendsExpressionsWithTypeArgs, implementsExpressionsWithTypeArgs);
|
|
102
|
+
return new (_semanticsEntities().ClassSchema)(className, (0, _lodash().compact)(members), context.getLocation(node), signature, doc, typeParameters, extendsExpressionsWithTypeArgs, implementsExpressionsWithTypeArgs, decorators);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
exports.ClassDeclarationTransformer = ClassDeclarationTransformer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_lodash","_semanticsEntities","_typescript","_identifier","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","ClassDeclarationTransformer","predicate","node","kind","ts","SyntaxKind","ClassDeclaration","getName","name","getText","getIdentifiers","Identifier","getSourceFile","fileName","getExpressionWithTypeArgs","context","token","heritageClauses","pMapSeries","heritageClause","flatMap","h","types","map","type","expressionWithTypeArgs","typeArguments","expression","typeArgsNodes","computeSchema","location","getLocation","expressionNode","visitDefinition","UnresolvedSchema","ExpressionWithTypeArgumentsSchema","transform","className","extendsExpressionsWithTypeArgs","ExtendsKeyword","implementsExpressionsWithTypeArgs","ImplementsKeyword","typeParameters","typeParam","signature","getQuickInfoDisplayString","undefined","members","member","isPrivate","modifiers","some","modifier","PrivateKeyword","doc","jsDocToDocSchema","Error","ClassSchema","compact","exports"],"sources":["class-declaration.ts"],"sourcesContent":["import pMapSeries from 'p-map-series';\nimport { compact } from 'lodash';\nimport {\n ClassSchema,\n UnresolvedSchema,\n ExpressionWithTypeArgumentsSchema,\n} from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, ClassDeclaration } from 'typescript';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { Identifier } from '../identifier';\n\nexport class ClassDeclarationTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === ts.SyntaxKind.ClassDeclaration;\n }\n\n // @todo: in case of `export default class` the class has no name.\n private getName(node: ClassDeclaration) {\n return node.name?.getText() || 'default';\n }\n\n async getIdentifiers(node: ClassDeclaration) {\n return [new Identifier(this.getName(node), node.getSourceFile().fileName)];\n }\n\n private async getExpressionWithTypeArgs(\n node: ClassDeclaration,\n context: SchemaExtractorContext,\n token: ts.SyntaxKind.ExtendsKeyword | ts.SyntaxKind.ImplementsKeyword\n ) {\n if (!node.heritageClauses) return [];\n\n return pMapSeries(\n node.heritageClauses\n .filter((heritageClause: ts.HeritageClause) => heritageClause.token === token)\n .flatMap((h: ts.HeritageClause) => {\n const { types } = h;\n const name = h.getText();\n return types.map((type) => ({ ...type, name }));\n }),\n async (expressionWithTypeArgs: ts.ExpressionWithTypeArguments & { name: string }) => {\n const { typeArguments, expression, name } = expressionWithTypeArgs;\n const typeArgsNodes = typeArguments ? await pMapSeries(typeArguments, (t) => context.computeSchema(t)) : [];\n const location = context.getLocation(expression);\n const expressionNode =\n (await context.visitDefinition(expression)) || new UnresolvedSchema(location, expression.getText());\n return new ExpressionWithTypeArgumentsSchema(typeArgsNodes, expressionNode, name, location);\n }\n );\n }\n\n async transform(node: ClassDeclaration, context: SchemaExtractorContext) {\n const className = this.getName(node);\n const extendsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(\n node,\n context,\n ts.SyntaxKind.ExtendsKeyword\n );\n\n const implementsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(\n node,\n context,\n ts.SyntaxKind.ImplementsKeyword\n );\n\n const typeParameters = node.typeParameters?.map((typeParam) => {\n return typeParam.name.getText();\n });\n const signature = node.name ? await context.getQuickInfoDisplayString(node.name) : undefined;\n const members = await pMapSeries(node.members, async (member) => {\n const isPrivate = member.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.PrivateKeyword);\n if (isPrivate) {\n return null;\n }\n return context.computeSchema(member);\n });\n const doc = await context.jsDocToDocSchema(node);\n\n if (!signature) {\n throw Error(`Missing signature for class ${className} declaration`);\n }\n\n return new ClassSchema(\n className,\n compact(members),\n context.getLocation(node),\n signature,\n doc,\n typeParameters,\n extendsExpressionsWithTypeArgs,\n implementsExpressionsWithTypeArgs\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,mBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,kBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,SAAAC,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,Q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AAC,CAAC;IACjC,CAAC,CAAC;IACF,MAAMmC,SAAS,GAAG1C,IAAI,CAACM,IAAI,GAAG,MAAMO,OAAO,CAAC8B,yBAAyB,CAAC3C,IAAI,CAACM,IAAI,CAAC,GAAGsC,SAAS;IAC5F,MAAMC,OAAO,GAAG,MAAM,IAAA7B,qBAAU,EAAChB,IAAI,CAAC6C,OAAO,EAAE,MAAOC,MAAM,IAAK;MAC/D,MAAMC,SAAS,GAAGD,MAAM,CAACE,SAAS,EAAEC,IAAI,CAAEC,QAAQ,IAAKA,QAAQ,CAACjD,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACgD,cAAc,CAAC;MACtG,IAAIJ,SAAS,EAAE;QACb,OAAO,IAAI;MACb;MACA,OAAOlC,OAAO,CAACc,aAAa,CAACmB,MAAM,CAAC;IACtC,CAAC,CAAC;IACF,MAAMM,GAAG,GAAG,MAAMvC,OAAO,CAACwC,gBAAgB,CAACrD,IAAI,CAAC;IAEhD,IAAI,CAAC0C,SAAS,EAAE;MACd,MAAMY,KAAK,CAAE,+BAA8BnB,SAAU,cAAa,CAAC;IACrE;IAEA,OAAO,KAAIoB,gCAAW,EACpBpB,SAAS,EACT,IAAAqB,iBAAO,EAACX,OAAO,CAAC,EAChBhC,OAAO,CAACgB,WAAW,CAAC7B,IAAI,CAAC,EACzB0C,SAAS,EACTU,GAAG,EACHZ,cAAc,EACdJ,8BAA8B,EAC9BE,iCACF,CAAC;EACH;AACF;AAACmB,OAAA,CAAA3D,2BAAA,GAAAA,2BAAA"}
|
|
1
|
+
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_lodash","_semanticsEntities","_typescript","_identifier","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","ClassDeclarationTransformer","predicate","node","kind","ts","SyntaxKind","ClassDeclaration","getName","name","getText","getIdentifiers","Identifier","getSourceFile","fileName","getExpressionWithTypeArgs","context","token","heritageClauses","pMapSeries","heritageClause","flatMap","h","types","map","type","expressionWithTypeArgs","typeArguments","expression","typeArgsNodes","computeSchema","location","getLocation","expressionNode","visitDefinition","UnresolvedSchema","ExpressionWithTypeArgumentsSchema","transform","decorators","decorator","undefined","className","extendsExpressionsWithTypeArgs","ExtendsKeyword","implementsExpressionsWithTypeArgs","ImplementsKeyword","typeParameters","typeParam","signature","getQuickInfoDisplayString","members","member","isPrivate","modifiers","some","modifier","PrivateKeyword","doc","jsDocToDocSchema","Error","ClassSchema","compact","exports"],"sources":["class-declaration.ts"],"sourcesContent":["import pMapSeries from 'p-map-series';\nimport { compact } from 'lodash';\nimport {\n ClassSchema,\n UnresolvedSchema,\n ExpressionWithTypeArgumentsSchema,\n} from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, ClassDeclaration } from 'typescript';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { Identifier } from '../identifier';\n\nexport class ClassDeclarationTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === ts.SyntaxKind.ClassDeclaration;\n }\n\n // @todo: in case of `export default class` the class has no name.\n private getName(node: ClassDeclaration) {\n return node.name?.getText() || 'default';\n }\n\n async getIdentifiers(node: ClassDeclaration) {\n return [new Identifier(this.getName(node), node.getSourceFile().fileName)];\n }\n\n private async getExpressionWithTypeArgs(\n node: ClassDeclaration,\n context: SchemaExtractorContext,\n token: ts.SyntaxKind.ExtendsKeyword | ts.SyntaxKind.ImplementsKeyword\n ) {\n if (!node.heritageClauses) return [];\n\n return pMapSeries(\n node.heritageClauses\n .filter((heritageClause: ts.HeritageClause) => heritageClause.token === token)\n .flatMap((h: ts.HeritageClause) => {\n const { types } = h;\n const name = h.getText();\n return types.map((type) => ({ ...type, name }));\n }),\n async (expressionWithTypeArgs: ts.ExpressionWithTypeArguments & { name: string }) => {\n const { typeArguments, expression, name } = expressionWithTypeArgs;\n const typeArgsNodes = typeArguments ? await pMapSeries(typeArguments, (t) => context.computeSchema(t)) : [];\n const location = context.getLocation(expression);\n const expressionNode =\n (await context.visitDefinition(expression)) || new UnresolvedSchema(location, expression.getText());\n return new ExpressionWithTypeArgumentsSchema(typeArgsNodes, expressionNode, name, location);\n }\n );\n }\n\n async transform(node: ClassDeclaration, context: SchemaExtractorContext) {\n const decorators = node.decorators?.length\n ? await pMapSeries(node.decorators, (decorator) => context.computeSchema(decorator))\n : undefined;\n const className = this.getName(node);\n const extendsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(\n node,\n context,\n ts.SyntaxKind.ExtendsKeyword\n );\n\n const implementsExpressionsWithTypeArgs = await this.getExpressionWithTypeArgs(\n node,\n context,\n ts.SyntaxKind.ImplementsKeyword\n );\n\n const typeParameters = node.typeParameters?.map((typeParam) => {\n return typeParam.name.getText();\n });\n const signature = node.name ? await context.getQuickInfoDisplayString(node.name) : undefined;\n const members = await pMapSeries(node.members, async (member) => {\n const isPrivate = member.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.PrivateKeyword);\n if (isPrivate) {\n return null;\n }\n return context.computeSchema(member);\n });\n const doc = await context.jsDocToDocSchema(node);\n\n if (!signature) {\n throw Error(`Missing signature for class ${className} declaration`);\n }\n\n return new ClassSchema(\n className,\n compact(members),\n context.getLocation(node),\n signature,\n doc,\n typeParameters,\n extendsExpressionsWithTypeArgs,\n implementsExpressionsWithTypeArgs,\n decorators\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CA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,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACkD,cAAc,CAAC;MACtG,IAAIJ,SAAS,EAAE;QACb,OAAO,IAAI;MACb;MACA,OAAOpC,OAAO,CAACc,aAAa,CAACqB,MAAM,CAAC;IACtC,CAAC,CAAC;IACF,MAAMM,GAAG,GAAG,MAAMzC,OAAO,CAAC0C,gBAAgB,CAACvD,IAAI,CAAC;IAEhD,IAAI,CAAC6C,SAAS,EAAE;MACd,MAAMW,KAAK,CAAE,+BAA8BlB,SAAU,cAAa,CAAC;IACrE;IAEA,OAAO,KAAImB,gCAAW,EACpBnB,SAAS,EACT,IAAAoB,iBAAO,EAACX,OAAO,CAAC,EAChBlC,OAAO,CAACgB,WAAW,CAAC7B,IAAI,CAAC,EACzB6C,SAAS,EACTS,GAAG,EACHX,cAAc,EACdJ,8BAA8B,EAC9BE,iCAAiC,EACjCN,UACF,CAAC;EACH;AACF;AAACwB,OAAA,CAAA7D,2BAAA,GAAAA,2BAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
+
import { Decorator, Node } from 'typescript';
|
|
3
|
+
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
4
|
+
import { SchemaTransformer } from '../schema-transformer';
|
|
5
|
+
import { Identifier } from '../identifier';
|
|
6
|
+
export declare class DecoratorTransformer implements SchemaTransformer {
|
|
7
|
+
predicate(node: Node): boolean;
|
|
8
|
+
getIdentifiers(decorator: Decorator): Promise<Identifier[]>;
|
|
9
|
+
transform(node: Decorator, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DecoratorTransformer = void 0;
|
|
7
|
+
function _semanticsEntities() {
|
|
8
|
+
const data = require("@teambit/semantics.entities.semantic-schema");
|
|
9
|
+
_semanticsEntities = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _typescript() {
|
|
15
|
+
const data = _interopRequireDefault(require("typescript"));
|
|
16
|
+
_typescript = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _pMapSeries() {
|
|
22
|
+
const data = _interopRequireDefault(require("p-map-series"));
|
|
23
|
+
_pMapSeries = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _identifier() {
|
|
29
|
+
const data = require("../identifier");
|
|
30
|
+
_identifier = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
+
class DecoratorTransformer {
|
|
37
|
+
predicate(node) {
|
|
38
|
+
return node.kind === _typescript().default.SyntaxKind.Decorator;
|
|
39
|
+
}
|
|
40
|
+
async getIdentifiers(decorator) {
|
|
41
|
+
const identifierText = decorator.expression.getFirstToken()?.getText() || '';
|
|
42
|
+
return [new (_identifier().Identifier)(identifierText, decorator.getSourceFile().fileName)];
|
|
43
|
+
}
|
|
44
|
+
async transform(node, context) {
|
|
45
|
+
const name = node.expression.getFirstToken()?.getText() || '';
|
|
46
|
+
const location = context.getLocation(node);
|
|
47
|
+
const doc = await context.jsDocToDocSchema(node);
|
|
48
|
+
const args = _typescript().default.isCallExpression(node.expression) && node.expression.arguments.length ? await (0, _pMapSeries().default)(node.expression.arguments, arg => context.computeSchema(arg)) : undefined;
|
|
49
|
+
return new (_semanticsEntities().DecoratorSchema)(location, name, doc, args);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.DecoratorTransformer = DecoratorTransformer;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_interopRequireDefault","_pMapSeries","_identifier","obj","__esModule","default","DecoratorTransformer","predicate","node","kind","ts","SyntaxKind","Decorator","getIdentifiers","decorator","identifierText","expression","getFirstToken","getText","Identifier","getSourceFile","fileName","transform","context","name","location","getLocation","doc","jsDocToDocSchema","args","isCallExpression","arguments","length","pMapSeries","arg","computeSchema","undefined","DecoratorSchema","exports"],"sources":["decorator.ts"],"sourcesContent":["import { DecoratorSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Decorator, Node } from 'typescript';\nimport pMapSeries from 'p-map-series';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { Identifier } from '../identifier';\n\nexport class DecoratorTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === ts.SyntaxKind.Decorator;\n }\n\n async getIdentifiers(decorator: Decorator) {\n const identifierText = decorator.expression.getFirstToken()?.getText() || '';\n return [new Identifier(identifierText, decorator.getSourceFile().fileName)];\n }\n\n async transform(node: Decorator, context: SchemaExtractorContext): Promise<SchemaNode> {\n const name = node.expression.getFirstToken()?.getText() || '';\n const location = context.getLocation(node);\n const doc = await context.jsDocToDocSchema(node);\n const args =\n ts.isCallExpression(node.expression) && node.expression.arguments.length\n ? await pMapSeries(node.expression.arguments, (arg) => context.computeSchema(arg))\n : undefined;\n return new DecoratorSchema(location, name, doc, args);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA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,MAAM,GACpE,MAAM,IAAAC,qBAAU,EAACzB,IAAI,CAACQ,UAAU,CAACe,SAAS,EAAGG,GAAG,IAAKX,OAAO,CAACY,aAAa,CAACD,GAAG,CAAC,CAAC,GAChFE,SAAS;IACf,OAAO,KAAIC,oCAAe,EAACZ,QAAQ,EAAED,IAAI,EAAEG,GAAG,EAAEE,IAAI,CAAC;EACvD;AACF;AAACS,OAAA,CAAAhC,oBAAA,GAAAA,oBAAA"}
|
|
@@ -70,7 +70,8 @@ class FunctionLikeTransformer {
|
|
|
70
70
|
const typeParameters = node.typeParameters?.map(typeParam => typeParam.name.getText());
|
|
71
71
|
const location = context.getLocation(node);
|
|
72
72
|
const doc = await context.jsDocToDocSchema(node);
|
|
73
|
-
|
|
73
|
+
const decorators = node.decorators?.length ? await (0, _pMapSeries().default)(node.decorators, decorator => context.computeSchema(decorator)) : undefined;
|
|
74
|
+
return new (_semanticsEntities().FunctionLikeSchema)(location, name, args, returnType, displaySig, modifiers, doc, typeParameters, decorators);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
exports.FunctionLikeTransformer = FunctionLikeTransformer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_interopRequireDefault","_pMapSeries","_parseTypeFromQuickInfo","_identifier","obj","__esModule","default","FunctionLikeTransformer","predicate","node","kind","ts","SyntaxKind","FunctionDeclaration","ArrowFunction","MethodDeclaration","CallSignature","ConstructSignature","FunctionType","MethodSignature","getIdentifiers","funcDec","Identifier","getName","getSourceFile","fileName","name","getText","transform","context","getQuickInfoFromDefaultModifier","defaultModifier","modifiers","find","modifier","DefaultKeyword","getQuickInfo","equalsGreaterThanToken","info","returnTypeStr","parseTypeFromQuickInfo","displaySig","body","displayString","args","pMapSeries","parameters","param","computeSchema","returnType","resolveType","Boolean","map","typeParameters","typeParam","location","getLocation","doc","jsDocToDocSchema","FunctionLikeSchema","exports"],"sources":["function-like.ts"],"sourcesContent":["import { FunctionLikeSchema, ParameterSchema, SchemaNode, Modifier } from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, SignatureDeclaration } from 'typescript';\nimport pMapSeries from 'p-map-series';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { parseTypeFromQuickInfo } from './utils/parse-type-from-quick-info';\nimport { Identifier } from '../identifier';\n\nexport class FunctionLikeTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return (\n node.kind === ts.SyntaxKind.FunctionDeclaration ||\n node.kind === ts.SyntaxKind.ArrowFunction ||\n node.kind === ts.SyntaxKind.MethodDeclaration ||\n node.kind === ts.SyntaxKind.CallSignature ||\n node.kind === ts.SyntaxKind.ConstructSignature ||\n node.kind === ts.SyntaxKind.FunctionType ||\n node.kind === ts.SyntaxKind.MethodSignature\n );\n }\n\n // need to check for anonymous functions assigned for vars, const and let.\n async getIdentifiers(funcDec: SignatureDeclaration) {\n return [new Identifier(this.getName(funcDec), funcDec.getSourceFile().fileName)];\n }\n\n private getName(funcDec: SignatureDeclaration) {\n if (funcDec.kind === ts.SyntaxKind.ConstructSignature) return 'new';\n return funcDec.name?.getText() || '';\n }\n\n async transform(node: SignatureDeclaration, context: SchemaExtractorContext): Promise<SchemaNode> {\n const name = this.getName(node);\n const getQuickInfoFromDefaultModifier = async () => {\n const defaultModifier = node.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.DefaultKeyword);\n if (defaultModifier) return context.getQuickInfo(defaultModifier);\n if (node.kind === ts.SyntaxKind.ArrowFunction) return context.getQuickInfo(node.equalsGreaterThanToken);\n return null;\n };\n const info = node.name ? await context.getQuickInfo(node.name) : await getQuickInfoFromDefaultModifier();\n const returnTypeStr = info ? parseTypeFromQuickInfo(info) : 'any';\n const displaySig = info?.body?.displayString || '';\n const args = (await pMapSeries(node.parameters, async (param) =>\n context.computeSchema(param)\n )) as ParameterSchema[];\n\n const returnType = await context.resolveType(node, returnTypeStr, Boolean(info));\n const modifiers = node.modifiers?.map((modifier) => modifier.getText()) || [];\n const typeParameters = node.typeParameters?.map((typeParam) => typeParam.name.getText());\n const location = context.getLocation(node);\n const doc = await context.jsDocToDocSchema(node);\n\n return new FunctionLikeSchema(\n location,\n name,\n args,\n returnType,\n displaySig,\n modifiers as Modifier[],\n doc,\n typeParameters\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,wBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,uBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,SAAAG,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEpC,MAAMG,uBAAuB,CAA8B;EAChEC,SAASA,CAACC,IAAU,EAAE;IACpB,OACEA,IAAI,CAACC,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACC,mBAAmB,IAC/CJ,IAAI,CAACC,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACE,aAAa,IACzCL,IAAI,CAACC,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,OAAO,IAAI;IACb,CAAC;IACD,MAAMC,IAAI,GAAG7B,IAAI,CAACiB,IAAI,GAAG,MAAMG,OAAO,CAACO,YAAY,CAAC3B,IAAI,CAACiB,IAAI,CAAC,GAAG,MAAMI,+BAA+B,CAAC,CAAC;IACxG,MAAMS,aAAa,GAAGD,IAAI,GAAG,IAAAE,gDAAsB,EAACF,IAAI,CAAC,GAAG,KAAK;IACjE,MAAMG,UAAU,GAAGH,IAAI,EAAEI,IAAI,EAAEC,aAAa,IAAI,EAAE;IAClD,MAAMC,IAAI,GAAI,MAAM,IAAAC,qBAAU,EAACpC,IAAI,CAACqC,UAAU,EAAE,MAAOC,KAAK,IAC1DlB,OAAO,CAACmB,aAAa,CAACD,KAAK,CAC7B,CAAuB;IAEvB,MAAME,UAAU,GAAG,MAAMpB,OAAO,CAACqB,WAAW,CAACzC,IAAI,EAAE8B,aAAa,EAAEY,OAAO,CAACb,IAAI,CAAC,CAAC;IAChF,MAAMN,SAAS,GAAGvB,IAAI,CAACuB,SAAS,EAAEoB,GAAG,CAAElB,QAAQ,IAAKA,QAAQ,CAACP,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE;IAC7E,MAAM0B,cAAc,GAAG5C,IAAI,CAAC4C,cAAc,EAAED,GAAG,CAAEE,SAAS,IAAKA,SAAS,CAAC5B,IAAI,CAACC,OAAO,CAAC,CAAC,CAAC;IACxF,MAAM4B,QAAQ,GAAG1B,OAAO,CAAC2B,WAAW,CAAC/C,IAAI,CAAC;IAC1C,MAAMgD,GAAG,GAAG,MAAM5B,OAAO,CAAC6B,gBAAgB,CAACjD,IAAI,CAAC;
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_interopRequireDefault","_pMapSeries","_parseTypeFromQuickInfo","_identifier","obj","__esModule","default","FunctionLikeTransformer","predicate","node","kind","ts","SyntaxKind","FunctionDeclaration","ArrowFunction","MethodDeclaration","CallSignature","ConstructSignature","FunctionType","MethodSignature","getIdentifiers","funcDec","Identifier","getName","getSourceFile","fileName","name","getText","transform","context","getQuickInfoFromDefaultModifier","defaultModifier","modifiers","find","modifier","DefaultKeyword","getQuickInfo","equalsGreaterThanToken","info","returnTypeStr","parseTypeFromQuickInfo","displaySig","body","displayString","args","pMapSeries","parameters","param","computeSchema","returnType","resolveType","Boolean","map","typeParameters","typeParam","location","getLocation","doc","jsDocToDocSchema","decorators","length","decorator","undefined","FunctionLikeSchema","exports"],"sources":["function-like.ts"],"sourcesContent":["import { FunctionLikeSchema, ParameterSchema, SchemaNode, Modifier } from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, SignatureDeclaration } from 'typescript';\nimport pMapSeries from 'p-map-series';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { parseTypeFromQuickInfo } from './utils/parse-type-from-quick-info';\nimport { Identifier } from '../identifier';\n\nexport class FunctionLikeTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return (\n node.kind === ts.SyntaxKind.FunctionDeclaration ||\n node.kind === ts.SyntaxKind.ArrowFunction ||\n node.kind === ts.SyntaxKind.MethodDeclaration ||\n node.kind === ts.SyntaxKind.CallSignature ||\n node.kind === ts.SyntaxKind.ConstructSignature ||\n node.kind === ts.SyntaxKind.FunctionType ||\n node.kind === ts.SyntaxKind.MethodSignature\n );\n }\n\n // need to check for anonymous functions assigned for vars, const and let.\n async getIdentifiers(funcDec: SignatureDeclaration) {\n return [new Identifier(this.getName(funcDec), funcDec.getSourceFile().fileName)];\n }\n\n private getName(funcDec: SignatureDeclaration) {\n if (funcDec.kind === ts.SyntaxKind.ConstructSignature) return 'new';\n return funcDec.name?.getText() || '';\n }\n\n async transform(node: SignatureDeclaration, context: SchemaExtractorContext): Promise<SchemaNode> {\n const name = this.getName(node);\n const getQuickInfoFromDefaultModifier = async () => {\n const defaultModifier = node.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.DefaultKeyword);\n if (defaultModifier) return context.getQuickInfo(defaultModifier);\n if (node.kind === ts.SyntaxKind.ArrowFunction) return context.getQuickInfo(node.equalsGreaterThanToken);\n return null;\n };\n const info = node.name ? await context.getQuickInfo(node.name) : await getQuickInfoFromDefaultModifier();\n const returnTypeStr = info ? parseTypeFromQuickInfo(info) : 'any';\n const displaySig = info?.body?.displayString || '';\n const args = (await pMapSeries(node.parameters, async (param) =>\n context.computeSchema(param)\n )) as ParameterSchema[];\n\n const returnType = await context.resolveType(node, returnTypeStr, Boolean(info));\n const modifiers = node.modifiers?.map((modifier) => modifier.getText()) || [];\n const typeParameters = node.typeParameters?.map((typeParam) => typeParam.name.getText());\n const location = context.getLocation(node);\n const doc = await context.jsDocToDocSchema(node);\n const decorators = node.decorators?.length\n ? await pMapSeries(node.decorators, (decorator) => context.computeSchema(decorator))\n : undefined;\n\n return new FunctionLikeSchema(\n location,\n name,\n args,\n returnType,\n displaySig,\n modifiers as Modifier[],\n doc,\n typeParameters,\n decorators\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,wBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,uBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;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ACxF,MAAM4B,QAAQ,GAAG1B,OAAO,CAAC2B,WAAW,CAAC/C,IAAI,CAAC;IAC1C,MAAMgD,GAAG,GAAG,MAAM5B,OAAO,CAAC6B,gBAAgB,CAACjD,IAAI,CAAC;IAChD,MAAMkD,UAAU,GAAGlD,IAAI,CAACkD,UAAU,EAAEC,MAAM,GACtC,MAAM,IAAAf,qBAAU,EAACpC,IAAI,CAACkD,UAAU,EAAGE,SAAS,IAAKhC,OAAO,CAACmB,aAAa,CAACa,SAAS,CAAC,CAAC,GAClFC,SAAS;IAEb,OAAO,KAAIC,uCAAkB,EAC3BR,QAAQ,EACR7B,IAAI,EACJkB,IAAI,EACJK,UAAU,EACVR,UAAU,EACVT,SAAS,EACTyB,GAAG,EACHJ,cAAc,EACdM,UACF,CAAC;EACH;AACF;AAACK,OAAA,CAAAzD,uBAAA,GAAAA,uBAAA"}
|
|
@@ -36,3 +36,8 @@ export { ExportAssignmentTransformer } from './export-assignment';
|
|
|
36
36
|
export { ImportDeclarationTransformer } from './import-declaration';
|
|
37
37
|
export { ExpressionStatementTransformer } from './expression-statement';
|
|
38
38
|
export { ModuleDeclarationTransformer } from './module-declaration';
|
|
39
|
+
export { DecoratorTransformer } from './decorator';
|
|
40
|
+
export { ArrayLiteralExpressionTransformer } from './array-literal-expression';
|
|
41
|
+
export { ObjectLiteralExpressionTransformer } from './object-literal-expression';
|
|
42
|
+
export { PropertyAssignmentTransformer } from './property-assignment';
|
|
43
|
+
export { LiteralValueTransformer } from './literal-value';
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ArrayLiteralExpressionTransformer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _arrayLiteralExpression().ArrayLiteralExpressionTransformer;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "ArrayTypeTransformer", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -33,6 +39,12 @@ Object.defineProperty(exports, "ConstructorTransformer", {
|
|
|
33
39
|
return _constructor().ConstructorTransformer;
|
|
34
40
|
}
|
|
35
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "DecoratorTransformer", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _decorator().DecoratorTransformer;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
36
48
|
Object.defineProperty(exports, "EnumDeclarationTransformer", {
|
|
37
49
|
enumerable: true,
|
|
38
50
|
get: function () {
|
|
@@ -111,6 +123,12 @@ Object.defineProperty(exports, "LiteralTypeTransformer", {
|
|
|
111
123
|
return _literalType().LiteralTypeTransformer;
|
|
112
124
|
}
|
|
113
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "LiteralValueTransformer", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _literalValue().LiteralValueTransformer;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
114
132
|
Object.defineProperty(exports, "ModuleDeclarationTransformer", {
|
|
115
133
|
enumerable: true,
|
|
116
134
|
get: function () {
|
|
@@ -123,6 +141,12 @@ Object.defineProperty(exports, "NamedTupleTransformer", {
|
|
|
123
141
|
return _namedTuple().NamedTupleTransformer;
|
|
124
142
|
}
|
|
125
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "ObjectLiteralExpressionTransformer", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _objectLiteralExpression().ObjectLiteralExpressionTransformer;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
126
150
|
Object.defineProperty(exports, "ParameterTransformer", {
|
|
127
151
|
enumerable: true,
|
|
128
152
|
get: function () {
|
|
@@ -135,6 +159,12 @@ Object.defineProperty(exports, "ParenthesizedTypeTransformer", {
|
|
|
135
159
|
return _parenthesizedType().ParenthesizedTypeTransformer;
|
|
136
160
|
}
|
|
137
161
|
});
|
|
162
|
+
Object.defineProperty(exports, "PropertyAssignmentTransformer", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _propertyAssignment().PropertyAssignmentTransformer;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
138
168
|
Object.defineProperty(exports, "PropertyDeclarationTransformer", {
|
|
139
169
|
enumerable: true,
|
|
140
170
|
get: function () {
|
|
@@ -497,5 +527,40 @@ function _moduleDeclaration() {
|
|
|
497
527
|
};
|
|
498
528
|
return data;
|
|
499
529
|
}
|
|
530
|
+
function _decorator() {
|
|
531
|
+
const data = require("./decorator");
|
|
532
|
+
_decorator = function () {
|
|
533
|
+
return data;
|
|
534
|
+
};
|
|
535
|
+
return data;
|
|
536
|
+
}
|
|
537
|
+
function _arrayLiteralExpression() {
|
|
538
|
+
const data = require("./array-literal-expression");
|
|
539
|
+
_arrayLiteralExpression = function () {
|
|
540
|
+
return data;
|
|
541
|
+
};
|
|
542
|
+
return data;
|
|
543
|
+
}
|
|
544
|
+
function _objectLiteralExpression() {
|
|
545
|
+
const data = require("./object-literal-expression");
|
|
546
|
+
_objectLiteralExpression = function () {
|
|
547
|
+
return data;
|
|
548
|
+
};
|
|
549
|
+
return data;
|
|
550
|
+
}
|
|
551
|
+
function _propertyAssignment() {
|
|
552
|
+
const data = require("./property-assignment");
|
|
553
|
+
_propertyAssignment = function () {
|
|
554
|
+
return data;
|
|
555
|
+
};
|
|
556
|
+
return data;
|
|
557
|
+
}
|
|
558
|
+
function _literalValue() {
|
|
559
|
+
const data = require("./literal-value");
|
|
560
|
+
_literalValue = function () {
|
|
561
|
+
return data;
|
|
562
|
+
};
|
|
563
|
+
return data;
|
|
564
|
+
}
|
|
500
565
|
|
|
501
566
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_exportDeclaration","data","require","_functionLike","_parameter","_variableStatement","_variableDeclaration","_sourceFileTransformer","_typeAlias","_intersectionType","_unionType","_typeReference","_typeLiteral","_literalType","_typeQuery","_typeOperator","_keywordType","_tupleType","_parenthesizedType","_typePredicate","_indexedAccessType","_templateLiteralTypeSpan","_templateLiteralType","_thisType","_conditionalType","_namedTuple","_arrayType","_classDeclaration","_constructor","_propertyDeclaration","_setAccessor","_getAccessor","_indexSignature","_interfaceDeclaration","_enumDeclaration","_bindingElement","_exportAssignment","_importDeclaration","_expressionStatement","_moduleDeclaration"],"sources":["index.ts"],"sourcesContent":["export { ExportDeclarationTransformer } from './export-declaration';\nexport { FunctionLikeTransformer } from './function-like';\nexport { ParameterTransformer } from './parameter';\nexport { VariableStatementTransformer } from './variable-statement';\nexport { VariableDeclaration } from './variable-declaration';\nexport { SourceFileTransformer } from './source-file-transformer';\nexport { TypeAliasTransformer } from './type-alias';\nexport { IntersectionTypeTransformer } from './intersection-type';\nexport { UnionTypeTransformer } from './union-type';\nexport { TypeReferenceTransformer } from './type-reference';\nexport { TypeLiteralTransformer } from './type-literal';\nexport { LiteralTypeTransformer } from './literal-type';\nexport { TypeQueryTransformer } from './type-query';\nexport { TypeOperatorTransformer } from './type-operator';\nexport { KeywordTypeTransformer } from './keyword-type';\nexport { TupleTypeTransformer } from './tuple-type';\nexport { ParenthesizedTypeTransformer } from './parenthesized-type';\nexport { TypePredicateTransformer } from './type-predicate';\nexport { IndexedAccessTypeTransformer } from './indexed-access-type';\nexport { TemplateLiteralTypeSpanTransformer } from './template-literal-type-span';\nexport { TemplateLiteralTypeTransformer } from './template-literal-type';\nexport { ThisTypeTransformer } from './this-type';\nexport { ConditionalTypeTransformer } from './conditional-type';\nexport { NamedTupleTransformer } from './named-tuple';\nexport { ArrayTypeTransformer } from './array-type';\nexport { ClassDeclarationTransformer } from './class-declaration';\nexport { ConstructorTransformer } from './constructor';\nexport { PropertyDeclarationTransformer } from './property-declaration';\nexport { SetAccessorTransformer } from './set-accessor';\nexport { GetAccessorTransformer } from './get-accessor';\nexport { IndexSignatureTransformer } from './index-signature';\nexport { InterfaceDeclarationTransformer } from './interface-declaration';\nexport { EnumDeclarationTransformer } from './enum-declaration';\nexport { BindingElementTransformer } from './binding-element';\nexport { ExportAssignmentTransformer } from './export-assignment';\nexport { ImportDeclarationTransformer } from './import-declaration';\nexport { ExpressionStatementTransformer } from './expression-statement';\nexport { ModuleDeclarationTransformer } from './module-declaration';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_exportDeclaration","data","require","_functionLike","_parameter","_variableStatement","_variableDeclaration","_sourceFileTransformer","_typeAlias","_intersectionType","_unionType","_typeReference","_typeLiteral","_literalType","_typeQuery","_typeOperator","_keywordType","_tupleType","_parenthesizedType","_typePredicate","_indexedAccessType","_templateLiteralTypeSpan","_templateLiteralType","_thisType","_conditionalType","_namedTuple","_arrayType","_classDeclaration","_constructor","_propertyDeclaration","_setAccessor","_getAccessor","_indexSignature","_interfaceDeclaration","_enumDeclaration","_bindingElement","_exportAssignment","_importDeclaration","_expressionStatement","_moduleDeclaration","_decorator","_arrayLiteralExpression","_objectLiteralExpression","_propertyAssignment","_literalValue"],"sources":["index.ts"],"sourcesContent":["export { ExportDeclarationTransformer } from './export-declaration';\nexport { FunctionLikeTransformer } from './function-like';\nexport { ParameterTransformer } from './parameter';\nexport { VariableStatementTransformer } from './variable-statement';\nexport { VariableDeclaration } from './variable-declaration';\nexport { SourceFileTransformer } from './source-file-transformer';\nexport { TypeAliasTransformer } from './type-alias';\nexport { IntersectionTypeTransformer } from './intersection-type';\nexport { UnionTypeTransformer } from './union-type';\nexport { TypeReferenceTransformer } from './type-reference';\nexport { TypeLiteralTransformer } from './type-literal';\nexport { LiteralTypeTransformer } from './literal-type';\nexport { TypeQueryTransformer } from './type-query';\nexport { TypeOperatorTransformer } from './type-operator';\nexport { KeywordTypeTransformer } from './keyword-type';\nexport { TupleTypeTransformer } from './tuple-type';\nexport { ParenthesizedTypeTransformer } from './parenthesized-type';\nexport { TypePredicateTransformer } from './type-predicate';\nexport { IndexedAccessTypeTransformer } from './indexed-access-type';\nexport { TemplateLiteralTypeSpanTransformer } from './template-literal-type-span';\nexport { TemplateLiteralTypeTransformer } from './template-literal-type';\nexport { ThisTypeTransformer } from './this-type';\nexport { ConditionalTypeTransformer } from './conditional-type';\nexport { NamedTupleTransformer } from './named-tuple';\nexport { ArrayTypeTransformer } from './array-type';\nexport { ClassDeclarationTransformer } from './class-declaration';\nexport { ConstructorTransformer } from './constructor';\nexport { PropertyDeclarationTransformer } from './property-declaration';\nexport { SetAccessorTransformer } from './set-accessor';\nexport { GetAccessorTransformer } from './get-accessor';\nexport { IndexSignatureTransformer } from './index-signature';\nexport { InterfaceDeclarationTransformer } from './interface-declaration';\nexport { EnumDeclarationTransformer } from './enum-declaration';\nexport { BindingElementTransformer } from './binding-element';\nexport { ExportAssignmentTransformer } from './export-assignment';\nexport { ImportDeclarationTransformer } from './import-declaration';\nexport { ExpressionStatementTransformer } from './expression-statement';\nexport { ModuleDeclarationTransformer } from './module-declaration';\nexport { DecoratorTransformer } from './decorator';\nexport { ArrayLiteralExpressionTransformer } from './array-literal-expression';\nexport { ObjectLiteralExpressionTransformer } from './object-literal-expression';\nexport { PropertyAssignmentTransformer } from './property-assignment';\nexport { LiteralValueTransformer } from './literal-value';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAC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UAAA,YAAAA,CAAA;IAAA,OAAAvC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAwC,wBAAA;EAAA,MAAAxC,IAAA,GAAAC,OAAA;EAAAuC,uBAAA,YAAAA,CAAA;IAAA,OAAAxC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAyC,yBAAA;EAAA,MAAAzC,IAAA,GAAAC,OAAA;EAAAwC,wBAAA,YAAAA,CAAA;IAAA,OAAAzC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAA0C,oBAAA;EAAA,MAAA1C,IAAA,GAAAC,OAAA;EAAAyC,mBAAA,YAAAA,CAAA;IAAA,OAAA1C,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAA2C,cAAA;EAAA,MAAA3C,IAAA,GAAAC,OAAA;EAAA0C,aAAA,YAAAA,CAAA;IAAA,OAAA3C,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
+
import ts, { Node, StringLiteral } from 'typescript';
|
|
3
|
+
import { SchemaExtractorContext, SchemaTransformer } from '..';
|
|
4
|
+
import { Identifier } from '../identifier';
|
|
5
|
+
export type LiteralValueNode = StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.NullLiteral | ts.BigIntLiteral | ts.RegularExpressionLiteral | ts.NewExpression;
|
|
6
|
+
export declare class LiteralValueTransformer implements SchemaTransformer {
|
|
7
|
+
predicate(node: Node): boolean;
|
|
8
|
+
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
+
transform(node: LiteralValueNode, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LiteralValueTransformer = void 0;
|
|
7
|
+
function _semanticsEntities() {
|
|
8
|
+
const data = require("@teambit/semantics.entities.semantic-schema");
|
|
9
|
+
_semanticsEntities = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _typescript() {
|
|
15
|
+
const data = _interopRequireDefault(require("typescript"));
|
|
16
|
+
_typescript = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
class LiteralValueTransformer {
|
|
23
|
+
predicate(node) {
|
|
24
|
+
return node.kind === _typescript().default.SyntaxKind.StringLiteral || node.kind === _typescript().default.SyntaxKind.NumericLiteral || node.kind === _typescript().default.SyntaxKind.TrueKeyword || node.kind === _typescript().default.SyntaxKind.FalseKeyword || node.kind === _typescript().default.SyntaxKind.NullKeyword || node.kind === _typescript().default.SyntaxKind.UndefinedKeyword || node.kind === _typescript().default.SyntaxKind.BigIntLiteral || node.kind === _typescript().default.SyntaxKind.RegularExpressionLiteral || node.kind === _typescript().default.SyntaxKind.NewExpression || node.kind === _typescript().default.SyntaxKind.NoSubstitutionTemplateLiteral;
|
|
25
|
+
}
|
|
26
|
+
async getIdentifiers() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
async transform(node, context) {
|
|
30
|
+
return new (_semanticsEntities().LiteralValueSchema)(context.getLocation(node), node.getText());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.LiteralValueTransformer = LiteralValueTransformer;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=literal-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_interopRequireDefault","obj","__esModule","default","LiteralValueTransformer","predicate","node","kind","ts","SyntaxKind","StringLiteral","NumericLiteral","TrueKeyword","FalseKeyword","NullKeyword","UndefinedKeyword","BigIntLiteral","RegularExpressionLiteral","NewExpression","NoSubstitutionTemplateLiteral","getIdentifiers","transform","context","LiteralValueSchema","getLocation","getText","exports"],"sources":["literal-value.ts"],"sourcesContent":["import { LiteralValueSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, StringLiteral } from 'typescript';\nimport { SchemaExtractorContext, SchemaTransformer } from '..';\nimport { Identifier } from '../identifier';\n\nexport type LiteralValueNode =\n | StringLiteral\n | ts.NumericLiteral\n | ts.TrueLiteral\n | ts.FalseLiteral\n | ts.NullLiteral\n | ts.BigIntLiteral\n | ts.RegularExpressionLiteral\n | ts.NewExpression;\n\nexport class LiteralValueTransformer implements SchemaTransformer {\n predicate(node: Node): boolean {\n return (\n node.kind === ts.SyntaxKind.StringLiteral ||\n node.kind === ts.SyntaxKind.NumericLiteral ||\n node.kind === ts.SyntaxKind.TrueKeyword ||\n node.kind === ts.SyntaxKind.FalseKeyword ||\n node.kind === ts.SyntaxKind.NullKeyword ||\n node.kind === ts.SyntaxKind.UndefinedKeyword ||\n node.kind === ts.SyntaxKind.BigIntLiteral ||\n node.kind === ts.SyntaxKind.RegularExpressionLiteral ||\n node.kind === ts.SyntaxKind.NewExpression ||\n node.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral\n );\n }\n async getIdentifiers(): Promise<Identifier[]> {\n return [];\n }\n async transform(node: LiteralValueNode, context: SchemaExtractorContext): Promise<SchemaNode> {\n return new LiteralValueSchema(context.getLocation(node), node.getText());\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAA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2
|
+
import { ObjectLiteralExpressionSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
+
import { SchemaExtractorContext, SchemaTransformer } from '..';
|
|
4
|
+
export declare class ObjectLiteralExpressionTransformer implements SchemaTransformer {
|
|
5
|
+
predicate(node: Node): boolean;
|
|
6
|
+
getIdentifiers(): Promise<never[]>;
|
|
7
|
+
transform(node: ObjectLiteralExpression, context: SchemaExtractorContext): Promise<ObjectLiteralExpressionSchema>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ObjectLiteralExpressionTransformer = void 0;
|
|
7
|
+
function _typescript() {
|
|
8
|
+
const data = _interopRequireDefault(require("typescript"));
|
|
9
|
+
_typescript = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _pMapSeries() {
|
|
15
|
+
const data = _interopRequireDefault(require("p-map-series"));
|
|
16
|
+
_pMapSeries = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _semanticsEntities() {
|
|
22
|
+
const data = require("@teambit/semantics.entities.semantic-schema");
|
|
23
|
+
_semanticsEntities = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
class ObjectLiteralExpressionTransformer {
|
|
30
|
+
predicate(node) {
|
|
31
|
+
return node.kind === _typescript().default.SyntaxKind.ObjectLiteralExpression;
|
|
32
|
+
}
|
|
33
|
+
async getIdentifiers() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
async transform(node, context) {
|
|
37
|
+
const properties = await (0, _pMapSeries().default)(node.properties, async prop => {
|
|
38
|
+
const schema = await context.computeSchema(prop);
|
|
39
|
+
if (schema instanceof _semanticsEntities().UnImplementedSchema) {
|
|
40
|
+
const typeRef = await context.resolveType(prop, prop.getText());
|
|
41
|
+
return typeRef;
|
|
42
|
+
}
|
|
43
|
+
return schema;
|
|
44
|
+
});
|
|
45
|
+
const location = context.getLocation(node);
|
|
46
|
+
return new (_semanticsEntities().ObjectLiteralExpressionSchema)(properties, location);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ObjectLiteralExpressionTransformer = ObjectLiteralExpressionTransformer;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=object-literal-expression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_typescript","data","_interopRequireDefault","require","_pMapSeries","_semanticsEntities","obj","__esModule","default","ObjectLiteralExpressionTransformer","predicate","node","kind","ts","SyntaxKind","ObjectLiteralExpression","getIdentifiers","transform","context","properties","pMapSeries","prop","schema","computeSchema","UnImplementedSchema","typeRef","resolveType","getText","location","getLocation","ObjectLiteralExpressionSchema","exports"],"sources":["object-literal-expression.ts"],"sourcesContent":["import ts, { Node, ObjectLiteralExpression } from 'typescript';\nimport pMapSeries from 'p-map-series';\nimport { ObjectLiteralExpressionSchema, UnImplementedSchema } from '@teambit/semantics.entities.semantic-schema';\nimport { SchemaExtractorContext, SchemaTransformer } from '..';\n\nexport class ObjectLiteralExpressionTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === ts.SyntaxKind.ObjectLiteralExpression;\n }\n\n async getIdentifiers() {\n return [];\n }\n\n async transform(node: ObjectLiteralExpression, context: SchemaExtractorContext) {\n const properties = await pMapSeries(node.properties, async (prop) => {\n const schema = await context.computeSchema(prop);\n if (schema instanceof UnImplementedSchema) {\n const typeRef = await context.resolveType(prop, prop.getText());\n return typeRef;\n }\n return schema;\n });\n const location = context.getLocation(node);\n return new ObjectLiteralExpressionSchema(properties, location);\n }\n}\n"],"mappings":";;;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,KAAImB,kDAA6B,EAACX,UAAU,EAAES,QAAQ,CAAC;EAChE;AACF;AAACG,OAAA,CAAAtB,kCAAA,GAAAA,kCAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node, PropertyAssignment } from 'typescript';
|
|
2
|
+
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
3
|
+
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
+
import { Identifier } from '../identifier';
|
|
5
|
+
export declare class PropertyAssignmentTransformer implements SchemaTransformer {
|
|
6
|
+
predicate(node: Node): boolean;
|
|
7
|
+
getIdentifiers(): Promise<Identifier[]>;
|
|
8
|
+
transform(node: PropertyAssignment, context: SchemaExtractorContext): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PropertyAssignmentTransformer = void 0;
|
|
7
|
+
function _semanticsEntities() {
|
|
8
|
+
const data = require("@teambit/semantics.entities.semantic-schema");
|
|
9
|
+
_semanticsEntities = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _typescript() {
|
|
15
|
+
const data = _interopRequireDefault(require("typescript"));
|
|
16
|
+
_typescript = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
class PropertyAssignmentTransformer {
|
|
23
|
+
predicate(node) {
|
|
24
|
+
return node.kind === _typescript().default.SyntaxKind.PropertyAssignment;
|
|
25
|
+
}
|
|
26
|
+
async getIdentifiers() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
async transform(node, context) {
|
|
30
|
+
const name = node.name.getText();
|
|
31
|
+
const value = await context.computeSchema(node.initializer);
|
|
32
|
+
const location = context.getLocation(node);
|
|
33
|
+
const docs = await context.jsDocToDocSchema(node);
|
|
34
|
+
return new (_semanticsEntities().PropertyAssignmentSchema)(name, value, location, docs);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.PropertyAssignmentTransformer = PropertyAssignmentTransformer;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=property-assignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_interopRequireDefault","obj","__esModule","default","PropertyAssignmentTransformer","predicate","node","kind","ts","SyntaxKind","PropertyAssignment","getIdentifiers","transform","context","name","getText","value","computeSchema","initializer","location","getLocation","docs","jsDocToDocSchema","PropertyAssignmentSchema","exports"],"sources":["property-assignment.ts"],"sourcesContent":["import { PropertyAssignmentSchema } from '@teambit/semantics.entities.semantic-schema';\nimport ts, { Node, PropertyAssignment } from 'typescript';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\nimport { Identifier } from '../identifier';\n\nexport class PropertyAssignmentTransformer implements SchemaTransformer {\n predicate(node: Node): boolean {\n return node.kind === ts.SyntaxKind.PropertyAssignment;\n }\n\n async getIdentifiers(): Promise<Identifier[]> {\n return [];\n }\n\n async transform(node: PropertyAssignment, context: SchemaExtractorContext): Promise<any> {\n const name = node.name.getText();\n const value = await context.computeSchema(node.initializer);\n const location = context.getLocation(node);\n const docs = await context.jsDocToDocSchema(node);\n return new PropertyAssignmentSchema(name, value, location, docs);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0D,SAAAG,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKnD,MAAMG,6BAA6B,CAA8B;EACtEC,SAASA,CAACC,IAAU,EAAW;IAC7B,OAAOA,IAAI,CAACC,IAAI,KAAKC,qBAAE,CAACC,UAAU,CAACC,kBAAkB;EACvD;EAEA,MAAMC,cAAcA,CAAA,EAA0B;IAC5C,OAAO,EAAE;EACX;EAEA,MAAMC,SAASA,CAACN,IAAwB,EAAEO,OAA+B,EAAgB;IACvF,MAAMC,IAAI,GAAGR,IAAI,CAACQ,IAAI,CAACC,OAAO,CAAC,CAAC;IAChC,MAAMC,KAAK,GAAG,MAAMH,OAAO,CAACI,aAAa,CAACX,IAAI,CAACY,WAAW,CAAC;IAC3D,MAAMC,QAAQ,GAAGN,OAAO,CAACO,WAAW,CAACd,IAAI,CAAC;IAC1C,MAAMe,IAAI,GAAG,MAAMR,OAAO,CAACS,gBAAgB,CAAChB,IAAI,CAAC;IACjD,OAAO,KAAIiB,6CAAwB,EAACT,IAAI,EAAEE,KAAK,EAAEG,QAAQ,EAAEE,IAAI,CAAC;EAClE;AACF;AAACG,OAAA,CAAApB,6BAAA,GAAAA,6BAAA"}
|