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

Fix incorrect export in TS declaration #18

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

jclusso
Copy link
Member

@jclusso jclusso commented Mar 22, 2024

Closes #15 and is a simplification of #16.

@jclusso
Copy link
Member Author

jclusso commented Mar 22, 2024

@vgoloviznin what do you think of this?

@vgoloviznin
Copy link

Getting all declarations in a single file is not correct from the TS POV as you actually miss what's being exported from other files than emailable.js.

However, from getting the typings just for the emailable file this is correct and will work.

I've also updated my PR with extra typings, the auto-type-generator missed them and I didn't spot this.

@jclusso
Copy link
Member Author

jclusso commented Mar 22, 2024

Getting all declarations in a single file is not correct from the TS POV as you actually miss what's being exported from other files than emailable.js.

However, from getting the typings just for the emailable file this is correct and will work.

So is this sufficient to make TS users happy? That's really the goal here and I'd like to avoid cluttering the project with extra files.

I've also updated my PR with extra typings, the auto-type-generator missed them and I didn't spot this.

I noticed those regressions to a few of the fields. This PR should already handle them I believe since I incorprated the changes from your PR and the original.

Thanks for your help!

@vgoloviznin
Copy link

This should be sufficient, yes, as it fixes the main issue of the emailable export. You're welcome!

@jclusso jclusso merged commit 5a83e7b into master Mar 22, 2024
5 checks passed
@jclusso jclusso deleted the fix_ts_definition branch March 22, 2024 18:42
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.

Type definition file does not correspond to current code
2 participants