diff --git a/crates/oxc_isolated_declarations/src/types.rs b/crates/oxc_isolated_declarations/src/types.rs index 75bac7d52ac3e..b8fd4a294f014 100644 --- a/crates/oxc_isolated_declarations/src/types.rs +++ b/crates/oxc_isolated_declarations/src/types.rs @@ -205,6 +205,13 @@ impl<'a> IsolatedDeclarations<'a> { Expression::ArrowFunctionExpression(func) => { self.transform_arrow_function_to_ts_type(func) } + Expression::TSAsExpression(expr) => { + if expr.type_annotation.is_const_type_reference() { + self.transform_expression_to_ts_type(&expr.expression) + } else { + Some(self.ast.copy(&expr.type_annotation)) + } + } _ => None, } }