UNPKG

1.07 kBMarkdownView Raw
1## typedoc-plugin-no-inherit
2
3
4A plugin for [Typedoc](http://typedoc.org) to exclude inherited members from a Typedoc class using `@noInheritDoc` annotation.
5
6[![npm](https://img.shields.io/npm/v/typedoc-plugin-no-inherit.svg)](https://www.npmjs.com/package/typedoc-plugin-no-inherit)
7[![Build Status](https://travis-ci.com/jonchardy/typedoc-plugin-no-inherit.svg?branch=master)](https://travis-ci.com/jonchardy/typedoc-plugin-no-inherit)
8
9### Installation
10
11```
12npm install typedoc-plugin-no-inherit --save-dev
13```
14
15### Usage
16
17Add `@noInheritDoc` tags in a class or interface's docstring to prevent it from inheriting documentation from its parents.
18
19```ts
20class Animal {
21 /**
22 * Documentation for move() method.
23 */
24 public move(distanceInMeters: number = 0) {
25 console.log(`Animal moved ${distanceInMeters}m.`);
26 }
27}
28
29/**
30 * Documentation for the Dog class.
31 * @noInheritDoc
32 */
33class Dog extends Animal {
34 /**
35 * Documentation for bark() method.
36 */
37 public bark() {
38 console.log('Woof! Woof!');
39 }
40}
41```