@komaci/common-shared 240.1.3
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/build/__mocks__/@babel/parser.d.ts +2 -0
- package/build/__mocks__/@babel/parser.js +6 -0
- package/build/allowListGlobals.d.ts +4 -0
- package/build/allowListGlobals.js +7 -0
- package/build/allowlistNamespaces.d.ts +29 -0
- package/build/allowlistNamespaces.js +67 -0
- package/build/index.d.ts +7 -0
- package/build/index.js +19 -0
- package/build/internal-namespaces.json +1062 -0
- package/build/komaciDocumentIntrospection.d.ts +120 -0
- package/build/komaciDocumentIntrospection.js +366 -0
- package/build/parser.d.ts +9 -0
- package/build/parser.js +19 -0
- package/build/types.d.ts +193 -0
- package/build/types.js +16 -0
- package/build/utils.d.ts +153 -0
- package/build/utils.js +554 -0
- package/package.json +37 -0
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { NodePath } from '@babel/traverse';
|
|
2
|
+
import * as t from '@babel/types';
|
|
3
|
+
import { PrimitiveValue, PropertyReference, UnresolvedValue, ImportReference as KomaciDocImportReference, Binding } from '@komaci/types';
|
|
4
|
+
/**
|
|
5
|
+
* @typedef ClassPropertyInfo is an object that holds information about a class property
|
|
6
|
+
* @property {t.ClassProperty | t.ClassMethod | NodePath<t.ClassProperty | t.ClassMethod>} classProp is the class property babel object.
|
|
7
|
+
* @property {string} classPropId is the id of the class property.
|
|
8
|
+
* @property {string} decoratorType is the type of decorate. Ex: api, track, wire
|
|
9
|
+
* @property {boolean} isDecorated whether this class property is decorated or not
|
|
10
|
+
* @property {boolean} hasInitialValue whether this class property has an initial value
|
|
11
|
+
*/
|
|
12
|
+
export declare type ClassPropertyInfo = {
|
|
13
|
+
classProp: t.ClassProperty | t.ClassMethod | NodePath<t.ClassProperty | t.ClassMethod>;
|
|
14
|
+
classPropId: string;
|
|
15
|
+
decoratorType?: string;
|
|
16
|
+
isDecorated: boolean;
|
|
17
|
+
hasInitialValue: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @typedef ValidGetterContext is an object that holds information about the member varaibles within a getter function.
|
|
21
|
+
* @property {NodePath<t.ClassMethod>} getter is the babel object for the getter method node.
|
|
22
|
+
* @property {Array<string>} memberUsage is an array of member variable names that are within the getter.
|
|
23
|
+
* @property {number} f_index is the index at which this getter was added to the functions array in the Komaci document.
|
|
24
|
+
*/
|
|
25
|
+
export declare type ValidGetterContext = {
|
|
26
|
+
getter: NodePath<t.ClassMethod>;
|
|
27
|
+
memberUsage: Array<string>;
|
|
28
|
+
generatedName: string;
|
|
29
|
+
f_index?: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @typedef ValidTemplateContext is an object that holds information about the member varaibles within a template.
|
|
33
|
+
* @property {NodePath<t.ClassProperty>} template is the babel object for the getter method node.
|
|
34
|
+
* @property {Array<string>} memberUsage is an array of member variable names that are within the template.
|
|
35
|
+
* @property {string} generatedName name used as function name in the resolvable module
|
|
36
|
+
* @property {number} f_index is the index at which this template was added to the functions array in the Komaci document.
|
|
37
|
+
*/
|
|
38
|
+
export declare type ValidTemplateContext = {
|
|
39
|
+
template: NodePath<t.ClassProperty>;
|
|
40
|
+
memberUsage: Array<string>;
|
|
41
|
+
generatedName: string;
|
|
42
|
+
f_index?: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @typedef ImportDeclarationInfo is an object that holds information about the import declarations
|
|
46
|
+
* @property {string} identifierName is the name of the imported resource.
|
|
47
|
+
* @property {string} namespace Full import source path
|
|
48
|
+
* @property {boolean} isSupported a boolean field to determine if an import is supported or not.
|
|
49
|
+
* @property {boolean} isDefault a boolean field to determine if an import is the default import.
|
|
50
|
+
* @property {boolean} isNamespaceSpecifier a boolean field to determine if an import is a namespace import.
|
|
51
|
+
* @property {string} trueName sometimes imports are renamed so we maintain their true name for later processing
|
|
52
|
+
*/
|
|
53
|
+
export declare type ImportDeclarationInfo = {
|
|
54
|
+
identifierName: string;
|
|
55
|
+
namespace: string;
|
|
56
|
+
isSupported: boolean;
|
|
57
|
+
isDefault: boolean;
|
|
58
|
+
isNamespaceSpecifier: boolean;
|
|
59
|
+
trueName?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* @typedef AstContext is an object that holds meta data information about the ast.
|
|
63
|
+
* @property {Map<string, ImportDeclarationInfo>} importDeclarations a collection of importDeclarationInfo
|
|
64
|
+
* @property {string[]} moduleFunctions is a collection of function names that are defined on the module level.
|
|
65
|
+
* @property {string[]} moduleVariables is a collection of variable names that are defined on the module level.
|
|
66
|
+
* @property {string[]} classFunctions is a collection of functino names that are defined on the class level.
|
|
67
|
+
* @property {string[]} classProperties is a collection of class properties.
|
|
68
|
+
*/
|
|
69
|
+
export declare type AstContext = {
|
|
70
|
+
importDeclarations: Map<string, ImportDeclarationInfo>;
|
|
71
|
+
moduleFunctions: string[];
|
|
72
|
+
moduleVariables: string[];
|
|
73
|
+
classFunctions: string[];
|
|
74
|
+
classProperties: ClassPropertyInfo[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Contextual info about all the imports from a specific resource for use in module composition
|
|
78
|
+
*/
|
|
79
|
+
export declare type ImportDetail = {
|
|
80
|
+
/** The path where the import comes from i.e. 'lwc' or 'lds/getRecord' */
|
|
81
|
+
resourceName: string;
|
|
82
|
+
/** The names of the specific things imported */
|
|
83
|
+
names: Set<string>;
|
|
84
|
+
/** If this import is a namespace */
|
|
85
|
+
isNamespaceSpecifier: boolean;
|
|
86
|
+
/** If this import contains a default specifier */
|
|
87
|
+
isDefaultSpecifier: boolean;
|
|
88
|
+
/** If this import is from a supported namespace */
|
|
89
|
+
isSupported: boolean;
|
|
90
|
+
};
|
|
91
|
+
/** Mapping of resources to contextual info about themselves */
|
|
92
|
+
export declare type ConsumedImports = Map<string, ImportDetail>;
|
|
93
|
+
/** Mapping of specific imports to their general metadata info */
|
|
94
|
+
export declare type ImportDeclarations = Map<string, ImportDeclarationInfo>;
|
|
95
|
+
/**
|
|
96
|
+
* A stateful object to populate across getters for how they consume high level things. like imports.
|
|
97
|
+
*
|
|
98
|
+
* @property {Map} consumedImports all of the imports that getters use. This is uniquely data not retrievable by komaci document.
|
|
99
|
+
*/
|
|
100
|
+
export declare type ModuleLevelConsumption = {
|
|
101
|
+
consumedImports: ConsumedImports;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Metadata about specific things a getter consumed. for later processing
|
|
105
|
+
*/
|
|
106
|
+
export declare type ImplicitConsumption = {
|
|
107
|
+
identifiers: string[];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Possbile types of properties we can encounter in a LWC
|
|
111
|
+
*/
|
|
112
|
+
export declare enum PropertyTypes {
|
|
113
|
+
WIRE = "wire",
|
|
114
|
+
GETTER = "getter",
|
|
115
|
+
INTERNAL = "internal",
|
|
116
|
+
PUBLIC = "api",
|
|
117
|
+
IMPORT_REFERENCE = "importReference",
|
|
118
|
+
TEMPLATE_STRING = "templateString"
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Contextual information about a property and who consumes it
|
|
122
|
+
*/
|
|
123
|
+
export declare type ClassPropertyContext = BasePropertyContext | WirePropertyContext | ImportPropertyContext;
|
|
124
|
+
/**
|
|
125
|
+
* Base type for property context
|
|
126
|
+
*/
|
|
127
|
+
export declare type BasePropertyContext = {
|
|
128
|
+
/** Type of property */
|
|
129
|
+
type: PropertyTypes;
|
|
130
|
+
/** If this property is used in priming through wires, compositions or implicitly through a getter */
|
|
131
|
+
usedInPriming: boolean;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Added metadata specifically for wire properties
|
|
135
|
+
*/
|
|
136
|
+
export declare type WirePropertyContext = BasePropertyContext & {
|
|
137
|
+
/** type explicitly set to wire */
|
|
138
|
+
type: PropertyTypes.WIRE;
|
|
139
|
+
/** reference to import data */
|
|
140
|
+
wire: ImportMetadata;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Added metadata specifically for properties that get values from imports
|
|
144
|
+
*/
|
|
145
|
+
export declare type ImportPropertyContext = BasePropertyContext & {
|
|
146
|
+
/** reference to import data */
|
|
147
|
+
imports: Record<string, ImportMetadata>;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Basic details about an Import
|
|
151
|
+
*/
|
|
152
|
+
export declare type ImportMetadata = {
|
|
153
|
+
/** The name of the import as defined in the import object on komaci doc */
|
|
154
|
+
name: string;
|
|
155
|
+
/** The name of the import namespace as defined in the import object on komaci doc */
|
|
156
|
+
resourceName: string;
|
|
157
|
+
/** The referential id for this import. i.e. 0/names/0 */
|
|
158
|
+
komaciDocImportRef: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Map for all class properties and their basic, KomaciDoc analyzable metadata.
|
|
162
|
+
*
|
|
163
|
+
* For getters we can update the needful properties to be of type getter.
|
|
164
|
+
* Since we don't know from the KomaciDoc if it is a geter or not
|
|
165
|
+
*/
|
|
166
|
+
export declare type ClassPropertyContexts = Map<string, ClassPropertyContext>;
|
|
167
|
+
/**
|
|
168
|
+
* InputTraversalCallback type
|
|
169
|
+
* This is the signature of Input traversal callback methods, which are triggered
|
|
170
|
+
* whenever a certain real value, as determined by the method, is encountered
|
|
171
|
+
*/
|
|
172
|
+
export declare type InputTraversalCallback = (
|
|
173
|
+
/** The real value for which the callback is searching */
|
|
174
|
+
res: PropertyReference | PrimitiveValue | KomaciDocImportReference | UnresolvedValue | Binding,
|
|
175
|
+
/** The key to which the value sought out is sometimes mapped */
|
|
176
|
+
key?: string) => boolean;
|
|
177
|
+
/**
|
|
178
|
+
* NodePaths from babel for the different complex types of class properties.
|
|
179
|
+
*
|
|
180
|
+
* We collect these so in the future we can do traversals on their sub trees.
|
|
181
|
+
*/
|
|
182
|
+
export declare type ClassPropertyNodes = {
|
|
183
|
+
/** nodes representative of getter functions */
|
|
184
|
+
getters: NodePath<t.ClassMethod>[];
|
|
185
|
+
/** nodes representative of Template strings */
|
|
186
|
+
templateStrings: NodePath<t.ClassProperty>[];
|
|
187
|
+
};
|
|
188
|
+
/** Contextual info about class and overarching module */
|
|
189
|
+
export declare type ModuleContext = {
|
|
190
|
+
astContext: AstContext;
|
|
191
|
+
isExternal: boolean;
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=types.d.ts.map
|
package/build/types.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyTypes = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Possbile types of properties we can encounter in a LWC
|
|
6
|
+
*/
|
|
7
|
+
var PropertyTypes;
|
|
8
|
+
(function (PropertyTypes) {
|
|
9
|
+
PropertyTypes["WIRE"] = "wire";
|
|
10
|
+
PropertyTypes["GETTER"] = "getter";
|
|
11
|
+
PropertyTypes["INTERNAL"] = "internal";
|
|
12
|
+
PropertyTypes["PUBLIC"] = "api";
|
|
13
|
+
PropertyTypes["IMPORT_REFERENCE"] = "importReference";
|
|
14
|
+
PropertyTypes["TEMPLATE_STRING"] = "templateString";
|
|
15
|
+
})(PropertyTypes = exports.PropertyTypes || (exports.PropertyTypes = {}));
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
package/build/utils.d.ts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
import { NodePath } from '@babel/core';
|
|
3
|
+
import { AstContext, ClassPropertyContext, ClassPropertyContexts, ClassPropertyInfo, ClassPropertyNodes, ConsumedImports, ImplicitConsumption, ImportDeclarationInfo, ImportDeclarations, ModuleLevelConsumption } from './types';
|
|
4
|
+
export declare const LIGHTNING_NS = "lightning";
|
|
5
|
+
export declare const FORCE_NS = "force";
|
|
6
|
+
export declare const ONE_NS = "one";
|
|
7
|
+
/**
|
|
8
|
+
* collect node paths for different pieces of a given class so we can more effectively traverse them in the future
|
|
9
|
+
*
|
|
10
|
+
* we must do an init traversal to take nodes and turn them into nodepaths, which have context about their position in tree
|
|
11
|
+
* we need this info so we can do sub tree traversals later.
|
|
12
|
+
* @param ast babel abstract syntax tree
|
|
13
|
+
*/
|
|
14
|
+
export declare function getPropertyMetadataFromAst(ast: t.File): ClassPropertyNodes;
|
|
15
|
+
/**
|
|
16
|
+
* Given the AST of an entire JS source file, this method looks for class member properties.
|
|
17
|
+
* If there is no default export in the AST, no class properties will be returned (empty array is returned).
|
|
18
|
+
* @param astRoot AST representing an entire Program, as a @babel/types File object
|
|
19
|
+
* @returns Array of NodePath<ClassProperty> representing the @babel NodePaths for all class member
|
|
20
|
+
* properties, if any exist. Otherwise, returns an empty array.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getClassProperties(astRoot: t.File): t.ClassProperty[];
|
|
23
|
+
/**
|
|
24
|
+
* Utility method that takes in an @babel/types ClassProperty array, and returns an array of ClassPropertyInfo
|
|
25
|
+
* objects containing information about each ClassProperty from the input array.
|
|
26
|
+
* @param classProperties
|
|
27
|
+
* @returns Array of ClassPropertyInfo, where each element corresponds to the input ClassProperty array.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getClassPropertyInfos(classProperties?: Array<t.ClassProperty | t.ClassMethod>): ClassPropertyInfo[];
|
|
30
|
+
/**
|
|
31
|
+
* Given a valid functional node (tempalte string or getter function), collect information that we may not have been able to collect via KomaciDocument
|
|
32
|
+
* and return a list of class member variables that are properly used in the method body.
|
|
33
|
+
* "properly" = i.e. used in the right-hand side of a member expression.
|
|
34
|
+
* @param getter NodePath<ClassMethod | Class Property> path that represents class member-level getter method or template string
|
|
35
|
+
* e.g. "get myId() { return '187291110cd3a'; }"
|
|
36
|
+
* @param classPropInfos ClassPropertyInfo[] that contains all of the class-level properties.
|
|
37
|
+
* @param importDeclarations Map<string, ImporDeclarationInfo> which contains metadata for all import statements
|
|
38
|
+
* that currently exist. Does not contain state as to whether that import is being used.
|
|
39
|
+
* @param moduleLevelConsumption ModuleLevelConsumption. Contains a ConsumedImports which in turn contains a Map<string, ImportDetail>
|
|
40
|
+
* which in turn holds state as tp which imports are currently being used
|
|
41
|
+
* @returns ImplicitConsumption, which contains an array representing the properly-used member variables.
|
|
42
|
+
* Returns ImplicitConsumption with an empty array if none were found.
|
|
43
|
+
*/
|
|
44
|
+
export declare function implicitConsumptionMetadata(node: NodePath<t.ClassMethod | t.ClassProperty>, classPropInfos: ClassPropertyInfo[], importDeclarations: Map<string, ImportDeclarationInfo>, // import metadata
|
|
45
|
+
moduleLevelConsumption: ModuleLevelConsumption): ImplicitConsumption;
|
|
46
|
+
export declare function getMemberVarsFromGetter(path: NodePath<t.MemberExpression>, identifiers: Set<string>): void;
|
|
47
|
+
/**
|
|
48
|
+
* Collect metadata about all the imports consumed for an identifier in a getter
|
|
49
|
+
* @param path NodePath of the current Identifier in the getter
|
|
50
|
+
* @param classPropInfos Array of ClassPropertyInfo objects that have all of the information
|
|
51
|
+
* related to all class properties in the class.
|
|
52
|
+
* @param importDeclarations Metadata about all the imports
|
|
53
|
+
* @param consumedImports The map to add info to about this identifier, whether it is an import that is being used
|
|
54
|
+
* in the getter, or if it is assigned an import being used in the getter.
|
|
55
|
+
*/
|
|
56
|
+
export declare function collectImportUsage(path: NodePath<t.Identifier>, classPropInfos: ClassPropertyInfo[], importDeclarations: ImportDeclarations, consumedImports: ConsumedImports): void;
|
|
57
|
+
/**
|
|
58
|
+
* Some children of nodes can be a direct identifier or a string literal. helper helps do
|
|
59
|
+
* this consistant dance of getting the value from either
|
|
60
|
+
* @param node Node to ge value of
|
|
61
|
+
* @returns value
|
|
62
|
+
*/
|
|
63
|
+
export declare function getFromIdentifierOrStringLiteral(node: t.Identifier | t.StringLiteral): string;
|
|
64
|
+
/**
|
|
65
|
+
* Function for getting an array of supported namesapce references.
|
|
66
|
+
* @param astRoot the root of the ast
|
|
67
|
+
* @returns an Array of supported namespace references.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getAllImportReferences(astRoot: t.File): Map<string, ImportDeclarationInfo>;
|
|
70
|
+
/**
|
|
71
|
+
* Function to get an array of function names that are defined at the module level.
|
|
72
|
+
* @returns an array of function names that are defined at the module level.
|
|
73
|
+
*/
|
|
74
|
+
export declare function getAllModuleFunctions(astRoot: t.File): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Function that returns an array of variable names that are defined at the module level.
|
|
77
|
+
* @param astRoot the root ast node.
|
|
78
|
+
* @returns an array of variable names that are defined at the module level.
|
|
79
|
+
*/
|
|
80
|
+
export declare function getAllModuleVaraibles(astRoot: t.File): string[];
|
|
81
|
+
/**
|
|
82
|
+
* Function to get an array of function names that are defined on the default exports class.
|
|
83
|
+
* @returns an array of function names that are defined on the class.
|
|
84
|
+
*/
|
|
85
|
+
export declare function getAllClassMethods(astRoot: t.File): string[];
|
|
86
|
+
/**
|
|
87
|
+
* Function to get an AstContext object for a given ast.
|
|
88
|
+
* @param ast the ast.
|
|
89
|
+
* @returns a context object containing meta data about the ast.
|
|
90
|
+
*/
|
|
91
|
+
export declare function getAstContextObject(ast: t.File): AstContext;
|
|
92
|
+
/** Determines if the module (i.e LWC Component) was written by an external user. If the namespace of the module
|
|
93
|
+
* exactly matches one of 'lightning', 'force', or 'one', it is NOT an external component.
|
|
94
|
+
* @param namespace string namespace of the ModuleInfo to check (comes from ModuleInfo.namespace)
|
|
95
|
+
* @returns true if moduleInfo is an external module, false otherwise
|
|
96
|
+
*/
|
|
97
|
+
export declare function isExternalModule(namespace: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Helper function to collect all variables declared within a getter method.
|
|
100
|
+
* @param getterMethodPath the babel path object of the getter method.
|
|
101
|
+
* @returns an array of variable names that were declared in the getter method.
|
|
102
|
+
*/
|
|
103
|
+
export declare function getVariablesDeclaredInGetter(getterMethodPath: NodePath<t.ClassMethod>): string[];
|
|
104
|
+
/**
|
|
105
|
+
* Helper to get the name of a method
|
|
106
|
+
* @param node The method node
|
|
107
|
+
* @returns the name of the node
|
|
108
|
+
*/
|
|
109
|
+
export declare function getClassMethodName(node: NodePath<t.ClassMethod>): string;
|
|
110
|
+
/**
|
|
111
|
+
* Check whether a property is used either directly or indirectly
|
|
112
|
+
* @param prop The prop details
|
|
113
|
+
* @returns if it is used
|
|
114
|
+
*/
|
|
115
|
+
export declare function isPropertyUsed(prop?: ClassPropertyContext): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* High level wrapper to parse getter info from a babel node before checking if it is used
|
|
118
|
+
* @param getter The getter node
|
|
119
|
+
* @param properties Metadata about class properties
|
|
120
|
+
* @returns if it is used directly
|
|
121
|
+
*/
|
|
122
|
+
export declare function isGetterNodeUsed(getter: NodePath<t.ClassMethod>, properties: ClassPropertyContexts): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* High level wrapper to parse prop info from a babel node before checking if it is used
|
|
125
|
+
* @param prop The prop babel node
|
|
126
|
+
* @param properties Metadata about class properties
|
|
127
|
+
* @returns if it is used directly
|
|
128
|
+
*/
|
|
129
|
+
export declare function isPropertyNodeUsed(prop: NodePath<t.ClassProperty>, properties: ClassPropertyContexts): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @author xiaoxugu
|
|
132
|
+
* Helper function to collect all variables declared as alias of this.
|
|
133
|
+
* eg. const self = this, const that = this.
|
|
134
|
+
* @param getterMethodPath the babel path object of the getter method.
|
|
135
|
+
* @returns a {Set<string>} of variable names that were declared as alias of 'this'.
|
|
136
|
+
*/
|
|
137
|
+
export declare function getThisAliasDeclaredInGetter(getterMethodPath: NodePath<t.ClassMethod>): Set<string>;
|
|
138
|
+
/**
|
|
139
|
+
* @author xiaoxugu
|
|
140
|
+
* Determines whether the passed in {Expression} is a `this` or whether it is an equivalent alias to `this`
|
|
141
|
+
* @param {Set<string>} aliases a Set<string> of variables that were assigned `this`
|
|
142
|
+
* @param {Expression | null | undefined} expr the Expression whose type is being evaluated
|
|
143
|
+
* @returns {boolean} returns true is the Expression is a `ThisExpression` or an alias to one
|
|
144
|
+
*/
|
|
145
|
+
export declare function isExpressionThisOrAlias(aliases: Set<string>, expr: t.Expression | null | undefined): boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Function to check if the id we are referecing is either declared as a class property, import reference or module variale
|
|
148
|
+
* @param astContext the ast context
|
|
149
|
+
* @param declaredGetterVars a collection of variables declared within the getter
|
|
150
|
+
* @param id the id of the member we are referencing.
|
|
151
|
+
*/
|
|
152
|
+
export declare function isDeclaredInAst(astContext: AstContext, declaredGetterVars: string[], id: string): boolean;
|
|
153
|
+
//# sourceMappingURL=utils.d.ts.map
|