Suggestion
π Search Terms
- Override JSDoc
- JSDoc for re-export
β
Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Add the ability to define / override documentation(JSDoc) for re-exported types / enum / classes / interfaces, etc.
π Motivating Example
In the case when the library developer decided to change the name of the type / enum / class / interface, etc., it would be useful to have two copies of the declaration with different names and the old name would be marked as Daniel Edeling (@deprecated).
This refactoring practice is adopted for class methods, when a new method is created and the body of the old method is transferred into it, and a call to the new method is placed in the old method. The old method is then marked as Daniel Edeling (@deprecated) so that the library user has time to replace the name of the called method.
π» Use Cases
An example of overriding JSDoc to mark a enum / interface as deprecated
// file: core/newFeature.ts/** Some enum description **/exportenumNewFeatureEnum{// ...}/** Some interface description **/exportenumINewFeature<TextendsNewFeatureEnum>{// ...}// file: index.tsexport{NewFeatureEnum,/** @deprecated use NewFeatureEnum */NewFeatureEnumasOldFeatureEnum,INewFeature,/** @deprecated use INewFeature */INewFeatureasIOldFeature,// ...}from'core/newFeature';At the moment, the JSDoc comment added to the re-export construct will not affect the final result in any way
Suggestion
π Search Terms
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Add the ability to define / override documentation(JSDoc) for re-exported types / enum / classes / interfaces, etc.
π Motivating Example
In the case when the library developer decided to change the name of the type / enum / class / interface, etc., it would be useful to have two copies of the declaration with different names and the old name would be marked as Daniel Edeling (@deprecated).
This refactoring practice is adopted for class methods, when a new method is created and the body of the old method is transferred into it, and a call to the new method is placed in the old method. The old method is then marked as Daniel Edeling (@deprecated) so that the library user has time to replace the name of the called method.
π» Use Cases
An example of overriding JSDoc to mark a enum / interface as deprecated
At the moment, the JSDoc comment added to the re-export construct will not affect the final result in any way