When attempting to split a number value after converting it into a string, I encountered an error message stating: "Type ‘string’ is not assignable to type ‘number’".
Here is the code snippet causing the issue:
export const roundWithPrecision = (
value: number,
decimalPrecision: number,
): number => {
let valueString: string | number = value
let valueSplit = valueString.toString().split('')
return valueSplit;
};