diff --git a/crates/oxc_parser/src/diagnostics.rs b/crates/oxc_parser/src/diagnostics.rs index 94525532c28e7..10b132267050e 100644 --- a/crates/oxc_parser/src/diagnostics.rs +++ b/crates/oxc_parser/src/diagnostics.rs @@ -1086,7 +1086,7 @@ pub fn decorator_on_overload(span: Span) -> OxcDiagnostic { #[cold] pub fn as_in_ts(span: Span) -> OxcDiagnostic { - ts_error("8037", "Type assertion expressions can only be used in TypeScript files.") + ts_error("8016", "Type assertion expressions can only be used in TypeScript files.") .with_label(span) } diff --git a/tasks/coverage/snapshots/parser_misc.snap b/tasks/coverage/snapshots/parser_misc.snap index 5ffb312ff62fa..1553977ab4539 100644 --- a/tasks/coverage/snapshots/parser_misc.snap +++ b/tasks/coverage/snapshots/parser_misc.snap @@ -3646,7 +3646,7 @@ Negative Passed: 134/134 (100.00%) ╰──── help: No modifiers are allowed here. - × TS(8037): Type assertion expressions can only be used in TypeScript files. + × TS(8016): Type assertion expressions can only be used in TypeScript files. ╭─[misc/fail/oxc-4111-1.js:1:1] 1 │ funtransientction as longciiConÞr>ol(cde) { · ───────────────────────────────── diff --git a/tasks/coverage/snapshots/parser_typescript.snap b/tasks/coverage/snapshots/parser_typescript.snap index b439957d0e5e5..762d746869f6c 100644 --- a/tasks/coverage/snapshots/parser_typescript.snap +++ b/tasks/coverage/snapshots/parser_typescript.snap @@ -7443,7 +7443,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 2 │ Foo(1); ╰──── - × TS(8037): Type assertion expressions can only be used in TypeScript files. + × TS(8016): Type assertion expressions can only be used in TypeScript files. ╭─[typescript/tests/cases/compiler/jsFileCompilationTypeAssertions.ts:1:1] 1 │ 0 as number; · ───────────