Daniel Steigerwald

Results 107 comments of Daniel Steigerwald

I suggested that several months ago and @mikearnaldi told me it's absolutely a no-go 😅 It's great he changed his mind. I am all for ESM only because of my...

@kungfooman haha, I just finished reading all that comments. I think what they want is https://github.com/tc39/proposal-type-annotations so there will be js everywhere in the end. @mikearnaldi Did you try mts?...

So I tried mts, and as a result, I got weird TypeScript errors in Node using it, jeez... Btw, TypeScript allows .js extension, so rewriting is not required, only checking....

@mikearnaldi https://github.com/gcanti/fp-ts/issues/1777#issuecomment-1250327708

You can use `.js` extension in `.ts` file. It looks weird, but `tsc` compiles it properly. I suppose it's future compatible when https://github.com/tc39/proposal-type-annotations became a reality. Then we will rename...

@mikearnaldi https://github.com/microsoft/TypeScript/issues/16577#issuecomment-754941937 ".js file extensions are now allowed"

Meanwhile, I tested two eslint plugins for checking file extensions. Guess what, no one works. This one check also packages, can't be disabled. https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/file-extension-in-import.md This does not work either. https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md

Funny thing [email protected] with Node 16 ESM: I need `pipe`. I can't use `import { pipe } from "fp-ts/function"` of course. But I can't use `import { pipe } from...

@mikearnaldi Can you please repeat the problem with writing .mts from the start? It enforces the extension and should work well. I had some issues with types, but the same...

As for testing... I just spend a few hours trying to force Jest to work with ESM. No success. And I'm not alone. - https://twitter.com/kcaliskan/status/1572463967603429377 - https://twitter.com/thdxr/status/1572597312664354816 Then I switched...