File size: 1,760 Bytes
31248b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# @microsoft/tsdoc

<div>
  <br />
  <a href="https://tsdoc.org/">
    <img width="200" src="https://tsdoc.org/images/site/tsdoc.svg">

  </a>

  <p />

</div>


This library is the reference implementation of a parser for the TSDoc syntax.  Using this library is an easy way to ensure that your tool is 100% compatible with the standard.


##  What is TSDoc?

**TSDoc** is a proposal to standardize the doc comments used in [TypeScript](http://www.typescriptlang.org/) source files.  It allows different tools to extract content from comments without getting confused by each other's syntax.   The **TSDoc** notation looks pretty familiar:

```typescript

export class Statistics {

  /**

   * Returns the average of two numbers.

   *

   * @remarks

   * This method is part of the {@link core-library#Statistics | Statistics subsystem}.

   *

   * @param x - The first input number

   * @param y - The second input number

   * @returns The arithmetic mean of `x` and `y`

   *

   * @beta

   */

  public static getAverage(x: number, y: number): number {

    return (x + y) / 2.0;

  }

}

```

## Give it a try!

Check out the [TSDoc Playground](https://tsdoc.org/play) for a cool live demo of our parser!


## API Usage

The [api-demo](https://github.com/microsoft/tsdoc/tree/main/api-demo) folder on GitHub illustrates how
to invoke the TSDoc parser.

A separate NPM package [`@microsoft/tsdoc-config`](https://www.npmjs.com/package/@microsoft/tsdoc-config)
is used for loading the **tsdoc.json** file.


## Get involved

The **TSDoc** project is actively evolving.  Please visit the website for the latest documentation, instructions for building/debugging the projects, and other resources:

https://tsdoc.org/