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:
/**
* @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.
/**
* @typedef {import('my-package').MyType} MyType
* @internal
*/
A lot of practical use cases exist in the unified ecosystem.
For example remark-rehype.
Suggestion
π Search Terms
jsdoc internaljsdoc internal stripinternalβ Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Currently, if
"stripInternal": trueis set in the compiler options, the@internalJSDoc 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
@internalcould also be applied to types in JSDoc.π Motivating Example
The
@internalannotation 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.