diff --git a/crates/oxc_parser/src/diagnostics.rs b/crates/oxc_parser/src/diagnostics.rs index ee09d7fb7b51e..594d94ce5b8a8 100644 --- a/crates/oxc_parser/src/diagnostics.rs +++ b/crates/oxc_parser/src/diagnostics.rs @@ -410,9 +410,6 @@ pub fn jsx_element_no_match(span0: Span, span1: Span, name: &str) -> OxcDiagnost } #[cold] -pub fn modifiers_cannot_appear(span: Span, name: &str) -> OxcDiagnostic { - OxcDiagnostic::error(format!( - "TS1044: '{name}' modifier cannot appear on a module or namespace element." - )) - .with_label(span) +pub fn modifier_cannot_be_used_here(span: Span, name: &str) -> OxcDiagnostic { + OxcDiagnostic::error(format!("'{name}' modifier cannot be used here.")).with_label(span) } diff --git a/crates/oxc_parser/src/js/class.rs b/crates/oxc_parser/src/js/class.rs index 71b0735a98a28..76d6e3cf48110 100644 --- a/crates/oxc_parser/src/js/class.rs +++ b/crates/oxc_parser/src/js/class.rs @@ -88,7 +88,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if !matches!(modifier.kind, ModifierKind::Declare | ModifierKind::Abstract) { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); diff --git a/crates/oxc_parser/src/js/declaration.rs b/crates/oxc_parser/src/js/declaration.rs index beb8723701421..88f774d50a5f7 100644 --- a/crates/oxc_parser/src/js/declaration.rs +++ b/crates/oxc_parser/src/js/declaration.rs @@ -74,7 +74,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if modifier.kind != ModifierKind::Declare { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); diff --git a/crates/oxc_parser/src/js/function.rs b/crates/oxc_parser/src/js/function.rs index 0417dd8ac8f6f..8a268f97a65b0 100644 --- a/crates/oxc_parser/src/js/function.rs +++ b/crates/oxc_parser/src/js/function.rs @@ -110,7 +110,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if !matches!(modifier.kind, ModifierKind::Declare | ModifierKind::Async) { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); diff --git a/crates/oxc_parser/src/ts/statement.rs b/crates/oxc_parser/src/ts/statement.rs index 92dfc9059c08f..70222d21f558e 100644 --- a/crates/oxc_parser/src/ts/statement.rs +++ b/crates/oxc_parser/src/ts/statement.rs @@ -34,7 +34,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if !matches!(modifier.kind, ModifierKind::Declare | ModifierKind::Const) { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); @@ -119,7 +119,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if modifier.kind != ModifierKind::Declare { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); @@ -151,7 +151,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if modifier.kind != ModifierKind::Declare { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); @@ -293,7 +293,7 @@ impl<'a> ParserImpl<'a> { for modifier in modifiers.iter() { if modifier.kind != ModifierKind::Declare { - self.error(diagnostics::modifiers_cannot_appear( + self.error(diagnostics::modifier_cannot_be_used_here( modifier.span, modifier.kind.as_str(), )); diff --git a/tasks/coverage/parser_babel.snap b/tasks/coverage/parser_babel.snap index 80430d782fca6..20c5cde9b58f0 100644 --- a/tasks/coverage/parser_babel.snap +++ b/tasks/coverage/parser_babel.snap @@ -10137,7 +10137,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ── ╰──── - × TS1044: 'abstract' modifier cannot appear on a module or namespace element. + × 'abstract' modifier cannot be used here. ╭─[typescript/interface/abstract/input.ts:1:1] 1 │ abstract interface Foo { · ──────── @@ -10152,7 +10152,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" ╰──── help: Try insert a semicolon here - × TS1044: 'abstract' modifier cannot appear on a module or namespace element. + × 'abstract' modifier cannot be used here. ╭─[typescript/interface/export-abstract-interface/input.ts:1:8] 1 │ export abstract interface I { · ──────── diff --git a/tasks/coverage/parser_typescript.snap b/tasks/coverage/parser_typescript.snap index 6b3cf9013756f..19c29d9fda329 100644 --- a/tasks/coverage/parser_typescript.snap +++ b/tasks/coverage/parser_typescript.snap @@ -6414,7 +6414,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ╰── `from` expected ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:2:12] 1 │ module M { 2 │ export export var x = 1; @@ -6422,7 +6422,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ export export function f() { } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:3:12] 2 │ export export var x = 1; 3 │ export export function f() { } @@ -6430,7 +6430,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 4 │ ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:6:16] 5 │ export export module N { 6 │ export export class C { } @@ -6438,7 +6438,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 7 │ export export interface I { } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:7:16] 6 │ export export class C { } 7 │ export export interface I { } @@ -6446,7 +6446,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 8 │ } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:5:12] 4 │ 5 │ export export module N { @@ -6454,7 +6454,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 6 │ export export class C { } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:12:12] 11 │ declare module A { 12 │ export export var x; @@ -6462,7 +6462,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 13 │ export export function f() ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:13:12] 12 │ export export var x; 13 │ export export function f() @@ -6470,7 +6470,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 14 │ ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:16:16] 15 │ export export module N { 16 │ export export class C { } @@ -6478,7 +6478,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 17 │ export export interface I { } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:17:16] 16 │ export export class C { } 17 │ export export interface I { } @@ -6486,7 +6486,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 18 │ } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/exportAlreadySeen.ts:15:12] 14 │ 15 │ export export module N { @@ -6743,7 +6743,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 154 │ } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/functionsWithModifiersInBlocks1.ts:4:12] 3 │ export function f() { } 4 │ declare export function f() { } @@ -8697,7 +8697,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 1 │ if (true) { ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[compiler/privacyImportParseErrors.ts:326:9] 325 │ 326 │ declare export module "anotherParseError2" { @@ -10668,7 +10668,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 2 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es5/asyncClass_es5.ts:1:1] 1 │ async class C { · ───── @@ -10683,7 +10683,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es5/asyncEnum_es5.ts:1:1] 1 │ async enum E { · ───── @@ -10699,14 +10699,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es5/asyncInterface_es5.ts:1:1] 1 │ async interface I { · ───── 2 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es5/asyncModule_es5.ts:1:1] 1 │ async module M { · ───── @@ -10803,7 +10803,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 2 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es6/asyncClass_es6.ts:1:1] 1 │ async class C { · ───── @@ -10818,7 +10818,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es6/asyncEnum_es6.ts:1:1] 1 │ async enum E { · ───── @@ -10834,14 +10834,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es6/asyncInterface_es6.ts:1:1] 1 │ async interface I { · ───── 2 │ } ╰──── - × TS1044: 'async' modifier cannot appear on a module or namespace element. + × 'async' modifier cannot be used here. ╭─[conformance/async/es6/asyncModule_es6.ts:1:1] 1 │ async module M { · ───── @@ -11005,7 +11005,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 17 │ } ╰──── - × TS1044: 'abstract' modifier cannot appear on a module or namespace element. + × 'abstract' modifier cannot be used here. ╭─[conformance/classes/classDeclarations/classAbstractKeyword/classAbstractWithInterface.ts:1:1] 1 │ abstract interface I {} · ──────── @@ -16205,7 +16205,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ let; ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:4:5] 3 │ module Y { 4 │ public class A { s: string } @@ -16213,7 +16213,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 5 │ ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:6:5] 5 │ 6 │ public class BB extends A { @@ -16221,7 +16221,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 7 │ id: number; ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:12:5] 11 │ module Y2 { 12 │ public class AA { s: T } @@ -16229,7 +16229,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 13 │ public interface I { id: number } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:13:5] 12 │ public class AA { s: T } 13 │ public interface I { id: number } @@ -16237,7 +16237,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 14 │ ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:15:5] 14 │ 15 │ public class B extends AA implements I { id: number } @@ -16245,7 +16245,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 16 │ } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:19:5] 18 │ module Y3 { 19 │ public module Module { @@ -16253,7 +16253,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 20 │ class A { s: string } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:25:5] 24 │ module Y4 { 25 │ public enum Color { Blue, Red } @@ -16261,7 +16261,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 26 │ } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:29:5] 28 │ module YY { 29 │ private class A { s: string } @@ -16269,7 +16269,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 30 │ ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:31:5] 30 │ 31 │ private class BB extends A { @@ -16277,7 +16277,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 32 │ id: number; ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:37:5] 36 │ module YY2 { 37 │ private class AA { s: T } @@ -16285,7 +16285,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 38 │ private interface I { id: number } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:38:5] 37 │ private class AA { s: T } 38 │ private interface I { id: number } @@ -16293,7 +16293,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 39 │ ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:40:5] 39 │ 40 │ private class B extends AA implements I { id: number } @@ -16301,7 +16301,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 41 │ } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:44:5] 43 │ module YY3 { 44 │ private module Module { @@ -16309,7 +16309,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 45 │ class A { s: string } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:50:5] 49 │ module YY4 { 50 │ private enum Color { Blue, Red } @@ -16317,7 +16317,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 51 │ } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:55:5] 54 │ module YYY { 55 │ static class A { s: string } @@ -16325,7 +16325,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 56 │ ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:57:5] 56 │ 57 │ static class BB extends A { @@ -16333,7 +16333,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 58 │ id: number; ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:63:5] 62 │ module YYY2 { 63 │ static class AA { s: T } @@ -16341,7 +16341,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 64 │ static interface I { id: number } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:64:5] 63 │ static class AA { s: T } 64 │ static interface I { id: number } @@ -16349,7 +16349,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 65 │ ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:66:5] 65 │ 66 │ static class B extends AA implements I { id: number } @@ -16357,7 +16357,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 67 │ } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:70:5] 69 │ module YYY3 { 70 │ static module Module { @@ -16365,7 +16365,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 71 │ class A { s: string } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts:76:5] 75 │ module YYY4 { 76 │ static enum Color { Blue, Red } @@ -16373,7 +16373,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 77 │ } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:4:5] 3 │ module Y { 4 │ public var x: number = 0; @@ -16381,7 +16381,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 5 │ } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:8:5] 7 │ module Y2 { 8 │ public function fn(x: string) { } @@ -16389,7 +16389,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 9 │ } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:12:5] 11 │ module Y4 { 12 │ static var x: number = 0; @@ -16397,7 +16397,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 13 │ } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:16:5] 15 │ module YY { 16 │ static function fn(x: string) { } @@ -16405,7 +16405,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 17 │ } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:20:5] 19 │ module YY2 { 20 │ private var x: number = 0; @@ -16413,7 +16413,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 21 │ } ╰──── - × TS1044: 'private' modifier cannot appear on a module or namespace element. + × 'private' modifier cannot be used here. ╭─[conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts:25:5] 24 │ module YY3 { 25 │ private function fn(x: string) { } @@ -17508,21 +17508,21 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'public' modifier cannot appear on a module or namespace element. + × 'public' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration3.ts:1:1] 1 │ public interface I { · ────── 2 │ } ╰──── - × TS1044: 'static' modifier cannot appear on a module or namespace element. + × 'static' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration4.ts:1:1] 1 │ static interface I { · ────── 2 │ } ╰──── - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts:1:8] 1 │ export export interface I { · ────── @@ -17751,14 +17751,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── - × TS1044: 'protected' modifier cannot appear on a module or namespace element. + × 'protected' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/Protected/Protected1.ts:1:1] 1 │ protected class C { · ───────── 2 │ } ╰──── - × TS1044: 'protected' modifier cannot appear on a module or namespace element. + × 'protected' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/Protected/Protected2.ts:1:1] 1 │ protected module M { · ───────── @@ -17855,7 +17855,7 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" ╰──── help: Try insert a semicolon here - × TS1044: 'export' modifier cannot appear on a module or namespace element. + × 'export' modifier cannot be used here. ╭─[conformance/parser/ecmascript5/RegressionTests/parser618973.ts:1:8] 1 │ export export class Foo { · ──────