diff --git a/crates/oxc_ast/src/ast_impl/js.rs b/crates/oxc_ast/src/ast_impl/js.rs index 29162b410..ad39dd06c 100644 --- a/crates/oxc_ast/src/ast_impl/js.rs +++ b/crates/oxc_ast/src/ast_impl/js.rs @@ -513,13 +513,7 @@ impl<'a> StaticMemberExpression<'a> { #[allow(missing_docs)] pub fn get_first_object(&self) -> &Expression<'a> { match &self.object { - Expression::StaticMemberExpression(member) => { - if let Expression::StaticMemberExpression(expr) = &member.object { - expr.get_first_object() - } else { - &self.object - } - } + Expression::StaticMemberExpression(member) => member.get_first_object(), Expression::ChainExpression(chain) => { if let ChainElement::StaticMemberExpression(expr) = &chain.expression { expr.get_first_object() diff --git a/tasks/coverage/snapshots/transpile.snap b/tasks/coverage/snapshots/transpile.snap index 07e29689e..323ed8b75 100644 --- a/tasks/coverage/snapshots/transpile.snap +++ b/tasks/coverage/snapshots/transpile.snap @@ -114,15 +114,6 @@ export {}; 3 | } `---- - x TS9014: Computed properties must be number or string literals, variables - | or dotted expressions with --isolatedDeclarations. - ,-[declarationComputedPropertyNames.d.ts:12:6] - 11 | [Symbol.iterator]: number, - 12 | [globalThis.Symbol.toStringTag]: number, - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 13 | [(globalThis.Symbol).unscopables]: number, - `---- - x TS9014: Computed properties must be number or string literals, variables | or dotted expressions with --isolatedDeclarations. ,-[declarationComputedPropertyNames.d.ts:13:6] @@ -150,15 +141,6 @@ export {}; 19 | }; `---- - x TS9014: Computed properties must be number or string literals, variables - | or dotted expressions with --isolatedDeclarations. - ,-[declarationComputedPropertyNames.d.ts:26:6] - 25 | [Symbol.iterator]: number, - 26 | [globalThis.Symbol.toStringTag]: number, - : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 27 | [(globalThis.Symbol).unscopables]: number, - `---- - x TS9014: Computed properties must be number or string literals, variables | or dotted expressions with --isolatedDeclarations. ,-[declarationComputedPropertyNames.d.ts:27:6]