Thanks for your patience here, I\'m just starting out with TypeScript.
I\'m working on an angular 2 app that needs to accept text inputs and then make a bunch of calcul
You example is not clear enough, but I guess that your problem is because of Typescript inference:
var x = 3; // x is a number
x = "45"; // compiler error
But, if you do:
var x : any = 3; // x can be anything
x = "45";
Or:
var x; // x is any forever
x = '45'; // x is still any
You can find further details on those great slides and on docs
Hope this can help a bit...