Closed a-type closed 1 year ago
Well, I thought this would be enough, but using linking to test this locally all my styled native elements are being typed as StyledComponent<string, ...
and are still broken. Unsure if that's related to linking (new to pnpm). If I do styled('div' as const
it's happy, so it's at least an improvement.
Yeah, there are minor ESM differences like not being able to import directory indexes which could trip up in the future, but hopefully this is good enough for now. Glad I can drop my local npm links now! Thanks for the review.
fixes type module resolution for NodeNext/ESM in TypeScript
fixes #1084
TypeScript requires
.d.ts
files to follow ESM module import rules as well, so these files needed extensions added to imported local modules so that types can be resolved when Stitches is used in a project that hasmoduleResolution: 'NodeNext'
.