mirror of
https://github.com/hanzoai/iam-sdk.git
synced 2026-10-30 14:54:01 +00:00
Every `require` branch pointed at the same .d.ts as `import`, and "type": "module" makes TypeScript read that as an ES module. A .cts consumer on module node16 got TS1479 on all 17 subpaths, for a .cjs file that loads fine. scripts/cts.mjs copies each .d.ts to a .d.cts whose relative imports name .cjs. The exports map drops its `types` conditions: TypeScript types a .js by the .d.ts beside it and a .cjs by the .d.cts. The new test installs the package into a throwaway consumer and typechecks a .cts and a .mts that import every subpath, with skipLibCheck off. On the old build it fails with 17 TS1479. Co-authored-by: Hanzo Dev <[email protected]>