From e4d70a54e97551f974a04379817e8baf152fa8d3 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 13 Aug 2023 17:05:06 +0530 Subject: feat: adds applying css properties for instances + adds --cssx-text eval + fixes issues --- src/declarations.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/declarations.ts') 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, actions: EvalActions, -) => { +): Promise> => { const declrs = await Promise.all( exprs .map(toDeclaration) -- cgit v1.3.1