Currently, if "stripInternal": true is set in the compiler options, the @internal JSDoc annotation can be used to prevent it from ending up in the generated type definitions.
When using types in JSDoc, a type can be defined using:
/**
* @typedef {object} MyType
* Description of `MyType`.
*/
It would be great of @internal could also be applied to types in JSDoc.
📃 Motivating Example
The @internal annotation now also works for types defined in JSDoc if the "stripInternal" option is enabled.
/**
* @typedef {object} MyType
* @internal
*/
💻 Use Cases
These typedefs are always exported, but often they are only defined to import a type. This means that packages often need to add a dependency on packages only for their types, even if the intention isn’t to re-export them.
Suggestion
🔍 Search Terms
jsdoc internal
jsdoc internal stripinternal
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
Currently, if
"stripInternal": true
is set in the compiler options, the@internal
JSDoc annotation can be used to prevent it from ending up in the generated type definitions.When using types in JSDoc, a type can be defined using:
It would be great of
@internal
could also be applied to types in JSDoc.📃 Motivating Example
The
@internal
annotation now also works for types defined in JSDoc if the"stripInternal"
option is enabled.💻 Use Cases
These typedefs are always exported, but often they are only defined to import a type. This means that packages often need to add a dependency on packages only for their types, even if the intention isn’t to re-export them.
A lot of practical use cases exist in the unified ecosystem.
For example
remark-rehype
.