From 2b94b07fdc8f1a82f507b99000add9b7dca2c3d8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 20 Aug 2023 11:16:52 +0530 Subject: refactor: adds evalvalue type instead of string --- src/declarations.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/declarations.ts') 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 }), ) -- cgit v1.3.1