From f31caa5baad20553cac0330ae9ff279b8f88f340 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 14 Jan 2023 17:38:24 +0530 Subject: feat: adds test cases for do and seq + fixes behavior with empty results --- src/context.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/context.ts') diff --git a/src/context.ts b/src/context.ts index fab6653..f70a17d 100644 --- a/src/context.ts +++ b/src/context.ts @@ -39,7 +39,9 @@ export const createContext = (options: CtxOptions): Ctx => { ) const getResultExpr = (resultKey?: string) => - `(${RESULT_TYPE_NAME}[${JSON.stringify(resultKey)})` + resultKey + ? `((${RESULT_TYPE_NAME}[${JSON.stringify(resultKey)})['output'])` + : 'undefined' const addResult = (name: string, ty: string): Node | undefined => resultTypeNode -- cgit v1.3.1