We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3e6c9 commit 590398aCopy full SHA for 590398a
crates/oxc_parser/src/modifiers.rs
@@ -331,10 +331,9 @@ impl<'a> ParserImpl<'a> {
331
self.bump_any();
332
let modifier = self.modifier(kind, self.end_span(span));
333
if modifier.kind == ModifierKind::Export {
334
- self.error(diagnostics::modifier_must_precede_other_modifier(
335
- &modifier,
336
- ModifierKind::Declare,
337
- ));
+ self.error(diagnostics::modifier_already_seen(&modifier));
+ // Don't add the duplicate export modifier to the list
+ continue;
338
}
339
self.check_for_duplicate_modifiers(flags, &modifier);
340
flags.set(modifier_flags, true);
0 commit comments