microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.7k stars 130 forks source link

Feature support for additional JSDoc tags @interface, @enum, @license #296

Open houghtonap opened 3 years ago

houghtonap commented 3 years ago

Problem

TypeScript may be used in a mixed mode environment where you may have some TypeScript source files and some JavaScript source files. The TypeScript compiler will process both source file types. In the case when TypeScript processes a .ts source file it can determine when a class is an interface, for example, however, when TypeScript processes a .js source file it cannot. Since both types of source files will be processed by tsdoc there needs to be some mechanism to determine missing information when a .js source file is processed, otherwise the documentation will be incomplete and inaccurate when compared with the TypeScript documentation in the same project.

@interface tag

The @interface tag is supported in JSDoc and it is proposed that it also be supported in tsdoc to allow .js source files to indicate that a class is an interface.

@enum tag

The @enum tag is supported in JSDoc and it is proposed that it also be supported in tsdoc to allow .js source files to indicate that a class is an enumeration.

@license tag

The @license tag is supported in JSDoc and it is proposed that it also be supported in tsdoc to allow both .ts and .js source files to indicate the license associated with the source file.

crystalfp commented 3 years ago

I dare to add also @module tag used by TypeDoc to mark a comment as global description of the module.