diff options
Diffstat (limited to 'src/declarations.ts')
| -rw-r--r-- | src/declarations.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarations.ts b/src/declarations.ts index 78c9801..17306bd 100644 --- a/src/declarations.ts +++ b/src/declarations.ts @@ -50,12 +50,15 @@ export const toDeclaration = (expr: Expr): Declaration | undefined => { instance: () => { isInstance = true const [sel, map] = args + + // Selector match(sel, { Selector: sel => { selector = sel }, _: _ => {}, }) + match(map, { Call: ({ name, args }) => { if (name !== 'map') return @@ -90,7 +93,7 @@ export const toDeclaration = (expr: Expr): Declaration | undefined => { export const expressionsToDeclrs = async ( exprs: Array<Expr>, actions: EvalActions, -) => { +): Promise<Array<DeclarationEval>> => { const declrs = await Promise.all( exprs .map(toDeclaration) |
