aboutsummaryrefslogtreecommitdiff
path: root/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/types.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts
new file mode 100644
index 0000000..a3cf3bb
--- /dev/null
+++ b/src/types.ts
@@ -0,0 +1,17 @@
+import { ExportedDeclarations, Node, SourceFile, Type, TypeChecker } from "ts-morph"
+
+export interface Ctx {
+ sourceFile: SourceFile
+ typeChecker: TypeChecker
+ entryPoint: ExportedDeclarations
+ typeToString: (ty: Type | undefined) => string
+
+ createResult: (ty: string) => [string, Node | undefined]
+ getResultExpr: (key?: string) => string
+ printResultNode: () => void
+
+ addCustomEffect: (name: string, expr: string) => void
+ runCustomEffect: (name: string, args: Type[]) => Promise<string[]>
+ hasCustomEffect: (name: string) => boolean
+}
+