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.js and related source files
Problem Description
Three related API-quality gaps:
- No type declarations: No
.d.ts file 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) and markerNFTCount (local variable name) diverge — one of them is wrong, and the inconsistency is a footgun for callers.
Expected Behavior
- A
.d.ts declaration 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 / markerNFTCount are reconciled to a single consistent name throughout the codebase.
Actual Behavior
No type declarations, no JSDoc, inconsistent public naming.
Tasks
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.
Summary
Add TypeScript declarations, JSDoc on all public methods, and resolve
nftMarkerCount/markerNFTCountnaming inconsistencyEnvironment
src/ARFset.jsand related source filesProblem Description
Three related API-quality gaps:
.d.tsfile exists, so TypeScript consumers get no type checking or IDE autocompletion.nftMarkerCount(field name) andmarkerNFTCount(local variable name) diverge — one of them is wrong, and the inconsistency is a footgun for callers.Expected Behavior
.d.tsdeclaration file (or TypeScript source) covers all public API surface.nftMarkerCount/markerNFTCountare reconciled to a single consistent name throughout the codebase.Actual Behavior
No type declarations, no JSDoc, inconsistent public naming.
Tasks
.d.ts) — or convertsrc/to TypeScript outrightnftMarkerCountvsmarkerNFTCountand rename consistently throughoutsrc/and any examplesImpact
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.tsautomatically) but is a larger scope. Adding a hand-authored.d.tsis a quick win that unblocks TypeScript consumers immediately. The naming fix should happen regardless of which approach is chosen.