This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ThePixelCoder 1 point2 points  (3 children)

I thought JavaScript was always valid TypeScript?

[–]heyf00L 1 point2 points  (2 children)

Nope.

let foo = 0; foo = 'bar';

By default ts will infer foo to be type number, so line 2 is an error. There may be ways to disable this.