Skip to content

Commit 6861644

Browse files
committed
chore: Fix type errors
1 parent 9b27a73 commit 6861644

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/strictCheckAndEvaluateMath.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { transformByTokenType } from './utils/transformByTokenType.js';
1010
const { roundTo } = new Parser().functions;
1111

1212
export const defaultCalcConfig = {
13+
...calcConfig.defaultConfig,
1314
mathFunctions: {
1415
...calcConfig.defaultMathFunctions,
1516
roundTo: (a: IUnitValue, b: IUnitValue) => {
@@ -48,10 +49,9 @@ export function strictCheckAndEvaluateMath(
4849
token: DesignToken,
4950
options: Partial<MathOptions> = {},
5051
): DesignToken['value'] {
51-
const opts = {
52+
const opts: MathOptions = {
5253
fractionDigits: options.fractionDigits ?? defaultFractionDigits,
53-
calcConfig: defaultCalcConfig,
54-
...options,
54+
calcConfig: options.calcConfig ?? defaultCalcConfig,
5555
};
5656

5757
const expr = token.$value ?? token.value;

0 commit comments

Comments
 (0)