Skip to content

Commit 1022731

Browse files
committed
Add repro
1 parent 2e1fc9f commit 1022731

File tree

3 files changed

+43
-19
lines changed

3 files changed

+43
-19
lines changed

run.sh

100644100755
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,3 @@ yarn
88

99
# Run TypeDoc
1010
yarn typedoc
11-
12-
echo
13-
echo ========================================================
14-
echo
15-
16-
# Print commands before running them, to make CI output easier to understand
17-
set -v
18-
19-
# You can add additional commands here to make assertions on the output,
20-
# if TypeDoc's output doesn't match what you expected. Here's one example
21-
# checking that the name from package.json is used in TypeDoc's output.
22-
23-
test $(jq '.name' docs/docs.json) = '"typedoc-repros"'

src/index.ts

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
/**
2-
* Some code reproducing a bug.
2+
* @license
3+
* Copyright 2021 Google LLC
4+
* SPDX-License-Identifier: BSD-3-Clause
35
*/
4-
export const bug = 123;
6+
7+
/**
8+
* Returns an iterable of integers from `start` to `end` (exclusive)
9+
* incrementing by `step`.
10+
*
11+
* If `start` is omitted, the range starts at `0`. `step` defaults to `1`.
12+
*
13+
* @example
14+
*
15+
* ```ts
16+
* render() {
17+
* return html`
18+
* ${map(range(8), () => html`<div class="cell"></div>`)}
19+
* `;
20+
* }
21+
* ```
22+
*/
23+
export function range(end: number): Iterable<number>;
24+
/**
25+
* Documentation on second signature
26+
*/
27+
export function range(
28+
start: number,
29+
end: number,
30+
step?: number
31+
): Iterable<number>;
32+
export function* range(startOrEnd: number, end?: number, step = 1) {
33+
const start = end === undefined ? 0 : startOrEnd;
34+
end ??= startOrEnd;
35+
for (let i = start; step > 0 ? i < end : end < i; i += step) {
36+
yield i;
37+
}
38+
}

tsconfig.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"compilerOptions": {
3-
"strict": true
4-
},
5-
"include": ["src"]
2+
"compilerOptions": {
3+
"module": "Node16",
4+
"target": "ES2022",
5+
"lib": ["ES2022"],
6+
"strict": true
7+
},
8+
"include": ["src"]
69
}

0 commit comments

Comments
 (0)