Post

Yes, see the blog 😆 The TypeScript docs and 2 validation tools are linked The reason why it’s incorrect is because the d.ts file needs to match the module format of the file its paired with but there’s only one for both ESM and CJS

0 reposts0 likes

Not sure what Preconstruct tools does or what you mean by the ESM-wrapper-for-CJS pattern—I’d need to see the config to comment. Re: xstate It works because types includes nested conditions for ESM & CJS You need separate .d.ts files for each; many mistakenly ship just one