-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
octogonz-parser-backlogItems for @octogonz to consider during the next iteration on the parserItems for @octogonz to consider during the next iteration on the parserrequest for commentsA proposed addition to the TSDoc specA proposed addition to the TSDoc spec
Description
RFC: Core set of tags for TSDoc brought up the question of the @example
tag that could be used to identify examples. I'm forking it into a separate issue since @c69 pointed out that the design is unclear.
Can anyone find samples of its usage in existing documentation systems?
Since TSDoc will support Markdown, how would it interact with that? Maybe something like this?
/**
* Adds two numbers together.
* @example
* Here's a simple example:
* ```
* // Prints "2":
* console.log(add(1,1));
* ```
* @example
* Here's an example with negative numbers:
* ```
* // Prints "0":
* console.log(add(1,-1));
* ```
*/
export function add(x: number, y: number): number {
}
How would an API reference web site leverage these directives?
admir86, sindresorhus, danguilherme, jasonkuhrt, bitjson and 8 more
Metadata
Metadata
Assignees
Labels
octogonz-parser-backlogItems for @octogonz to consider during the next iteration on the parserItems for @octogonz to consider during the next iteration on the parserrequest for commentsA proposed addition to the TSDoc specA proposed addition to the TSDoc spec