mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
improve error messages
This commit is contained in:
parent
3b8d36dc58
commit
b1bf99c67c
@ -283,7 +283,7 @@ impl<'a> From<ErrorToDiag<'a>> for DiagnosticBuilder<'a> {
|
||||
PropertyNamedConstructor => {
|
||||
"Classes may not have a non-static field named 'constructor'".into()
|
||||
}
|
||||
ClassProperty => "Class property requires `jsc.classProperty` to be true".into(),
|
||||
ClassProperty => "Class property requires `jsc.parser.classProperty` to be true".into(),
|
||||
ReadOnlyMethod => "A method cannot be readonly".into(),
|
||||
TsBindingPatCannotBeOptional => "A binding pattern parameter cannot be optional in an \
|
||||
implementation signature."
|
||||
@ -293,7 +293,7 @@ impl<'a> From<ErrorToDiag<'a>> for DiagnosticBuilder<'a> {
|
||||
"Trailing comma is disallowed inside import(...) arguments".into()
|
||||
}
|
||||
DynamicImport => {
|
||||
"import(...) expressions requires jsc.dynamicImports to be true".into()
|
||||
"import(...) expressions requires `jsc.parser.dynamicImport` to be true".into()
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user