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

chore: Bump @napi-rs/cli to 2.18.4 #621

Open
Xanewok opened this issue Aug 23, 2024 · 0 comments
Open

chore: Bump @napi-rs/cli to 2.18.4 #621

Xanewok opened this issue Aug 23, 2024 · 0 comments

Comments

@Xanewok
Copy link
Member

Xanewok commented Aug 23, 2024

The 2.18.4 also contains the missing declare attribute when exporting but I didn't pull that in to reduce churn across our feature branches; I assume that all of them modifies the index.d.ts substantially and so let's do that separately at our leisure.

Can you expand on this? How valuable is to do that change? And, if you think it's valuable enough, could you open an issue about that?

Originally posted by @fvictorio in #617 (review)

As part of the maintenance work, we should bump the @napi-rs/cli crate to the newest version. The 2.18.4 version adds a declare annotation to the typings which is slightly more correct, as the generated index.d.ts does not define the exported types in 99% of the cases but only provides the typings for items already defined by the native addon.

I'm not sure whether the declare is still considered to be good practice but it certainly doesn't hurt for now. See https://www.typescriptlang.org/docs/handbook/declaration-files/by-example.html for some examples.

@Xanewok Xanewok changed the title Bump @napi-rs/cli to 2.18.4 chore: Bump @napi-rs/cli to 2.18.4 Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant