blob: 059c0c20c96cc96192bc2b0f37602c5a5aa8c939 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import {
ExportedDeclarations,
Node,
SourceFile,
Type,
TypeChecker,
} from 'ts-morph'
export interface Ctx {
sourceFile: SourceFile
typeChecker: TypeChecker
entryPoint: ExportedDeclarations
typeToString: (ty: Type | undefined) => string
getTypeValue: (ty: Type | undefined) => any
createResult: (ty: string) => [string, Node | undefined]
getResultExpr: (key?: string) => string
printResultNode: () => void
createRef: (ty: string) => string,
getRef: (key: string) => any,
setRef: (key: string, ty: string) => void,
deleteRef: (key: string) => void,
addCustomEffect: (name: string, expr: string) => void
runCustomEffect: (name: string, args: Type[]) => Promise<string[]>
hasCustomEffect: (name: string) => boolean
}
|