Skip to content

Commit

Permalink
docs(contributing): change JSDocs empty line code ecample
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox committed Jun 26, 2022
1 parent 3caa3cc commit baf32c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Expand Up @@ -168,12 +168,12 @@ This rule improves the comments readability by grouping equivalent tags and maki
```ts
/**
* This is a bad JSDoc block, because it has no linebreaks between sections.
* @param a The first summand.
* @param b The second summand.
* @example sum(1, 1) // 2
* @example sum(13, 56) // 69
* @param a The first argument.
* @param b The second argument.
* @example foo(1, 1) // [1, 1]
* @example foo(13, 56) // [13, 56]
*/
function sum(a: number, b: number): string {
function foo(a: number, b: number): [number, number] {
// implementation
}
```
Expand All @@ -188,10 +188,10 @@ function sum(a: number, b: number): string {
* @param a The first summand.
* @param b The second summand.
*
* @example sum(1, 1) // 2
* @example sum(13, 56) // 69
* @example foo(1, 1) // [1, 1]
* @example foo(13, 56) // [13, 56]
*/
function foo(): string {
function foo(a: number, b: number): [number, number] {
// implementation
}
```
Expand Down

0 comments on commit baf32c5

Please sign in to comment.