Add .d.ts files in samples.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp, javascript, node.js, typescript
- Domain
- developer-experience
Research direction
Start with src/1-getting-started/6_object_wrap/node-addon-api/myobject.cc and the related addon.js to compare the exposed MyObject API with the proposed declarations. Add the relevant .d.ts files for the samples, ensuring the listed plusOne, value, and multiply methods are represented with their shown types.
Written by the indexing model from the issue text.
Description
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;
}
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 602
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/node-addon-examples
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
nodejs/node-addon-examples#585 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nodejs/node-addon-examples#445 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
nodejs/node-addon-examples#444 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
nodejs/node-addon-examples#381 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
nodejs/node-addon-examples#380 · 2 comments ·
All issues in nodejs/node-addon-examples
Similar issues
-
Website Doc Typo Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100