Skip to content

Conversation

matthewkeil
Copy link
Contributor

Add a TypeScript example for node-addon-api Napi::AsyncWoker and that is Promise based.

Copy link
Contributor

@KevinEady KevinEady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @matthewkeil ,

Thanks for your submission!

We don't usually put TypeScript in our examples. Could you remove the typings as well as test.ts, incorporating its functionality directly in index.js?

Some of our other examples run by doing npm i && node . ... It would be nice to have that same paradigm here 👍

And if you could add new-lines to the end of your files too 👍

@matthewkeil
Copy link
Contributor Author

@KevinEady Thanks for the quick review!! I touched up everything and added a few extra comments for clarity to worker.h. Please double check that those additions are ok. Thanks!!

@matthewkeil matthewkeil requested a review from KevinEady July 1, 2023 07:08
Copy link
Contributor

@KevinEady KevinEady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson mhdawson merged commit b0de26f into nodejs:main Jul 12, 2023
@matthewkeil matthewkeil deleted the async-worker-promise branch July 12, 2023 17:03
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.

3 participants