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/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion tasks/coverage/snapshots/parser_misc.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
· ─────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion tasks/coverage/snapshots/parser_typescript.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7443,7 +7443,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc
2 │ Foo<number>(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;
· ───────────
Expand Down
Loading