Question: type 'number' is not assignable to type 'string' typescript?
Answer: To fix this, you have two options. First, explicitly declare the type of that variable so that it allows both strings and numbers: let result: string|number = `${integer}${fraction}`; result = parseFloat(result); // now should be ok.