From 83b6bcaa81a645e1b3936d856fbb84ea219ee04e Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 12 Jan 2023 17:11:36 +0530 Subject: feat: adds exit process effect --- src/eval.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/eval.ts b/src/eval.ts index 19a5557..c34e911 100644 --- a/src/eval.ts +++ b/src/eval.ts @@ -116,6 +116,11 @@ export const evaluateType = async ( return [resultKey] }, + Exit: async () => { + const exitCode = args[0] && ctx.getTypeValue(args[0]) + process.exit(exitCode) + }, + ReadLine: async () => { const line = await readLineFromStdin() const [resultKey, _] = ctx.createResult(`${JSON.stringify(line)}`) -- cgit v1.3.1