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:
- Binding check: still collect
_ names, but don't require them in the declarations.
- Declaration rendering: leave
_ functions, properties, symbols, and variables out of the generated .d.ts.
- 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.
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 checkscansbindingSourcesfor bound names and fails withundocumented_bindingsif any name is missing from the declarations. So a mod can't remove these bindings before the check.renderDeclarationswrites every symbol, function, and property from the metadata intogeneratedEntryPoint, and its JSDoc output has no way to add@internalor@hidden.api.d.ts, the TypeDoc reference, andpublic/api/<target>.json.Seen in 0.6.3 and 0.8.0.
Proposal
Treat a binding whose JS name starts with
_as internal:_names, but don't require them in the declarations._functions, properties, symbols, and variables out of the generated.d.ts."internalPrefix": "_", ornullto turn it off) for mods that want them kept.Acceptance criteria
_foodoesn't appear in the generated declarations or the rendered reference.docs checkpasses when_foois bound in C++ but not declared._) still failsdocs check._-prefixed bindings get the same output as before.