summaryrefslogtreecommitdiff
path: root/src/declarations.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-08-20 11:16:52 +0530
committerAkshay Nair <phenax5@gmail.com>2023-08-20 11:16:52 +0530
commit2b94b07fdc8f1a82f507b99000add9b7dca2c3d8 (patch)
treec96e3c0992cc24145c9b42cbaf8ea8f607c6b73c /src/declarations.ts
parent3ff7d709998fe33f82e6da50d7b3327b076a1039 (diff)
downloadcss-everything-2b94b07fdc8f1a82f507b99000add9b7dca2c3d8.tar.gz
css-everything-2b94b07fdc8f1a82f507b99000add9b7dca2c3d8.zip
refactor: adds evalvalue type instead of string
Diffstat (limited to '')
-rw-r--r--src/declarations.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarations.ts b/src/declarations.ts
index 0571116..5c2f9a3 100644
--- a/src/declarations.ts
+++ b/src/declarations.ts
@@ -1,4 +1,4 @@
-import { EvalActions, evalExpr } from './eval'
+import { EvalActions, evalExprAsString } from './eval'
import { Expr, Selector, SelectorComp, parseDeclarations } from './parser'
import { match, matchString } from './utils/adt'
@@ -22,7 +22,9 @@ export const evaluateDeclaration = async (
const props = await Promise.all(
[...properties.entries()].map(async ([key, expr]) => {
// Ignore errors?
- const result = await evalExpr(expr, actions).catch(e => console.warn(e))
+ const result = await evalExprAsString(expr, actions).catch((e: any) =>
+ console.warn(e),
+ )
return [key, result ?? ''] as const
}),
)