maninak / ts-xor

Compose object types containing mutually exclusive keys, using this generic Typescript utility type.

Home Page:https://app.radicle.at/nodes/seed.radicle.at/rad:z3nP4yT1PE3m1PxLEzr173sZtJVnT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong built files mapping when using lastest ECMAScript Modules config in tsconfig.json

hoangngocthanh opened this issue · comments

Due to https://www.typescriptlang.org/docs/handbook/esm-node.html, it required a full import with file extension when using latest ECMAScript Modules config in tsconfig.json, so it cause a bug that can not expose the XOR declaration.
How to reproduce:
Set: compilerOptions.moduleResolution: "NodeNext" in tsconfig.json

image

Interesting. Thank you for reporting this!

A quick audit with publint shows no errors and one suggestion:

image

I wonder if addressing that will fix it or if there's more to it. I definitely want to look more into this.

@hoangngocthanh could you please append the full contents of your tsconfig.json file in your original message?

Should be fixed with v1.1.1. @hoangngocthanh please let me know how that works for you.

Also, any feedback about the new release's compatibility with existing repos importing ts-xor and having different tsconfig configurations would also be appreciated. Tried my best not too, but it's hard to know I haven't introduced a regression with the cjs/esm mess... 🤷‍♂️

Should be fixed with v1.1.1. @hoangngocthanh please let me know how that works for you.

Also, any feedback about the new release's compatibility with existing repos importing ts-xor and having different tsconfig configurations would also be appreciated. Tried my best not too, but it's hard to know I haven't introduced a regression with the cjs/esm mess... 🤷‍♂️

I find it working well with v1.1.1, thanks for the support!