2 ms·
Why would you want to do either of those?
by erikpukinskis 1y ago
Why would you want to do either of those?
- solarkraft 1y agoBoth are very common Typescript patterns.
- bapak 1y agoImporting without extensions is not a TypeScript thing at all. Node introduced it at the beginning and then stopped when implementing ESM. Being strict is a feature. What's true is that they "support TS" but require .ts extensions, which was never even allowed until Node added "TS support". That part is insane. TS only ever accepted .js and officially rejected support for .ts appearing in imports. Then came Node and strong-armed them into it.
- silverwind 1y agoMaybe common in some legacy code bases. I recommend running with `erasableSyntaxOnly` for new code bases.