Skip to content

Add .d.ts files in samples. #530

Open
@UrielCh

Description

@UrielCh

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions