File tree Expand file tree Collapse file tree 7 files changed +50
-4
lines changed
baselines/reference/convertToAsyncFunction Expand file tree Collapse file tree 7 files changed +50
-4
lines changed Original file line number Diff line number Diff line change @@ -3580,7 +3580,8 @@ namespace ts {
3580
3580
}
3581
3581
3582
3582
// TODO: Should prefix `++` and `--` be moved to the `Update` precedence?
3583
- // TODO: We are missing `TypeAssertionExpression`
3583
+ case SyntaxKind . TypeAssertionExpression :
3584
+ case SyntaxKind . NonNullExpression :
3584
3585
case SyntaxKind . PrefixUnaryExpression :
3585
3586
case SyntaxKind . TypeOfExpression :
3586
3587
case SyntaxKind . VoidExpression :
@@ -3602,6 +3603,9 @@ namespace ts {
3602
3603
case SyntaxKind . ElementAccessExpression :
3603
3604
return OperatorPrecedence . Member ;
3604
3605
3606
+ case SyntaxKind . AsExpression :
3607
+ return OperatorPrecedence . Relational ;
3608
+
3605
3609
case SyntaxKind . ThisKeyword :
3606
3610
case SyntaxKind . SuperKeyword :
3607
3611
case SyntaxKind . Identifier :
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function wrapResponse<T>(response: T): APIResponse<T> {
19
19
}
20
20
21
21
async function get ( ) {
22
- const response = await Promise . resolve ( ( undefined ! ) ) ;
22
+ const response = await Promise . resolve ( undefined ! ) ;
23
23
const result : APIResponse < { email : string ; } > = wrapResponse ( response ) ;
24
24
return result ;
25
25
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function wrapResponse<T>(response: T): APIResponse<T> {
19
19
}
20
20
21
21
async function get ( ) {
22
- const d = await Promise . resolve ( ( undefined ! ) ) ;
22
+ const d = await Promise . resolve ( undefined ! ) ;
23
23
const result : APIResponse < { email : string ; } > = wrapResponse ( d ) ;
24
24
return result ;
25
25
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function wrapResponse<T>(response: T): APIResponse<T> {
22
22
}
23
23
24
24
async function get ( ) {
25
- const d = await Promise . resolve ( ( undefined ! ) ) ;
25
+ const d = await Promise . resolve ( undefined ! ) ;
26
26
console . log ( d ) ;
27
27
const result : APIResponse < { email : string ; } > = wrapResponse ( d ) ;
28
28
return result ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ // @filename : foo.ts
4
+ ////const foo = /*a*/1!/*b*/;
5
+
6
+ goTo . select ( "a" , "b" ) ;
7
+ edit . applyRefactor ( {
8
+ refactorName : "Extract Symbol" ,
9
+ actionName : "constant_scope_0" ,
10
+ actionDescription : "Extract to constant in enclosing scope" ,
11
+ newContent :
12
+ `const newLocal = 1!;
13
+ const foo = /*RENAME*/newLocal;`
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ // @filename : foo.ts
4
+ ////const foo = /*a*/1 as number/*b*/;
5
+
6
+ goTo . select ( "a" , "b" ) ;
7
+ edit . applyRefactor ( {
8
+ refactorName : "Extract Symbol" ,
9
+ actionName : "constant_scope_0" ,
10
+ actionDescription : "Extract to constant in enclosing scope" ,
11
+ newContent :
12
+ `const newLocal = 1 as number;
13
+ const foo = /*RENAME*/newLocal;`
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts' />
2
+
3
+ // @filename : foo.ts
4
+ ////const foo = /*a*/<number>1/*b*/;
5
+
6
+ goTo . select ( "a" , "b" ) ;
7
+ edit . applyRefactor ( {
8
+ refactorName : "Extract Symbol" ,
9
+ actionName : "constant_scope_0" ,
10
+ actionDescription : "Extract to constant in enclosing scope" ,
11
+ newContent :
12
+ `const newLocal = <number>1;
13
+ const foo = /*RENAME*/newLocal;`
14
+ } ) ;
You can’t perform that action at this time.
0 commit comments