File tree 3 files changed +18
-4
lines changed
crates/oxc_isolated_declarations
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -52,16 +52,15 @@ impl<'a> IsolatedDeclarations<'a> {
52
52
self . error ( inferred_type_of_class_expression ( expr. span ) ) ;
53
53
Some ( self . ast . ts_unknown_keyword ( SPAN ) )
54
54
}
55
+ Expression :: ParenthesizedExpression ( expr) => {
56
+ self . infer_type_from_expression ( & expr. expression )
57
+ }
55
58
Expression :: TSNonNullExpression ( expr) => {
56
59
self . infer_type_from_expression ( & expr. expression )
57
60
}
58
61
Expression :: TSSatisfiesExpression ( expr) => {
59
62
self . infer_type_from_expression ( & expr. expression )
60
63
}
61
- Expression :: TSInstantiationExpression ( _expr) => {
62
- unreachable ! ( ) ;
63
- // infer_type_from_expression(ctx, &expr.expression)
64
- }
65
64
Expression :: TSTypeAssertion ( expr) => Some ( self . ast . copy ( & expr. type_annotation ) ) ,
66
65
_ => None ,
67
66
}
Original file line number Diff line number Diff line change
1
+ // ParenthesizedExpression
2
+ const n = ( 0 ) ;
3
+ const s = ( "" ) ;
4
+ const t = ( `` ) ;
5
+ const b = ( true ) ;
Original file line number Diff line number Diff line change
1
+ -- -
2
+ source : crates / oxc_isolated_declarations / tests / mod .rs
3
+ input_file : crates / oxc_isolated_declarations / tests / fixtures / infer - expression .ts
4
+ -- -
5
+ ==================== .D .TS ====================
6
+
7
+ declare const n: number ;
8
+ declare const s: string ;
9
+ declare const t: string ;
10
+ declare const b: boolean ;
You can’t perform that action at this time.
0 commit comments