Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to exports (fixes issue #38 for ES imports) #50

Closed
wants to merge 1 commit into from

Conversation

iainmerrick
Copy link

See TypeScript issue here: microsoft/TypeScript#52363 I don't entirely follow what TS is doing, but I've based this commit on a PR linked from that discussion: gxmari007/vite-plugin-eslint#60

I don't think this will work for CJS imports as TS seems to be pedantic around file suffixes -- we may need to copy or wrap the .d.ts file somehow. I'll investigate that separately.

See TypeScript issue here: microsoft/TypeScript#52363
I don't entirely follow what TS is doing, but I've based this commit on a PR
linked from that discussion: gxmari007/vite-plugin-eslint#60

I don't think this will work for CJS imports as TS seems to be pedantic around
file suffixes -- we may need to copy or wrap the .d.ts file somehow.
I'll investigate that separately.
@muratgozel
Copy link
Owner

hi @iainmerrick im well aware of this situations with typescript and i think the types field in the package.json should be enough to not to cause any issue. im updating the package right now and will test if it raises any issues related to this. i will return to this pr later.

@muratgozel
Copy link
Owner

hi again @iainmerrick there was more to do with type generation, importing and other kind of stuff, i had to handled it by myself. all should be fixed now. closing this pr but please let me know if you have any other problems.

@muratgozel muratgozel closed this Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants