@breadstone-tools/cem-core 0.0.12-beta.0
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/Ast/Ast.d.ts +224 -0
- package/Ast/Ast.d.ts.map +1 -0
- package/Ast/Ast.js +557 -0
- package/Ast/Ast.js.map +1 -0
- package/Ast/Builder/BuildArrowFunction.d.ts +14 -0
- package/Ast/Builder/BuildArrowFunction.d.ts.map +1 -0
- package/Ast/Builder/BuildArrowFunction.js +29 -0
- package/Ast/Builder/BuildArrowFunction.js.map +1 -0
- package/Ast/Builder/BuildAttribute.d.ts +16 -0
- package/Ast/Builder/BuildAttribute.d.ts.map +1 -0
- package/Ast/Builder/BuildAttribute.js +36 -0
- package/Ast/Builder/BuildAttribute.js.map +1 -0
- package/Ast/Builder/BuildClass.d.ts +24 -0
- package/Ast/Builder/BuildClass.d.ts.map +1 -0
- package/Ast/Builder/BuildClass.js +251 -0
- package/Ast/Builder/BuildClass.js.map +1 -0
- package/Ast/Builder/BuildClassField.d.ts +14 -0
- package/Ast/Builder/BuildClassField.d.ts.map +1 -0
- package/Ast/Builder/BuildClassField.js +34 -0
- package/Ast/Builder/BuildClassField.js.map +1 -0
- package/Ast/Builder/BuildFunctionLike.d.ts +41 -0
- package/Ast/Builder/BuildFunctionLike.d.ts.map +1 -0
- package/Ast/Builder/BuildFunctionLike.js +80 -0
- package/Ast/Builder/BuildFunctionLike.js.map +1 -0
- package/Ast/Builder/BuildMixin.d.ts +19 -0
- package/Ast/Builder/BuildMixin.d.ts.map +1 -0
- package/Ast/Builder/BuildMixin.js +50 -0
- package/Ast/Builder/BuildMixin.js.map +1 -0
- package/Ast/Builder/BuildVariable.d.ts +15 -0
- package/Ast/Builder/BuildVariable.d.ts.map +1 -0
- package/Ast/Builder/BuildVariable.js +29 -0
- package/Ast/Builder/BuildVariable.js.map +1 -0
- package/Ast/Handler/HandleAttrJsDoc.d.ts +10 -0
- package/Ast/Handler/HandleAttrJsDoc.d.ts.map +1 -0
- package/Ast/Handler/HandleAttrJsDoc.js +43 -0
- package/Ast/Handler/HandleAttrJsDoc.js.map +1 -0
- package/Ast/Handler/HandleCollectMixins.d.ts +10 -0
- package/Ast/Handler/HandleCollectMixins.d.ts.map +1 -0
- package/Ast/Handler/HandleCollectMixins.js +27 -0
- package/Ast/Handler/HandleCollectMixins.js.map +1 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.d.ts +9 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.d.ts.map +1 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.js +38 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.js.map +1 -0
- package/Ast/Handler/HandleCustomJsDocTags.d.ts +8 -0
- package/Ast/Handler/HandleCustomJsDocTags.d.ts.map +1 -0
- package/Ast/Handler/HandleCustomJsDocTags.js +31 -0
- package/Ast/Handler/HandleCustomJsDocTags.js.map +1 -0
- package/Ast/Handler/HandleDefaultValue.d.ts +10 -0
- package/Ast/Handler/HandleDefaultValue.d.ts.map +1 -0
- package/Ast/Handler/HandleDefaultValue.js +48 -0
- package/Ast/Handler/HandleDefaultValue.js.map +1 -0
- package/Ast/Handler/HandleExplicitType.d.ts +10 -0
- package/Ast/Handler/HandleExplicitType.d.ts.map +1 -0
- package/Ast/Handler/HandleExplicitType.js +28 -0
- package/Ast/Handler/HandleExplicitType.js.map +1 -0
- package/Ast/Handler/HandleHeritage.d.ts +11 -0
- package/Ast/Handler/HandleHeritage.d.ts.map +1 -0
- package/Ast/Handler/HandleHeritage.js +67 -0
- package/Ast/Handler/HandleHeritage.js.map +1 -0
- package/Ast/Handler/HandleJsDoc.d.ts +9 -0
- package/Ast/Handler/HandleJsDoc.d.ts.map +1 -0
- package/Ast/Handler/HandleJsDoc.js +90 -0
- package/Ast/Handler/HandleJsDoc.js.map +1 -0
- package/Ast/Handler/HandleJsDocParameterTag.d.ts +8 -0
- package/Ast/Handler/HandleJsDocParameterTag.d.ts.map +1 -0
- package/Ast/Handler/HandleJsDocParameterTag.js +59 -0
- package/Ast/Handler/HandleJsDocParameterTag.js.map +1 -0
- package/Ast/Handler/HandleModifiers.d.ts +13 -0
- package/Ast/Handler/HandleModifiers.d.ts.map +1 -0
- package/Ast/Handler/HandleModifiers.js +49 -0
- package/Ast/Handler/HandleModifiers.js.map +1 -0
- package/Ast/Handler/HandlePrivateMember.d.ts +10 -0
- package/Ast/Handler/HandlePrivateMember.d.ts.map +1 -0
- package/Ast/Handler/HandlePrivateMember.js +25 -0
- package/Ast/Handler/HandlePrivateMember.js.map +1 -0
- package/Ast/Handler/HandleTypeInference.d.ts +9 -0
- package/Ast/Handler/HandleTypeInference.d.ts.map +1 -0
- package/Ast/Handler/HandleTypeInference.js +46 -0
- package/Ast/Handler/HandleTypeInference.js.map +1 -0
- package/Ast/Handler/HandleWellKnownTypes.d.ts +11 -0
- package/Ast/Handler/HandleWellKnownTypes.d.ts.map +1 -0
- package/Ast/Handler/HandleWellKnownTypes.js +28 -0
- package/Ast/Handler/HandleWellKnownTypes.js.map +1 -0
- package/Ast/Manifest.d.ts +47 -0
- package/Ast/Manifest.d.ts.map +1 -0
- package/Ast/Manifest.js +209 -0
- package/Ast/Manifest.js.map +1 -0
- package/Index.d.ts +9 -0
- package/Index.d.ts.map +1 -0
- package/Index.js +8 -0
- package/Index.js.map +1 -0
- package/LICENSE +21 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.d.ts +13 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.js +37 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.js.map +1 -0
- package/Plugins/Analyse/ClassJsDocPlugin.d.ts +25 -0
- package/Plugins/Analyse/ClassJsDocPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ClassJsDocPlugin.js +200 -0
- package/Plugins/Analyse/ClassJsDocPlugin.js.map +1 -0
- package/Plugins/Analyse/ClassPlugin.d.ts +13 -0
- package/Plugins/Analyse/ClassPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ClassPlugin.js +32 -0
- package/Plugins/Analyse/ClassPlugin.js.map +1 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.d.ts +15 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.js +112 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.js.map +1 -0
- package/Plugins/Analyse/ExportsPlugin.d.ts +18 -0
- package/Plugins/Analyse/ExportsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ExportsPlugin.js +154 -0
- package/Plugins/Analyse/ExportsPlugin.js.map +1 -0
- package/Plugins/Analyse/FunctionLikePlugin.d.ts +14 -0
- package/Plugins/Analyse/FunctionLikePlugin.d.ts.map +1 -0
- package/Plugins/Analyse/FunctionLikePlugin.js +36 -0
- package/Plugins/Analyse/FunctionLikePlugin.js.map +1 -0
- package/Plugins/Analyse/MixinPlugin.d.ts +13 -0
- package/Plugins/Analyse/MixinPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/MixinPlugin.js +36 -0
- package/Plugins/Analyse/MixinPlugin.js.map +1 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.d.ts +15 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.js +56 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.js.map +1 -0
- package/Plugins/Analyse/VariablePlugin.d.ts +13 -0
- package/Plugins/Analyse/VariablePlugin.d.ts.map +1 -0
- package/Plugins/Analyse/VariablePlugin.js +40 -0
- package/Plugins/Analyse/VariablePlugin.js.map +1 -0
- package/Plugins/Collect/CollectImportsPlugin.d.ts +6 -0
- package/Plugins/Collect/CollectImportsPlugin.d.ts.map +1 -0
- package/Plugins/Collect/CollectImportsPlugin.js +100 -0
- package/Plugins/Collect/CollectImportsPlugin.js.map +1 -0
- package/Plugins/Framework/Catalyst/Catalyst.d.ts +3 -0
- package/Plugins/Framework/Catalyst/Catalyst.d.ts.map +1 -0
- package/Plugins/Framework/Catalyst/Catalyst.js +9 -0
- package/Plugins/Framework/Catalyst/Catalyst.js.map +1 -0
- package/Plugins/Framework/Fast/Fast.d.ts +3 -0
- package/Plugins/Framework/Fast/Fast.d.ts.map +1 -0
- package/Plugins/Framework/Fast/Fast.js +9 -0
- package/Plugins/Framework/Fast/Fast.js.map +1 -0
- package/Plugins/Framework/Lit/Lit.d.ts +8 -0
- package/Plugins/Framework/Lit/Lit.d.ts.map +1 -0
- package/Plugins/Framework/Lit/Lit.js +25 -0
- package/Plugins/Framework/Lit/Lit.js.map +1 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.d.ts +16 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.js +37 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.d.ts +24 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.js +51 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.d.ts +16 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.js +100 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.d.ts +17 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.js +126 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.js.map +1 -0
- package/Plugins/Framework/Lwc/Lwc.d.ts +3 -0
- package/Plugins/Framework/Lwc/Lwc.d.ts.map +1 -0
- package/Plugins/Framework/Lwc/Lwc.js +9 -0
- package/Plugins/Framework/Lwc/Lwc.js.map +1 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.d.ts +18 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.js +80 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.d.ts +14 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.js +67 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Stencil/Stencil.d.ts +3 -0
- package/Plugins/Framework/Stencil/Stencil.d.ts.map +1 -0
- package/Plugins/Framework/Stencil/Stencil.js +9 -0
- package/Plugins/Framework/Stencil/Stencil.js.map +1 -0
- package/Plugins/Link/CleanupClassesPlugin.d.ts +6 -0
- package/Plugins/Link/CleanupClassesPlugin.d.ts.map +1 -0
- package/Plugins/Link/CleanupClassesPlugin.js +24 -0
- package/Plugins/Link/CleanupClassesPlugin.js.map +1 -0
- package/Plugins/Link/FieldDenyListPlugin.d.ts +6 -0
- package/Plugins/Link/FieldDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Link/FieldDenyListPlugin.js +23 -0
- package/Plugins/Link/FieldDenyListPlugin.js.map +1 -0
- package/Plugins/Link/MethodDenyListPlugin.d.ts +6 -0
- package/Plugins/Link/MethodDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Link/MethodDenyListPlugin.js +26 -0
- package/Plugins/Link/MethodDenyListPlugin.js.map +1 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.d.ts +6 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.js +87 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.js.map +1 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.js +35 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.js.map +1 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.d.ts +6 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.js +28 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.js.map +1 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.js +21 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.js.map +1 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.js +59 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.js.map +1 -0
- package/Services/DependencyService.d.ts +1 -0
- package/Services/DependencyService.d.ts.map +1 -0
- package/Services/DependencyService.js +112 -0
- package/Services/DependencyService.js.map +1 -0
- package/Services/Interfaces/IDependencyService.d.ts +12 -0
- package/Services/Interfaces/IDependencyService.d.ts.map +1 -0
- package/Services/Interfaces/IDependencyService.js +4 -0
- package/Services/Interfaces/IDependencyService.js.map +1 -0
- package/Services/Interfaces/IManifestBuilder.d.ts +16 -0
- package/Services/Interfaces/IManifestBuilder.d.ts.map +1 -0
- package/Services/Interfaces/IManifestBuilder.js +4 -0
- package/Services/Interfaces/IManifestBuilder.js.map +1 -0
- package/Services/Interfaces/IManifestEngine.d.ts +16 -0
- package/Services/Interfaces/IManifestEngine.d.ts.map +1 -0
- package/Services/Interfaces/IManifestEngine.js +4 -0
- package/Services/Interfaces/IManifestEngine.js.map +1 -0
- package/Services/ManifestBuilder.d.ts +47 -0
- package/Services/ManifestBuilder.d.ts.map +1 -0
- package/Services/ManifestBuilder.js +49 -0
- package/Services/ManifestBuilder.js.map +1 -0
- package/Services/ManifestEngine.d.ts +62 -0
- package/Services/ManifestEngine.d.ts.map +1 -0
- package/Services/ManifestEngine.js +283 -0
- package/Services/ManifestEngine.js.map +1 -0
- package/Types/Framework.d.ts +2 -0
- package/Types/Framework.d.ts.map +1 -0
- package/Types/Framework.js +3 -0
- package/Types/Framework.js.map +1 -0
- package/Types.d.ts +1 -0
- package/Types.d.ts.map +1 -0
- package/Types.js +45 -0
- package/Types.js.map +1 -0
- package/Utils.d.ts +50 -0
- package/Utils.d.ts.map +1 -0
- package/Utils.js +147 -0
- package/Utils.js.map +1 -0
- package/package.json +23 -0
package/Ast/Ast.d.ts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a node is a property.
|
|
4
|
+
* @param node - The node to check.
|
|
5
|
+
* @returns True if the node is a property, otherwise false.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isProperty: (node: ts.Node) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if a node is a dispatchEvent call.
|
|
10
|
+
* @param node - The node to check.
|
|
11
|
+
* @returns True if the node is a dispatchEvent call, otherwise false.
|
|
12
|
+
* @example this.dispatchEvent(new Event('foo'));
|
|
13
|
+
*/
|
|
14
|
+
export declare const isDispatchEvent: (node: ts.Node) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Checks if a statement is a return statement.
|
|
17
|
+
* @param statement - The statement to check.
|
|
18
|
+
* @returns True if the statement is a return statement, otherwise false.
|
|
19
|
+
*/
|
|
20
|
+
export declare const isReturnStatement: (statement: ts.Node) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Checks if a node is a customElements.define call.
|
|
23
|
+
* @param node - The node to check.
|
|
24
|
+
* @returns True if the node is a customElements.define call, otherwise false.
|
|
25
|
+
* @example customElements.define('my-el', MyEl);
|
|
26
|
+
* @example window.customElements.define('my-el', MyEl);
|
|
27
|
+
*/
|
|
28
|
+
export declare const isCustomElementsDefineCall: (node: ts.Node) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Checks if a member has an @attr or @attribute annotation.
|
|
31
|
+
* @param member - The member to check.
|
|
32
|
+
* @returns True if the member has an @attr or @attribute annotation, otherwise false.
|
|
33
|
+
* @example @attr
|
|
34
|
+
* @example @attribute
|
|
35
|
+
*/
|
|
36
|
+
export declare function hasAttrAnnotation(member: ts.Node): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if a node is a primitive value.
|
|
39
|
+
* @param node - The node to check.
|
|
40
|
+
* @returns True if the node is a primitive value, otherwise false.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isPrimitive(node: ts.Node): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if a variable statement has an initializer.
|
|
45
|
+
* @param node - The variable statement to check.
|
|
46
|
+
* @returns True if the variable statement has an initializer, otherwise false.
|
|
47
|
+
* @example let foo;
|
|
48
|
+
* @example let foo = '';
|
|
49
|
+
*/
|
|
50
|
+
export declare function hasInitializer(node: ts.VariableStatement): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the element name from a customElement decorator.
|
|
53
|
+
* @param decorator - The decorator to check.
|
|
54
|
+
* @returns The name of the custom element.
|
|
55
|
+
* @example @customElement('my-el')
|
|
56
|
+
* @example @customElement({ name: 'my-el', template })
|
|
57
|
+
*/
|
|
58
|
+
export declare function getElementNameFromDecorator(decorator: ts.Decorator): string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Gets the options object from a decorator's call expression.
|
|
61
|
+
* @param decorator - The decorator to check.
|
|
62
|
+
* @returns The options object.
|
|
63
|
+
* @example @attr({attribute: 'my-el'})
|
|
64
|
+
*/
|
|
65
|
+
export declare const getOptionsObject: (decorator: ts.Decorator) => ts.ObjectLiteralExpression | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the return value expression of a return statement, omitting the type assertion.
|
|
68
|
+
* @param returnStatement - The return statement to check.
|
|
69
|
+
* @returns The return value expression.
|
|
70
|
+
*/
|
|
71
|
+
export declare const getReturnValue: (returnStatement: ts.ReturnStatement) => string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if a class member is a static member.
|
|
74
|
+
* @param member - The class member to check.
|
|
75
|
+
* @returns True if the class member is static, otherwise false.
|
|
76
|
+
*/
|
|
77
|
+
export declare const isStaticMember: (member: ts.ClassElement) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if a node is a well-known type.
|
|
80
|
+
* @param node - The node to check.
|
|
81
|
+
* @returns True if the node is a well-known type, otherwise false.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isWellKnownType(node: ts.Node): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Checks if a node has an `@ignore` JSDoc annotation.
|
|
86
|
+
* @param node - The node to check.
|
|
87
|
+
* @returns True if the node has an `@ignore` JSDoc annotation, otherwise false.
|
|
88
|
+
*/
|
|
89
|
+
export declare const hasIgnoreJSDoc: (node?: ts.Node) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Checks if a statement is a bind call.
|
|
92
|
+
* @param statement - The statement to check.
|
|
93
|
+
* @returns True if the statement is a bind call, otherwise false.
|
|
94
|
+
* @example this.__onClick = this.__onClick.bind(this);
|
|
95
|
+
*/
|
|
96
|
+
export declare function isBindCall(statement: ts.ExpressionStatement): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Gets the declaration of a variable or function in a file.
|
|
99
|
+
* @param nodeOrName - The node or name to find the declaration for.
|
|
100
|
+
* @param sourceFile - The source file to search.
|
|
101
|
+
* @returns The declaration node.
|
|
102
|
+
* @throws If nodeOrName is a string and sourceFile is not provided.
|
|
103
|
+
* @example getDeclarationInFile('myVar', sourceFile);
|
|
104
|
+
* @example getDeclarationInFile(node, sourceFile);
|
|
105
|
+
*/
|
|
106
|
+
export declare function getDeclarationInFile(nodeOrName: ts.Node | string, sourceFile?: ts.SourceFile): ts.Node | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Checks if a node has an export modifier.
|
|
109
|
+
* @param node - The node to check.
|
|
110
|
+
* @returns True if the node has an export modifier, otherwise false.
|
|
111
|
+
*/
|
|
112
|
+
export declare function hasExportModifier(node: ts.Node): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Checks if a node has a default modifier.
|
|
115
|
+
* @param node - The node to check.
|
|
116
|
+
* @returns True if the node has a default modifier, otherwise false.
|
|
117
|
+
*/
|
|
118
|
+
export declare function hasDefaultModifier(node: ts.Node): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Checks if a node has named exports.
|
|
121
|
+
* @param node - The node to check.
|
|
122
|
+
* @returns True if the node has named exports, otherwise false.
|
|
123
|
+
* @example export { var1, var2 };
|
|
124
|
+
*/
|
|
125
|
+
export declare function hasNamedExports(node: ts.Node): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Checks if a node is a re-export statement.
|
|
128
|
+
* @param node - The node to check.
|
|
129
|
+
* @returns True if the node is a re-export statement, otherwise false.
|
|
130
|
+
* @example export { var1, var2 } from 'foo';
|
|
131
|
+
*/
|
|
132
|
+
export declare function isReexport(node: ts.Node): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Checks if a node has a default import.
|
|
135
|
+
* @param node - The node to check.
|
|
136
|
+
* @returns True if the node has a default import, otherwise false.
|
|
137
|
+
* @example import defaultExport from 'foo';
|
|
138
|
+
*/
|
|
139
|
+
export declare function hasDefaultImport(node: ts.Node): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Checks if a node has named imports.
|
|
142
|
+
* @param node - The node to check.
|
|
143
|
+
* @returns True if the node has named imports, otherwise false.
|
|
144
|
+
* @example import {namedA, namedB} from 'foo';
|
|
145
|
+
*/
|
|
146
|
+
export declare function hasNamedImport(node: ts.Node): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Checks if a node has an aggregating import.
|
|
149
|
+
* @param node - The node to check.
|
|
150
|
+
* @returns True if the node has an aggregating import, otherwise false.
|
|
151
|
+
* @example import * as name from './my-module.js';
|
|
152
|
+
*/
|
|
153
|
+
export declare function hasAggregatingImport(node: ts.Node): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Checks if a node has a side-effect import.
|
|
156
|
+
* @param node - The node to check.
|
|
157
|
+
* @returns True if the node has a side-effect import, otherwise false.
|
|
158
|
+
* @example import './my-module.js';
|
|
159
|
+
*/
|
|
160
|
+
export declare function hasSideEffectImport(node: ts.Node): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Checks if a node is a mixin.
|
|
163
|
+
* @param node - The node to check.
|
|
164
|
+
* @returns True if the node is a mixin, otherwise false.
|
|
165
|
+
*/
|
|
166
|
+
export declare const isMixin: (node: ts.Node) => boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Extracts mixin nodes from a given node.
|
|
169
|
+
* @param node - The node to extract mixin nodes from.
|
|
170
|
+
* @returns The mixin function and mixin class, or false if not a mixin.
|
|
171
|
+
*/
|
|
172
|
+
export declare function extractMixinNodes(node: ts.Node): {
|
|
173
|
+
mixinFunction: ts.Node;
|
|
174
|
+
mixinClass: ts.ClassExpression | ts.ClassDeclaration;
|
|
175
|
+
} | null;
|
|
176
|
+
/**
|
|
177
|
+
* Checks if a given decorator is of a specified type.
|
|
178
|
+
* @param type - The type of the decorator to check.
|
|
179
|
+
* @returns A function that takes a decorator and returns a boolean indicating if the decorator is of the specified type.
|
|
180
|
+
*/
|
|
181
|
+
export declare const decorator: (type: string) => (decorator: ts.Decorator) => boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Checks if the property is also an attribute.
|
|
184
|
+
* @param node - The TypeScript node to check.
|
|
185
|
+
* @returns True if the property is also an attribute, false otherwise.
|
|
186
|
+
*/
|
|
187
|
+
export declare function isAlsoAttribute(node: ts.Node): boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Checks if the property reflects to an attribute.
|
|
190
|
+
* @param node - The TypeScript node to check.
|
|
191
|
+
* @returns True if the property reflects, false otherwise.
|
|
192
|
+
*/
|
|
193
|
+
export declare function reflects(node: ts.Node): boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Gets the type of the property.
|
|
196
|
+
* @param node - The TypeScript node to check.
|
|
197
|
+
* @returns The type of the property as a string.
|
|
198
|
+
*/
|
|
199
|
+
export declare function getType(node: ts.Node): string | false;
|
|
200
|
+
/**
|
|
201
|
+
* Gets the attribute name from the property.
|
|
202
|
+
* @param node - The TypeScript node to check.
|
|
203
|
+
* @returns The attribute name as a string.
|
|
204
|
+
*/
|
|
205
|
+
export declare function getAttributeName(node: ts.Node): string | false;
|
|
206
|
+
/**
|
|
207
|
+
* Checks if the node has a property decorator.
|
|
208
|
+
* @param node - The TypeScript node to check.
|
|
209
|
+
* @returns True if the node has a property decorator, false otherwise.
|
|
210
|
+
*/
|
|
211
|
+
export declare function hasPropertyDecorator(node: ts.Node): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Checks if the node has a static keyword.
|
|
214
|
+
* @param node - The TypeScript node to check.
|
|
215
|
+
* @returns True if the node has a static keyword, false otherwise.
|
|
216
|
+
*/
|
|
217
|
+
export declare const hasStaticKeyword: (node: ts.Node) => boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Gets the properties object from the node.
|
|
220
|
+
* @param node - The TypeScript node to check.
|
|
221
|
+
* @returns The properties object.
|
|
222
|
+
*/
|
|
223
|
+
export declare function getPropertiesObject(node: ts.Node): ts.Expression | undefined;
|
|
224
|
+
//# sourceMappingURL=Ast.d.ts.map
|
package/Ast/Ast.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ast.d.ts","sourceRoot":"","sources":["../../src/Ast/Ast.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