mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
* Use documentation comments from inherited properties when @inheritDoc is present The JSDoc `@ineheritDoc` [tag](http://usejsdoc.org/tags-inheritdoc.html) "indicates that a symbol should inherit its documentation from its parent class". In the case of a TypeScript file, this also includes implemented interfaces and parent interfaces. With this change, a class method or property (or an interface property) with the `@inheritDoc` tag in its JSDoc comment will automatically use the comments from its nearest ancestor that has no `@inheritDoc` tag. To prevent breaking backwards compatibility, `Symbol.getDocumentationComment` now accepts an optional `TypeChecker` instance to support this feature. fixes #8912 * Use ts.getJSDocTags as per @andy-ms 's recommendation * Convert @inheritDoc tests to verify.quickInfoAt * Concatenate inherited and local docs when @inheritDoc is present * Make typeChecker param explicitly `TypeChecker | undefined` * Re-accept baseline after switch to explicit `| undefined` * Update APISample_jsodc.ts to match new getDocumentationComment signature * Re-accept baselines after rebasing