Skip to content

[2f] Add TypeScript declarations, JSDoc, and fix nftMarkerCount/markerNFTCount naming #25

Description

@kalwalt

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:

  1. No type declarations: No .d.ts file exists, so TypeScript consumers get no type checking or IDE autocompletion.
  2. No JSDoc: Public methods have no documentation, making the API opaque to new consumers.
  3. 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

  • Add TypeScript declarations (.d.ts) — or convert src/ to TypeScript outright
  • Add JSDoc on every public method
  • Decide on naming: nftMarkerCount vs markerNFTCount and rename consistently throughout src/ 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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