@signaltree/callable-syntax 4.1.1 → 4.1.2
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/package.json +1 -1
- package/src/types-fallback.d.ts +31 -0
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Fallback declarations for Babel modules in case @types packages are missing.
|
|
2
|
+
// These are minimal and only to satisfy TypeScript when types cannot be resolved.
|
|
3
|
+
// They will be ignored if proper @types are installed.
|
|
4
|
+
|
|
5
|
+
declare module '@babel/generator' {
|
|
6
|
+
import type { Node } from '@babel/types';
|
|
7
|
+
interface GeneratorOptions {
|
|
8
|
+
retainLines?: boolean;
|
|
9
|
+
comments?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface GeneratorResult {
|
|
12
|
+
code: string;
|
|
13
|
+
map?: unknown;
|
|
14
|
+
}
|
|
15
|
+
export default function generate(
|
|
16
|
+
ast: Node,
|
|
17
|
+
options?: GeneratorOptions,
|
|
18
|
+
code?: string
|
|
19
|
+
): GeneratorResult;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module '@babel/traverse' {
|
|
23
|
+
import type { Node } from '@babel/types';
|
|
24
|
+
export interface NodePath<T = Node> {
|
|
25
|
+
node: T;
|
|
26
|
+
replaceWith(node: Node): void;
|
|
27
|
+
}
|
|
28
|
+
export type VisitorFn<T = Node> = (path: NodePath<T>) => void;
|
|
29
|
+
export type Visitor = Record<string, VisitorFn>;
|
|
30
|
+
export default function traverse(ast: Node, options: Visitor): void;
|
|
31
|
+
}
|