@teambit/typescript 1.0.226 → 1.0.227
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 +21 -21
- package/artifacts/preview/teambit_typescript_typescript-preview.js +1 -1
- package/artifacts/schema.json +231 -911
- package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
- package/package.json +18 -18
- package/tsconfig.json +46 -1
- package/dist/cmds/check-types.cmd.d.ts +0 -26
- package/dist/cmds/init.cmd.d.ts +0 -0
- package/dist/cmds/write-tsconfig.cmd.d.ts +0 -26
- package/dist/compiler-options.d.ts +0 -22
- package/dist/dedupe-path.spec.d.ts +0 -1
- package/dist/exceptions/index.d.ts +0 -1
- package/dist/exceptions/transformer-not-found.d.ts +0 -8
- package/dist/export-identifier.d.ts +0 -6
- package/dist/extractor-options.d.ts +0 -26
- package/dist/identifier-list.d.ts +0 -7
- package/dist/identifier.d.ts +0 -9
- package/dist/index.d.ts +0 -9
- package/dist/remove-types-task.d.ts +0 -8
- package/dist/schema-extractor-context.d.ts +0 -119
- package/dist/schema-transformer.d.ts +0 -19
- package/dist/schema-transformer.plugin.d.ts +0 -9
- package/dist/sourceFileTransformers/class.d.ts +0 -2
- package/dist/sourceFileTransformers/empty-line-encoder.d.ts +0 -14
- package/dist/sourceFileTransformers/export.d.ts +0 -2
- package/dist/sourceFileTransformers/expression-statement.d.ts +0 -2
- package/dist/sourceFileTransformers/function.d.ts +0 -2
- package/dist/sourceFileTransformers/import.d.ts +0 -2
- package/dist/sourceFileTransformers/index.d.ts +0 -12
- package/dist/sourceFileTransformers/interface.d.ts +0 -2
- package/dist/sourceFileTransformers/replaceName.d.ts +0 -1
- package/dist/sourceFileTransformers/transform.d.ts +0 -12
- package/dist/sourceFileTransformers/type-reference.d.ts +0 -2
- package/dist/sourceFileTransformers/typeAlias.d.ts +0 -2
- package/dist/sourceFileTransformers/variable.d.ts +0 -2
- package/dist/transform-source-file.spec.d.ts +0 -1
- package/dist/transformers/array-literal-expression.d.ts +0 -10
- package/dist/transformers/array-type.d.ts +0 -10
- package/dist/transformers/binding-element.d.ts +0 -17
- package/dist/transformers/class-declaration.d.ts +0 -12
- package/dist/transformers/conditional-type.d.ts +0 -10
- package/dist/transformers/constructor.d.ts +0 -10
- package/dist/transformers/decorator.d.ts +0 -10
- package/dist/transformers/enum-declaration.d.ts +0 -10
- package/dist/transformers/export-assignment.d.ts +0 -14
- package/dist/transformers/export-declaration.d.ts +0 -9
- package/dist/transformers/expression-statement.d.ts +0 -10
- package/dist/transformers/function-like.d.ts +0 -11
- package/dist/transformers/get-accessor.d.ts +0 -10
- package/dist/transformers/import-declaration.d.ts +0 -10
- package/dist/transformers/index-signature.d.ts +0 -10
- package/dist/transformers/index.d.ts +0 -43
- package/dist/transformers/indexed-access-type.d.ts +0 -10
- package/dist/transformers/interface-declaration.d.ts +0 -11
- package/dist/transformers/intersection-type.d.ts +0 -10
- package/dist/transformers/keyword-type.d.ts +0 -13
- package/dist/transformers/literal-type.d.ts +0 -13
- package/dist/transformers/literal-value.d.ts +0 -11
- package/dist/transformers/module-declaration.d.ts +0 -10
- package/dist/transformers/named-tuple.d.ts +0 -10
- package/dist/transformers/object-literal-expression.d.ts +0 -9
- package/dist/transformers/parameter.d.ts +0 -13
- package/dist/transformers/parenthesized-type.d.ts +0 -10
- package/dist/transformers/property-assignment.d.ts +0 -9
- package/dist/transformers/property-declaration.d.ts +0 -11
- package/dist/transformers/set-accessor.d.ts +0 -10
- package/dist/transformers/source-file-transformer.d.ts +0 -15
- package/dist/transformers/template-literal-type-span.d.ts +0 -10
- package/dist/transformers/template-literal-type.d.ts +0 -10
- package/dist/transformers/this-type.d.ts +0 -10
- package/dist/transformers/tuple-type.d.ts +0 -10
- package/dist/transformers/type-alias.d.ts +0 -11
- package/dist/transformers/type-literal.d.ts +0 -14
- package/dist/transformers/type-operator.d.ts +0 -14
- package/dist/transformers/type-predicate.d.ts +0 -10
- package/dist/transformers/type-query.d.ts +0 -13
- package/dist/transformers/type-reference.d.ts +0 -17
- package/dist/transformers/union-type.d.ts +0 -10
- package/dist/transformers/utils/jsdoc-to-doc-schema.d.ts +0 -5
- package/dist/transformers/utils/parse-type-from-quick-info.d.ts +0 -36
- package/dist/transformers/variable-declaration.d.ts +0 -11
- package/dist/transformers/variable-statement.d.ts +0 -14
- package/dist/tsconfig-writer.d.ts +0 -49
- package/dist/typescript.aspect.d.ts +0 -2
- package/dist/typescript.composition.d.ts +0 -1
- package/dist/typescript.extractor.d.ts +0 -51
- package/dist/typescript.main.runtime.d.ts +0 -135
- package/dist/typescript.parser.d.ts +0 -12
- package/dist/typescript.parser.spec.d.ts +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, EnumDeclaration } from 'typescript';
|
|
2
|
-
import { EnumSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class EnumDeclarationTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(node: EnumDeclaration): Promise<Identifier[]>;
|
|
9
|
-
transform(enumDec: EnumDeclaration, context: SchemaExtractorContext): Promise<EnumSchema>;
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import { Node, ExportAssignment as ExportAssignmentNode } from 'typescript';
|
|
3
|
-
import { ExportIdentifier } from '../export-identifier';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
6
|
-
/**
|
|
7
|
-
* This is either an export = or an export default declaration.
|
|
8
|
-
* Unless isExportEquals is set, this node was parsed as an export default
|
|
9
|
-
*/
|
|
10
|
-
export declare class ExportAssignmentTransformer implements SchemaTransformer {
|
|
11
|
-
predicate(node: Node): boolean;
|
|
12
|
-
getIdentifiers(exportDec: ExportAssignmentNode): Promise<ExportIdentifier[]>;
|
|
13
|
-
transform(exportDec: ExportAssignmentNode, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import { Node, ExportDeclaration as ExportDeclarationNode } from 'typescript';
|
|
3
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
4
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
5
|
-
export declare class ExportDeclarationTransformer implements SchemaTransformer {
|
|
6
|
-
predicate(node: Node): boolean;
|
|
7
|
-
getIdentifiers(exportDec: ExportDeclarationNode, context: SchemaExtractorContext): Promise<import("../identifier").Identifier[]>;
|
|
8
|
-
transform(exportDec: ExportDeclarationNode, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, ExpressionStatement } from 'typescript';
|
|
2
|
-
import { UnImplementedSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ExpressionStatementTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ExpressionStatement, context: SchemaExtractorContext): Promise<UnImplementedSchema>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import { Node, SignatureDeclaration } from 'typescript';
|
|
3
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
4
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class FunctionLikeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(funcDec: SignatureDeclaration): Promise<Identifier[]>;
|
|
9
|
-
private getName;
|
|
10
|
-
transform(node: SignatureDeclaration, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, GetAccessorDeclaration } from 'typescript';
|
|
2
|
-
import { GetAccessorSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class GetAccessorTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: GetAccessorDeclaration, context: SchemaExtractorContext): Promise<GetAccessorSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ImportDeclaration, Node } from 'typescript';
|
|
2
|
-
import { UnImplementedSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ImportDeclarationTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(importDec: ImportDeclaration): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ImportDeclaration, context: SchemaExtractorContext): Promise<UnImplementedSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, IndexSignatureDeclaration } from 'typescript';
|
|
2
|
-
import { IndexSignatureSchema, UnresolvedSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class IndexSignatureTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: IndexSignatureDeclaration, context: SchemaExtractorContext): Promise<IndexSignatureSchema | UnresolvedSchema>;
|
|
10
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export { ExportDeclarationTransformer } from './export-declaration';
|
|
2
|
-
export { FunctionLikeTransformer } from './function-like';
|
|
3
|
-
export { ParameterTransformer } from './parameter';
|
|
4
|
-
export { VariableStatementTransformer } from './variable-statement';
|
|
5
|
-
export { VariableDeclaration } from './variable-declaration';
|
|
6
|
-
export { SourceFileTransformer } from './source-file-transformer';
|
|
7
|
-
export { TypeAliasTransformer } from './type-alias';
|
|
8
|
-
export { IntersectionTypeTransformer } from './intersection-type';
|
|
9
|
-
export { UnionTypeTransformer } from './union-type';
|
|
10
|
-
export { TypeReferenceTransformer } from './type-reference';
|
|
11
|
-
export { TypeLiteralTransformer } from './type-literal';
|
|
12
|
-
export { LiteralTypeTransformer } from './literal-type';
|
|
13
|
-
export { TypeQueryTransformer } from './type-query';
|
|
14
|
-
export { TypeOperatorTransformer } from './type-operator';
|
|
15
|
-
export { KeywordTypeTransformer } from './keyword-type';
|
|
16
|
-
export { TupleTypeTransformer } from './tuple-type';
|
|
17
|
-
export { ParenthesizedTypeTransformer } from './parenthesized-type';
|
|
18
|
-
export { TypePredicateTransformer } from './type-predicate';
|
|
19
|
-
export { IndexedAccessTypeTransformer } from './indexed-access-type';
|
|
20
|
-
export { TemplateLiteralTypeSpanTransformer } from './template-literal-type-span';
|
|
21
|
-
export { TemplateLiteralTypeTransformer } from './template-literal-type';
|
|
22
|
-
export { ThisTypeTransformer } from './this-type';
|
|
23
|
-
export { ConditionalTypeTransformer } from './conditional-type';
|
|
24
|
-
export { NamedTupleTransformer } from './named-tuple';
|
|
25
|
-
export { ArrayTypeTransformer } from './array-type';
|
|
26
|
-
export { ClassDeclarationTransformer } from './class-declaration';
|
|
27
|
-
export { ConstructorTransformer } from './constructor';
|
|
28
|
-
export { PropertyDeclarationTransformer } from './property-declaration';
|
|
29
|
-
export { SetAccessorTransformer } from './set-accessor';
|
|
30
|
-
export { GetAccessorTransformer } from './get-accessor';
|
|
31
|
-
export { IndexSignatureTransformer } from './index-signature';
|
|
32
|
-
export { InterfaceDeclarationTransformer } from './interface-declaration';
|
|
33
|
-
export { EnumDeclarationTransformer } from './enum-declaration';
|
|
34
|
-
export { BindingElementTransformer } from './binding-element';
|
|
35
|
-
export { ExportAssignmentTransformer } from './export-assignment';
|
|
36
|
-
export { ImportDeclarationTransformer } from './import-declaration';
|
|
37
|
-
export { ExpressionStatementTransformer } from './expression-statement';
|
|
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';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IndexedAccessTypeNode, Node } from 'typescript';
|
|
2
|
-
import { IndexedAccessSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class IndexedAccessTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: IndexedAccessTypeNode, context: SchemaExtractorContext): Promise<IndexedAccessSchema>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Node, InterfaceDeclaration } from 'typescript';
|
|
2
|
-
import { InterfaceSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class InterfaceDeclarationTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(node: InterfaceDeclaration): Promise<Identifier[]>;
|
|
9
|
-
private getExpressionWithTypeArgs;
|
|
10
|
-
transform(interfaceDec: InterfaceDeclaration, context: SchemaExtractorContext): Promise<InterfaceSchema>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, IntersectionTypeNode } from 'typescript';
|
|
2
|
-
import { TypeIntersectionSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class IntersectionTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: IntersectionTypeNode, context: SchemaExtractorContext): Promise<TypeIntersectionSchema>;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Node } from 'typescript';
|
|
2
|
-
import { KeywordTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* whether it's kind of `ts.KeywordTypeSyntaxKind`
|
|
8
|
-
*/
|
|
9
|
-
export declare class KeywordTypeTransformer implements SchemaTransformer {
|
|
10
|
-
predicate(node: Node): boolean;
|
|
11
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
12
|
-
transform(node: Node, context: SchemaExtractorContext): Promise<KeywordTypeSchema>;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LiteralTypeNode, Node } from 'typescript';
|
|
2
|
-
import { LiteralTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* e.g. string/boolean
|
|
8
|
-
*/
|
|
9
|
-
export declare class LiteralTypeTransformer implements SchemaTransformer {
|
|
10
|
-
predicate(node: Node): boolean;
|
|
11
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
12
|
-
transform(node: LiteralTypeNode, context: SchemaExtractorContext): Promise<LiteralTypeSchema>;
|
|
13
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import ts, { Node, StringLiteral } from 'typescript';
|
|
3
|
-
import type { SchemaExtractorContext } from '../schema-extractor-context';
|
|
4
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export type LiteralValueNode = StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.NullLiteral | ts.BigIntLiteral | ts.RegularExpressionLiteral | ts.NewExpression;
|
|
7
|
-
export declare class LiteralValueTransformer implements SchemaTransformer {
|
|
8
|
-
predicate(node: Node): boolean;
|
|
9
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
10
|
-
transform(node: LiteralValueNode, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, ModuleDeclaration } from 'typescript';
|
|
2
|
-
import { UnImplementedSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ModuleDeclarationTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ModuleDeclaration, context: SchemaExtractorContext): Promise<UnImplementedSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, NamedTupleMember } from 'typescript';
|
|
2
|
-
import { NamedTupleSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class NamedTupleTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: NamedTupleMember, context: SchemaExtractorContext): Promise<NamedTupleSchema>;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Node, ObjectLiteralExpression } from 'typescript';
|
|
2
|
-
import { ObjectLiteralExpressionSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import type { SchemaExtractorContext } from '../schema-extractor-context';
|
|
4
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
5
|
-
export declare class ObjectLiteralExpressionTransformer implements SchemaTransformer {
|
|
6
|
-
predicate(node: Node): boolean;
|
|
7
|
-
getIdentifiers(): Promise<never[]>;
|
|
8
|
-
transform(node: ObjectLiteralExpression, context: SchemaExtractorContext): Promise<ObjectLiteralExpressionSchema>;
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Node, ParameterDeclaration } from 'typescript';
|
|
2
|
-
import { ParameterSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ParameterTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ParameterDeclaration, context: SchemaExtractorContext): Promise<ParameterSchema<SchemaNode>>;
|
|
10
|
-
static getName(param: ParameterDeclaration): string;
|
|
11
|
-
getType(param: ParameterDeclaration, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
12
|
-
static getObjectBindingNodes(param: ParameterDeclaration, paramType: SchemaNode, context: SchemaExtractorContext): Promise<SchemaNode[] | undefined>;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, ParenthesizedTypeNode } from 'typescript';
|
|
2
|
-
import { ParenthesizedTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ParenthesizedTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ParenthesizedTypeNode, context: SchemaExtractorContext): Promise<ParenthesizedTypeSchema>;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Node, PropertyDeclaration, PropertySignature } from 'typescript';
|
|
2
|
-
import { VariableLikeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class PropertyDeclarationTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
private isComputedProperty;
|
|
10
|
-
transform(node: PropertyDeclaration | PropertySignature, context: SchemaExtractorContext): Promise<VariableLikeSchema>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, SetAccessorDeclaration } from 'typescript';
|
|
2
|
-
import { SetAccessorSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class SetAccessorTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: SetAccessorDeclaration, context: SchemaExtractorContext): Promise<SetAccessorSchema>;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Node, SourceFile } from 'typescript';
|
|
2
|
-
import { ModuleSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class SourceFileTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(sourceFile: SourceFile, context: SchemaExtractorContext): Promise<Identifier[]>;
|
|
9
|
-
transform(node: SourceFile, context: SchemaExtractorContext): Promise<ModuleSchema>;
|
|
10
|
-
/**
|
|
11
|
-
* list all exports of a source file.
|
|
12
|
-
*/
|
|
13
|
-
private listExports;
|
|
14
|
-
private listInternalNodes;
|
|
15
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, TemplateLiteralTypeSpan } from 'typescript';
|
|
2
|
-
import { TemplateLiteralTypeSpanSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class TemplateLiteralTypeSpanTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: TemplateLiteralTypeSpan, context: SchemaExtractorContext): Promise<TemplateLiteralTypeSpanSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, TemplateLiteralTypeNode } from 'typescript';
|
|
2
|
-
import { TemplateLiteralTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class TemplateLiteralTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: TemplateLiteralTypeNode, context: SchemaExtractorContext): Promise<TemplateLiteralTypeSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, ThisTypeNode } from 'typescript';
|
|
2
|
-
import { ThisTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class ThisTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: ThisTypeNode, context: SchemaExtractorContext): Promise<ThisTypeSchema>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, TupleTypeNode } from 'typescript';
|
|
2
|
-
import { TupleTypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class TupleTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: TupleTypeNode, context: SchemaExtractorContext): Promise<TupleTypeSchema>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Node, TypeAliasDeclaration } from 'typescript';
|
|
2
|
-
import { TypeSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class TypeAliasTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(node: TypeAliasDeclaration): Promise<Identifier[]>;
|
|
9
|
-
private getName;
|
|
10
|
-
transform(typeAlias: TypeAliasDeclaration, context: SchemaExtractorContext): Promise<TypeSchema>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Node, TypeLiteralNode } from 'typescript';
|
|
2
|
-
import { TypeLiteralSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* not to be confused with "LiteralType", which is string/boolean/null.
|
|
8
|
-
* this "TypeLiteral" is an object with properties, such as: `{ a: string; b: number }`, similar to Interface.
|
|
9
|
-
*/
|
|
10
|
-
export declare class TypeLiteralTransformer implements SchemaTransformer {
|
|
11
|
-
predicate(node: Node): boolean;
|
|
12
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
13
|
-
transform(node: TypeLiteralNode, context: SchemaExtractorContext): Promise<TypeLiteralSchema>;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Node, TypeOperatorNode, SyntaxKind } from 'typescript';
|
|
2
|
-
import { TypeOperatorSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* e.g. keyof typeof Foo
|
|
8
|
-
*/
|
|
9
|
-
export declare class TypeOperatorTransformer implements SchemaTransformer {
|
|
10
|
-
predicate(node: Node): boolean;
|
|
11
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
12
|
-
transform(node: TypeOperatorNode, context: SchemaExtractorContext): Promise<TypeOperatorSchema>;
|
|
13
|
-
getOperatorName(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword): "readonly" | "keyof" | "unique";
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, TypePredicateNode } from 'typescript';
|
|
2
|
-
import { TypePredicateSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class TypePredicateTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: TypePredicateNode, context: SchemaExtractorContext): Promise<TypePredicateSchema>;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Node, TypeQueryNode } from 'typescript';
|
|
2
|
-
import { TypeQuerySchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* e.g. `typeof Foo`
|
|
8
|
-
*/
|
|
9
|
-
export declare class TypeQueryTransformer implements SchemaTransformer {
|
|
10
|
-
predicate(node: Node): boolean;
|
|
11
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
12
|
-
transform(node: TypeQueryNode, context: SchemaExtractorContext): Promise<TypeQuerySchema>;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Node, TypeReferenceNode } from 'typescript';
|
|
2
|
-
import { TypeRefSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* In the following example, `AriaButtonProps` is a type reference
|
|
8
|
-
* ```ts
|
|
9
|
-
* import type { AriaButtonProps } from '@react-types/button';
|
|
10
|
-
* export type ButtonProps = AriaButtonProps & { a: string };
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare class TypeReferenceTransformer implements SchemaTransformer {
|
|
14
|
-
predicate(node: Node): boolean;
|
|
15
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
16
|
-
transform(node: TypeReferenceNode, context: SchemaExtractorContext): Promise<import("@teambit/semantics.entities.semantic-schema").SchemaNode | TypeRefSchema>;
|
|
17
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Node, UnionTypeNode } from 'typescript';
|
|
2
|
-
import { TypeUnionSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class UnionTypeTransformer implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getIdentifiers(): Promise<Identifier[]>;
|
|
9
|
-
transform(node: UnionTypeNode, context: SchemaExtractorContext): Promise<TypeUnionSchema>;
|
|
10
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { JSDocTag } from 'typescript';
|
|
2
|
-
import { TagSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
3
|
-
import { Formatter } from '@teambit/formatter';
|
|
4
|
-
import { SchemaExtractorContext } from '../../schema-extractor-context';
|
|
5
|
-
export declare function tagParser(tag: JSDocTag, context: SchemaExtractorContext, formatter?: Formatter): Promise<TagSchema>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type ts from 'typescript/lib/tsserverlibrary';
|
|
2
|
-
export declare const UNRESOLVED = "<<unresolved>>";
|
|
3
|
-
/**
|
|
4
|
-
* try to parse the type from the quickinfo.
|
|
5
|
-
* this is an error-prone process, we do our best here.
|
|
6
|
-
*
|
|
7
|
-
* an example of a function with many ":"
|
|
8
|
-
* `export function getObj(a: string, func: (b: number) => {}) { return { a: 1, b: 2 } };`
|
|
9
|
-
* which produce the following quickinfo:
|
|
10
|
-
* ```ts
|
|
11
|
-
* function getObj(a: string, func: (b: number) => {}): {
|
|
12
|
-
* a: number;
|
|
13
|
-
* b: number;
|
|
14
|
-
* }
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* some examples of quickinfo:
|
|
18
|
-
*
|
|
19
|
-
* function ts.signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node | undefined, flags?: TypeFormatFlags): SymbolDisplayPart[]
|
|
20
|
-
*
|
|
21
|
-
* const enum ts.TypeFormatFlags
|
|
22
|
-
*
|
|
23
|
-
* (method) ts.TypeChecker.writeSignature(signature: Signature, enclosingDeclaration?: Node | undefined, flags?: TypeFormatFlags | undefined, kind?: SignatureKind | undefined, writer?: EmitTextWriter | undefined): string
|
|
24
|
-
*
|
|
25
|
-
* const obj: {
|
|
26
|
-
* a: number;
|
|
27
|
-
* b: number;
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* function getObj(a: string): {
|
|
31
|
-
* a: number;
|
|
32
|
-
* b: number;
|
|
33
|
-
* }
|
|
34
|
-
*/
|
|
35
|
-
export declare function parseTypeFromQuickInfo(quickInfo: ts.server.protocol.QuickInfoResponse | undefined): string;
|
|
36
|
-
export declare function parseReturnTypeFromQuickInfo(quickInfo: ts.server.protocol.QuickInfoResponse | undefined): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import { Node, VariableDeclaration as VariableDeclarationNode } from 'typescript';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
export declare class VariableDeclaration implements SchemaTransformer {
|
|
7
|
-
predicate(node: Node): boolean;
|
|
8
|
-
getName(node: VariableDeclarationNode): string;
|
|
9
|
-
getIdentifiers(node: VariableDeclarationNode): Promise<Identifier[]>;
|
|
10
|
-
transform(varDec: VariableDeclarationNode, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
2
|
-
import { Node, VariableStatement } from 'typescript';
|
|
3
|
-
import { SchemaTransformer } from '../schema-transformer';
|
|
4
|
-
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
5
|
-
import { Identifier } from '../identifier';
|
|
6
|
-
/**
|
|
7
|
-
* variable statement is a collection of variable declarations.
|
|
8
|
-
* e.g. `export const a = 1, b = () => {}, c = {};`
|
|
9
|
-
*/
|
|
10
|
-
export declare class VariableStatementTransformer implements SchemaTransformer {
|
|
11
|
-
predicate(node: Node): boolean;
|
|
12
|
-
getIdentifiers(node: VariableStatement): Promise<Identifier[]>;
|
|
13
|
-
transform(node: VariableStatement, context: SchemaExtractorContext): Promise<SchemaNode>;
|
|
14
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ExecutionContext } from '@teambit/envs';
|
|
2
|
-
import { Workspace } from '@teambit/workspace';
|
|
3
|
-
import { Logger } from '@teambit/logger';
|
|
4
|
-
import { TsconfigWriterOptions } from './typescript.main.runtime';
|
|
5
|
-
export type TsconfigPathsPerEnv = {
|
|
6
|
-
envIds: string[];
|
|
7
|
-
tsconfig: string;
|
|
8
|
-
paths: string[];
|
|
9
|
-
};
|
|
10
|
-
export declare class TsconfigWriter {
|
|
11
|
-
private workspace;
|
|
12
|
-
private logger;
|
|
13
|
-
constructor(workspace: Workspace, logger: Logger);
|
|
14
|
-
write(envsExecutionContext: ExecutionContext[], options: TsconfigWriterOptions): Promise<TsconfigPathsPerEnv[]>;
|
|
15
|
-
private getTsconfigFromEnv;
|
|
16
|
-
clean(envsExecutionContext: ExecutionContext[], { dryRun, silent }: TsconfigWriterOptions): Promise<string[]>;
|
|
17
|
-
private promptForWriting;
|
|
18
|
-
private promptForCleaning;
|
|
19
|
-
private deleteFiles;
|
|
20
|
-
private writeFiles;
|
|
21
|
-
private getPathsPerEnv;
|
|
22
|
-
}
|
|
23
|
-
type PathsPerEnvIds = {
|
|
24
|
-
ids: string[];
|
|
25
|
-
paths: string[];
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* easier to understand by an example:
|
|
29
|
-
* input:
|
|
30
|
-
* [
|
|
31
|
-
* { id: react, paths: [ui/button, ui/form] },
|
|
32
|
-
* { id: aspect, paths: [p/a1, p/a2] },
|
|
33
|
-
* { id: node, paths: [p/n1] },
|
|
34
|
-
* ]
|
|
35
|
-
*
|
|
36
|
-
* output:
|
|
37
|
-
* [
|
|
38
|
-
* { id: react, paths: [ui] },
|
|
39
|
-
* { id: aspect, paths: [p] },
|
|
40
|
-
* { id: node, paths: [p/n1] },
|
|
41
|
-
* ]
|
|
42
|
-
*
|
|
43
|
-
* the goal is to minimize the amount of files to write per env if possible.
|
|
44
|
-
* when multiple components of the same env share a root-dir, then, it's enough to write a file in that shared dir.
|
|
45
|
-
* if in a shared-dir, some components using env1 and some env2, it finds the env that has the max number of
|
|
46
|
-
* components, this env will be optimized. other components, will have the files written inside their dirs.
|
|
47
|
-
*/
|
|
48
|
-
export declare function dedupePaths(pathsPerEnvId: PathsPerEnvIds[]): PathsPerEnvIds[];
|
|
49
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|