/
gh1898.ts
34 lines (31 loc) · 1 KB
/
gh1898.ts
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
/** I am documented, but the validator thinks otherwise. */
export type FunctionType = (foo: string) => string;
export type UnDocFn = (foo: string) => string;
/** This docblock works fine. */
export class ExampleClass {
/** This wrongly complains about not being documented */
[Symbol.iterator]() {
return {
/** This also says it's not documented. */
index: 0,
/** This one too. */
next(): IteratorResult<number> {
return { done: false, value: this.index++ };
},
};
}
/**
* @hidden
*/
[Symbol.asyncIterator]() {
return {
// This does _not_ complain, which is what I would expect.
index: 0,
// Even though it's not rendered in the final docs, it still complains
// that this isn't documented.
async next(): Promise<IteratorResult<number>> {
return { done: false, value: this.index++ };
},
};
}
}