I have an old project which is written in JavaScript and I've "converted" it to TypeScript by simply renaming it to .ts.
Everything works fine, but I don't know how to assign the type for the following example:
function test(userid: number) {
var that = this;
this.UserId = userid;
//this.UserId : number = userid; //Not Working
}
test.prototype.load = () => {
var id = this.UserId;
}
I don't know how to assign the TypeDefinition to the local UserId variable. This is just a simple example. My project is very large and I can't refactor the whole thing.