diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-05 17:29:17 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-05 17:29:17 +0530 |
| commit | 35419c2bf7444c2ba32172ee0a6c00d88913598c (patch) | |
| tree | e401aec5cbd8501b3974bff1a47778848e5a8962 /src/runtime.ts | |
| parent | 5f5ea35c634cd97710eb953f930cc4d468c948ce (diff) | |
| download | ts-types-lang-35419c2bf7444c2ba32172ee0a6c00d88913598c.tar.gz ts-types-lang-35419c2bf7444c2ba32172ee0a6c00d88913598c.zip | |
feat: runtime ready yo
Diffstat (limited to '')
| -rw-r--r-- | src/runtime.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/runtime.ts b/src/runtime.ts index d03e7a9..8174118 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -70,7 +70,6 @@ const evalAccumulator = (effNode: Node, node: Node) => { const name = effTyp.getSymbol()?.getName() switch (name) { - case 'PrintString': case 'Print': console.log(...effTyp.getTypeArguments().map(typeToString)); return null @@ -90,7 +89,6 @@ const evalAccumulator = (effNode: Node, node: Node) => { case 'ChainIO': const inputTyp = effTyp.getProperty('input')?.getTypeAtLocation(node) const chainToKind = effTyp.getProperty('chainTo')?.getTypeAtLocation(node) - console.log('wow') const [hashRes] = inputTyp ? accumulateResults(inputTyp, node) : [] const chainRes = `(${typeToString(chainToKind)} & { input: ${RESULT_TYPE_NAME}[${JSON.stringify(hashRes)}]['output'] })['return']` @@ -113,8 +111,6 @@ if (typeRefNode) { const exitCodeTy = getPropertyType(typeRefNode, 'exitCode') const effectTypes = getPropertyType(typeRefNode, 'effects') if (effectTypes?.isTuple()) { - console.log('Effects to run', effectTypes?.getTupleElements().map(eff => typeToString(eff))) - const effectNodes = entryPoint.getChildrenOfKind(SyntaxKind.TypeReference) .flatMap(n => n.getChildrenOfKind(SyntaxKind.TupleType)) .flatMap(tt => tt.getChildrenOfKind(SyntaxKind.SyntaxList)) @@ -124,7 +120,7 @@ if (typeRefNode) { effectNodes.flatMap(n => evalAccumulator(n, typeRefNode)) } - console.log('Exited with code', exitCodeTy?.getLiteralValue()) + process.exit(exitCodeTy?.getLiteralValue() as number) } else { const ty = typeChecker.getTypeAtLocation(typeRefNode) console.log(typeToString(ty)) |
