Skip to content

Commit c6b51d8

Browse files
committed
fix
1 parent 93e4217 commit c6b51d8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/docs/guide/usage/linter/rules/typescript/await-thenable.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ While it is valid JavaScript to await a non-Promise-like value (it will resolve
3232

3333
Examples of **incorrect** code for this rule:
3434

35-
```ts
35+
```
3636
await 12;
3737
await (() => {});
3838
@@ -43,15 +43,11 @@ await { then() {} };
4343
// this is not a Promise - it's a function that returns a Promise
4444
declare const getPromise: () => Promise<string>;
4545
await getPromise;
46-
await getPromise;
47-
await getPromise;
48-
await getPromise;
49-
await getPromise;
5046
```
5147

5248
Examples of **correct** code for this rule:
5349

54-
```ts
50+
```
5551
await Promise.resolve("value");
5652
await Promise.reject(new Error());
5753
@@ -65,10 +61,6 @@ await {
6561
// this is a Promise - produced by calling a function
6662
declare const getPromise: () => Promise<string>;
6763
await getPromise();
68-
await getPromise();
69-
await getPromise();
70-
await getPromise();
71-
await getPromise();
7264
```
7365

7466
## How to use

0 commit comments

Comments
 (0)