aboutsummaryrefslogtreecommitdiff
path: root/src/declarations.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-08-13 17:05:06 +0530
committerAkshay Nair <phenax5@gmail.com>2023-08-13 17:05:06 +0530
commite4d70a54e97551f974a04379817e8baf152fa8d3 (patch)
tree2b2ce59a654e7e50f2ba945ccfe6e494e07e8449 /src/declarations.ts
parentc327a1dfc40b834b31c3488020859223f3583b4c (diff)
downloadcss-everything-e4d70a54e97551f974a04379817e8baf152fa8d3.tar.gz
css-everything-e4d70a54e97551f974a04379817e8baf152fa8d3.zip
feat: adds applying css properties for instances + adds --cssx-text eval + fixes issues
Diffstat (limited to '')
-rw-r--r--src/declarations.ts5
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)