Skip to content

Commit 5787de9

Browse files
authored
fix(estree-ast-utils): add missing d.ts (#193)
1 parent 5ef2b3d commit 5787de9

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

workspaces/estree-ast-utils/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Utilities for AST (ESTree compliant)",
55
"type": "module",
66
"exports": "./src/index.js",
7+
"types": "./src/index.d.ts",
78
"scripts": {
89
"lint": "eslint src test",
910
"prepublishOnly": "pkg-ok",
@@ -20,6 +21,9 @@
2021
"ast",
2122
"utils"
2223
],
24+
"files": [
25+
"src"
26+
],
2327
"author": "GENTILHOMME Thomas <[email protected]>",
2428
"license": "MIT",
2529
"bugs": {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Import Internal Dependencies
2+
import { VariableTracer } from "./utils/VariableTracer";
3+
4+
export { VariableTracer };
5+
6+
export function arrayExpressionToString(
7+
node: any, options?: { tracer?: VariableTracer }
8+
): IterableIterator<string>;
9+
10+
export function concatBinaryExpression(
11+
node: any, options?: { tracer?: VariableTracer, stopOnUnsupportedNode?: boolean }
12+
): IterableIterator<string>;
13+
14+
export function getCallExpressionArguments(
15+
node: any, options?: { tracer?: VariableTracer }
16+
): string[] | null;
17+
18+
export function getCallExpressionIdentifier(
19+
node: any
20+
): string | null;
21+
22+
export function getMemberExpressionIdentifier(
23+
node: any, options?: { tracer?: VariableTracer }
24+
): IterableIterator<string>;
25+
26+
export function getVariableDeclarationIdentifiers(
27+
node: any, options?: { prefix?: string | null }
28+
): IterableIterator<{ name: string; assignmentId: any }>;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Import Node.js Dependencies
2+
import EventEmitter from "node:events";
3+
4+
declare class VariableTracer extends EventEmitter {
5+
static AssignmentEvent: Symbol;
6+
7+
literalIdentifiers: Map<string, string>;
8+
importedModules: Set<string>;
9+
10+
enableDefaultTracing(): VariableTracer;
11+
debug(): void;
12+
trace(identifierOrMemberExpr: string, options?: {
13+
followConsecutiveAssignment?: boolean;
14+
moduleName?: string;
15+
name?: string;
16+
}): VariableTracer;
17+
getDataFromIdentifier(identifierOrMemberExpr: string): null | {
18+
name: string;
19+
identifierOrMemberExpr: string;
20+
assignmentMemory: string[];
21+
}
22+
walk(node: any): void;
23+
}
24+
25+
export {
26+
VariableTracer
27+
}

0 commit comments

Comments
 (0)