diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-20 11:16:52 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-20 11:16:52 +0530 |
| commit | 2b94b07fdc8f1a82f507b99000add9b7dca2c3d8 (patch) | |
| tree | c96e3c0992cc24145c9b42cbaf8ea8f607c6b73c /src/declarations.ts | |
| parent | 3ff7d709998fe33f82e6da50d7b3327b076a1039 (diff) | |
| download | css-everything-2b94b07fdc8f1a82f507b99000add9b7dca2c3d8.tar.gz css-everything-2b94b07fdc8f1a82f507b99000add9b7dca2c3d8.zip | |
refactor: adds evalvalue type instead of string
Diffstat (limited to '')
| -rw-r--r-- | src/declarations.ts | 6 |
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 }), ) |
