UNPKG

1.64 kBMarkdownView Raw
1# @microsoft/tsdoc
2
3This 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.
4
5
6## What is TSDoc?
7
8**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:
9
10```typescript
11export class Statistics {
12 /**
13 * Returns the average of two numbers.
14 *
15 * @remarks
16 * This method is part of the {@link core-library#Statistics | Statistics subsystem}.
17 *
18 * @param x - The first input number
19 * @param y - The second input number
20 * @returns The arithmetic mean of `x` and `y`
21 *
22 * @beta
23 */
24 public static getAverage(x: number, y: number): number {
25 return (x + y) / 2.0;
26 }
27}
28```
29
30## Give it a try!
31
32Check out the [TSDoc Playground](https://microsoft.github.io/tsdoc/) for a cool live demo of our parser!
33
34
35## API Usage
36
37The [api-demo](https://github.com/microsoft/tsdoc/tree/master/api-demo) folder on GitHub illustrates how
38to invoke the TSDoc parser.
39
40A separate NPM package [`@microsoft/tsdoc-config`](https://www.npmjs.com/package/@microsoft/tsdoc)
41is used for loading the **tsdoc.json** file.
42
43
44## Get involved
45
46The **TSDoc** project is actively evolving. Please visit our GitHub project for the latest documentation, instructions for building/debugging the projects, and other resources:
47
48https://github.com/microsoft/tsdoc