Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/oxc_parser/src/js/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,12 @@ impl<'a> ParserImpl<'a> {
let type_annotation = if self.is_ts { self.parse_ts_type_annotation()? } else { None };
let value =
self.eat(Kind::Eq).then(|| self.parse_assignment_expression_or_higher()).transpose()?;
self.asi()?;
let r#type = if r#abstract {
AccessorPropertyType::TSAbstractAccessorProperty
} else {
AccessorPropertyType::AccessorProperty
};

let decorators = self.consume_decorators();
Ok(self.ast.class_element_accessor_property(
self.end_span(span),
Expand Down
5 changes: 3 additions & 2 deletions tasks/coverage/snapshots/parser_typescript.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15737,13 +15737,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
╰────
help: Remove the duplicate modifier.

× Unexpected token
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts:10:15]
9 │ accessor static h: any;
10 │ accessor i() {}
·
·
11 │ accessor get j() { return false; }
╰────
help: Try insert a semicolon here

× Expected `,` but found `*`
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/canFollowGetSetKeyword.ts:11:5]
Expand Down
Loading