News for hackers. Stuff that matters.
Re:Modern Node.js Patterns by erikpukinskis on Sunday August 03, 2025 @07:36PM (#44780771)
Why would you want to do either of those?
Re:Modern Node.js Patterns by solarkraft on Sunday August 03, 2025 @08:44PM (#44781134)
Both are very common Typescript patterns.
Re:Modern Node.js Patterns by bapak on Sunday August 03, 2025 @11:33PM (#44781911)
Importing 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.

Re:Modern Node.js Patterns by silverwind on Monday August 04, 2025 @04:55AM (#44783380)
Maybe common in some legacy code bases. I recommend running with `erasableSyntaxOnly` for new code bases.