ts2c is not yet able to convert strings into floating-point numbers, though this feature would be relatively easy to implement:
var a = parseFloat("10.0");
console.log(a+2);
It may be possible to do this using using sscanf, but there may be other ways to do it.