You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript has an option for stripping away internal-use declarations, stripInternals. It removes exported variables, public fields that are marked with @internal in the doc comments.
Useful in two cases:
The need to expose variables, functions for testing, but otherwise undocumented/not meant for public usage
Where private fields in classes aren't a choice (need access from outside) and alternatives like WeakMap or declaring a getter function inside a static block seem a little too much.
classBox{/** @internal */_private: string='private string';}constbox=newBox();// we can access it, but it won't be documented at all, etcbox._private;
filed as per this Discord message, but perhaps it needs a little more than just on the documentation side? (e.g. JSR needs to strip it too for npm usage, Deno needs to ignore it when it's in an external dependency, etc.)
The text was updated successfully, but these errors were encountered:
I think it should, judging by the description of @ignore.
TypeScript only does @internal and it only does so if stripInternal is being used, and @ignore isn't really being stripped out of declarations and all.
TypeScript has an option for stripping away internal-use declarations,
stripInternals
. It removes exported variables, public fields that are marked with@internal
in the doc comments.Useful in two cases:
filed as per this Discord message, but perhaps it needs a little more than just on the documentation side? (e.g. JSR needs to strip it too for npm usage, Deno needs to ignore it when it's in an external dependency, etc.)
The text was updated successfully, but these errors were encountered: