3 ms·
One of the most touted features is "your JavaScript is already valid TypeScript" (or pretty close), so I think they will keep the defaults so that JS developers
by mc808 11y ago
One of the most touted features is "your JavaScript is already valid TypeScript" (or pretty close), so I think they will keep the defaults so that JS developers can just change the .js to .ts and be up and running with as little friction as possible.
- geon 11y agoWell, with the last release, typescriot supposedly can compile plain js. https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#including-js-files-with---allowjs https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in... That should make it simple to treat ts more strict than js.
- masklinn 11y ago> Well, with the last release, typescriot supposedly can compile plain js. How does the ability to compile plain JS alter its goal of being a JS superset?
- jdmichal 11y agoBecause it can compile plain JS using the rules present under plain JS, such as nullable and undefined-able types by default, regardless of the rules it's using to compile TS.