diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-13 17:05:06 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-13 17:05:06 +0530 |
| commit | e4d70a54e97551f974a04379817e8baf152fa8d3 (patch) | |
| tree | 2b2ce59a654e7e50f2ba945ccfe6e494e07e8449 /src/declarations.ts | |
| parent | c327a1dfc40b834b31c3488020859223f3583b4c (diff) | |
| download | css-everything-e4d70a54e97551f974a04379817e8baf152fa8d3.tar.gz css-everything-e4d70a54e97551f974a04379817e8baf152fa8d3.zip | |
feat: adds applying css properties for instances + adds --cssx-text eval + fixes issues
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) |
