mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
feat(parser): add TS1502 code to diagnostic (#18534)
https://github.com/microsoft/typescript/blob/16b933fb7bff04371fe9ec8525a8e90afa3174d4/src/compiler/diagnosticMessages.json#L1671-L1674
This commit is contained in:
1 parent
a3c773bb81
commit
51d3b3f4c4
3 files changed
+6
-8
No files matched your search
@@ -1115,11 +1115,9 @@ pub fn interface_extend(span: Span) -> OxcDiagnostic {
|
||||
|
||||
#[cold]
|
||||
pub fn reg_exp_flag_u_and_v(span: Span) -> OxcDiagnostic {
|
||||
OxcDiagnostic::error(
|
||||
"The 'u' and 'v' regular expression flags cannot be enabled at the same time",
|
||||
)
|
||||
.with_label(span)
|
||||
.with_help("v flag enables additional syntax over u flag")
|
||||
ts_error("1502", "The 'u' and 'v' regular expression flags cannot be enabled at the same time")
|
||||
.with_label(span)
|
||||
.with_help("v flag enables additional syntax over u flag")
|
||||
}
|
||||
|
||||
#[cold]
|
||||
|
||||
@@ -8434,7 +8434,7 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
|
||||
╰────
|
||||
help: The `v` flag is a superset of `u`. Use only either of them
|
||||
|
||||
× The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
× TS(1502): The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/uv-error/input.js:1:1]
|
||||
1 │ /a/ugv;
|
||||
· ──────
|
||||
@@ -8448,7 +8448,7 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
|
||||
╰────
|
||||
help: The `v` flag is a superset of `u`. Use only either of them
|
||||
|
||||
× The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
× TS(1502): The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/vu-error/input.js:1:1]
|
||||
1 │ /a/vu;
|
||||
· ─────
|
||||
|
||||
@@ -1594,7 +1594,7 @@ Negative Passed: 4581/4581 (100.00%)
|
||||
╰────
|
||||
help: The `v` flag is a superset of `u`. Use only either of them
|
||||
|
||||
× The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
× TS(1502): The 'u' and 'v' regular expression flags cannot be enabled at the same time
|
||||
╭─[test262/test/built-ins/RegExp/prototype/unicodeSets/uv-flags.js:18:1]
|
||||
17 │
|
||||
18 │ /./uv;
|
||||
|
||||
Reference in new issue
Block a user