File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { transformByTokenType } from './utils/transformByTokenType.js';
10
10
const { roundTo } = new Parser ( ) . functions ;
11
11
12
12
export const defaultCalcConfig = {
13
+ ...calcConfig . defaultConfig ,
13
14
mathFunctions : {
14
15
...calcConfig . defaultMathFunctions ,
15
16
roundTo : ( a : IUnitValue , b : IUnitValue ) => {
@@ -48,10 +49,9 @@ export function strictCheckAndEvaluateMath(
48
49
token : DesignToken ,
49
50
options : Partial < MathOptions > = { } ,
50
51
) : DesignToken [ 'value' ] {
51
- const opts = {
52
+ const opts : MathOptions = {
52
53
fractionDigits : options . fractionDigits ?? defaultFractionDigits ,
53
- calcConfig : defaultCalcConfig ,
54
- ...options ,
54
+ calcConfig : options . calcConfig ?? defaultCalcConfig ,
55
55
} ;
56
56
57
57
const expr = token . $value ?? token . value ;
You can’t perform that action at this time.
0 commit comments