[2f] Add TypeScript declarations, JSDoc, and fix nftMarkerCount/markerNFTCount naming
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript, typescript
- Lĩnh vực
- api, developer-experience
Hướng nghiên cứu
Start by inventorying the public methods in src/ARFset.js and related source files, then inspect examples for uses of nftMarkerCount and markerNFTCount. Done means the public API has TypeScript declarations, JSDoc with parameter and return information, and one consistent marker-count name throughout src/ and examples.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Add TypeScript declarations, JSDoc on all public methods, and resolve nftMarkerCount / markerNFTCount naming inconsistency
Environment
- Product/Service: FeatureSET-Display — JavaScript API
- Files:
src/ARFset.jsand related source files
Problem Description
Three related API-quality gaps:
- No type declarations: No
.d.tsfile exists, so TypeScript consumers get no type checking or IDE autocompletion. - No JSDoc: Public methods have no documentation, making the API opaque to new consumers.
- Naming inconsistency:
nftMarkerCount(field name) andmarkerNFTCount(local variable name) diverge — one of them is wrong, and the inconsistency is a footgun for callers.
Expected Behavior
- A
.d.tsdeclaration file (or TypeScript source) covers all public API surface. - Every public method has a JSDoc comment with parameter types, return type, and a one-line description.
nftMarkerCount/markerNFTCountare reconciled to a single consistent name throughout the codebase.
Actual Behavior
No type declarations, no JSDoc, inconsistent public naming.
Tasks
- Add TypeScript declarations (
.d.ts) — or convertsrc/to TypeScript outright - Add JSDoc on every public method
- Decide on naming:
nftMarkerCountvsmarkerNFTCountand rename consistently throughoutsrc/and any examples
Impact
Low — Developer experience and API usability. No runtime behavior change.
Additional Context
Converting src/ to TypeScript directly is the higher-value option (catches bugs at compile time, generates .d.ts automatically) but is a larger scope. Adding a hand-authored .d.ts is a quick win that unblocks TypeScript consumers immediately. The naming fix should happen regardless of which approach is chosen.
- Ngôn ngữ chính
- JavaScript
- Star
- 8
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webarkit/FeatureSET-Display
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
Tất cả issue của webarkit/FeatureSET-Display
Issue tương tự
-
needs-website-changes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] 已有证书托管支持拖拽上传Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
-
[Bug]: [A11y] Missing accessible name on icon-only standalone links (WCAG 2.1 SC 2.4.4, 4.1.2)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jaegertracing/jaeger-ui#4596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: CNC Region Calima [CO]Đang mởchannels:add check:passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 9 ngày