'Reuse JSDoc comment between TypeScript interfaces
Let's say I have the following interfaces:
interface Foo {
/**
* A date string in the format `yyyy-MM-dd`
*/
archiveDate: string;
}
interface Bar {
/**
* A date string in the format `yyyy-MM-dd`
*/
publishDate: string;
}
As you can see, the JSDoc descriptions are exactly the same between the two interfaces. Is there a way of sharing the descriptions between the two (and possibly many more) interfaces so I don't have to copy/paste the same description many times.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
