3 ms·
Right, this is what people are arguing about in the issue. It’s honestly extraordinarily unintuitive and frustrating, and the team’s arguments are more philoso
by noahtallen 4y ago
Right, this is what people are arguing about in the issue.
It’s honestly extraordinarily unintuitive and frustrating, and the team’s arguments are more philosophical than practical (along the lines of “typescript will never deviate from JavaScript language specification”). I’m not very sympathetic since the entire language is incompatible with a JS interpreter, and importing from a file that doesn’t actually exist is really poor DevX.
I really wish the TS team had not forced people to decide between ESM (the future of JS modules) or importing files that don’t actually exist everywhere in the codebase.
- nikeee 4y agoI think it's the right solution, though I get that it confuses people. Given that the compiler only erases static type annotations, it should not touch the imports. > entire language is incompatible with a JS interpreter If this proposal will ever be accepted, TS will be (in large parts) valid JS: https://github.com/tc39/proposal-type-annotations https://github.com/tc39/proposal-type-annotations
- icholy 4y agoTell that to enums