Skip to content

Services Request: Treat _-prefixed bindings as internal: skip them in declaration rendering and the binding check #282

Description

@Kheartz

Problem

Mods may want to mark dev/internal bindings with a leading underscore (e.g. Pvp._staggerRun) for internal/private automated testing (etc...). services-cli has no way to keep them out of the public contract or the rendered docs:

  • docs check scans bindingSources for bound names and fails with undocumented_bindings if any name is missing from the declarations. So a mod can't remove these bindings before the check.
  • renderDeclarations writes every symbol, function, and property from the metadata into generatedEntryPoint, and its JSDoc output has no way to add @internal or @hidden.
  • As a result, internal bindings end up in the published api.d.ts, the TypeDoc reference, and public/api/<target>.json.

Seen in 0.6.3 and 0.8.0.

Proposal

Treat a binding whose JS name starts with _ as internal:

  1. Binding check: still collect _ names, but don't require them in the declarations.
  2. Declaration rendering: leave _ functions, properties, symbols, and variables out of the generated .d.ts.
  3. Opt-out: add an optional per-target setting (e.g. "internalPrefix": "_", or null to turn it off) for mods that want them kept.

Acceptance criteria

  • A metadata function named _foo doesn't appear in the generated declarations or the rendered reference.
  • docs check passes when _foo is bound in C++ but not declared.
  • A misspelled public binding (no leading _) still fails docs check.
  • Mods without _-prefixed bindings get the same output as before.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions