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.
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 aclass
is an interface, for example, however, when TypeScript processes a.js
source file it cannot. Since both types of source files will be processed bytsdoc
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 intsdoc
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 intsdoc
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 intsdoc
to allow both.ts
and.js
source files to indicate the license associated with the source file.