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

Exporting of TypeScript types? #22

Open
danawoodman opened this issue Aug 2, 2022 · 5 comments
Open

Exporting of TypeScript types? #22

danawoodman opened this issue Aug 2, 2022 · 5 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@danawoodman
Copy link

Is there plans to export the TS types for this package? I see there is some typing in the source, but when consuming the package in SvelteKit, the types aren't making their way over.

@babichjacob babichjacob added bug Something isn't working enhancement New feature or request labels Aug 2, 2022
@babichjacob
Copy link
Owner

The types are definitely supposed to be exported. I was able to see them when developing in the demo app, for instance. I have to look into this

@babichjacob babichjacob self-assigned this Aug 2, 2022
@danawoodman
Copy link
Author

Thanks for the quick reply @babichjacob, this is what I see in a fairly new Kit project:

image

@danawoodman
Copy link
Author

@babichjacob any luck with this?

@babichjacob
Copy link
Owner

babichjacob commented Sep 5, 2022

Sorry for the delay. I just found out that you can get the types and JSDoc hints to work in TypeScript projects by adding "maxNodeModuleJsDepth": 1 in compilerOptions in tsconfig.json. (allowJs is reportedly also needed but that is included by default in SvelteKit apps, and I didn't see a difference in testing).

This isn't amazing, so I might have to look into another solution from the library's side instead of consumer's.

babichjacob added a commit that referenced this issue Sep 5, 2022
@babichjacob
Copy link
Owner

This has been added to the README in 2ae719c.

@babichjacob babichjacob removed their assignment Oct 16, 2024
@babichjacob babichjacob added the help wanted Extra attention is needed label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants