Skip to content

Commit 95c822e

Browse files
authoredApr 1, 2024··
fix(es/parser): Tweak msg of SyntaxError::UsingDeclNotEnabled (#8791)
1 parent 35264c5 commit 95c822e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎crates/swc_ecma_parser/src/error.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ impl SyntaxError {
540540
SyntaxError::UsingDeclNotAllowedForForInLoop => {
541541
"Using declaration is not allowed in for-in loop".into()
542542
}
543-
SyntaxError::UsingDeclNotEnabled => {
544-
"Using declaration is not enabled. Set jsc.parser.usingDecl to true".into()
545-
}
543+
SyntaxError::UsingDeclNotEnabled => "Using declaration is not enabled. Set \
544+
jsc.parser.explicitResourceManagement to true"
545+
.into(),
546546
SyntaxError::InvalidNameInUsingDecl => {
547547
"Using declaration only allows identifiers".into()
548548
}

0 commit comments

Comments
 (0)
Please sign in to comment.