Add .d.ts files in samples.

Đang mở
#530 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, javascript, node.js, typescript
Lĩnh vực
developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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;
}
Ngôn ngữ chính
C++
Star
2.6k
Fork
602
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node-addon-examples

Tất cả issue của nodejs/node-addon-examples

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.