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 .d.ts files in samples. #530

Open
UrielCh opened this issue Sep 5, 2024 · 1 comment
Open

Add .d.ts files in samples. #530

UrielCh opened this issue Sep 5, 2024 · 1 comment

Comments

@UrielCh
Copy link

UrielCh commented Sep 5, 2024

Hi,

Native Import in NodeJS do not provide any Typing by default.

src/1-getting-started/6_object_wrap/node-addon-api/myobject.cc register a class MyObject having a plusOne method.
but coding in addon.js will not give access to any typing.

My I open a PR to add d.ts
that contains somthink like:

class MyObject {
    public plusOne(): number;
    public value(): number;
    public multiply(num?: number): number;
}
@UrielCh
Copy link
Author

UrielCh commented Sep 9, 2024

I have a PR for that:

#538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Need Triage
Development

No branches or pull requests

1 participant