mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 18:28:13 +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 => {
|
PropertyNamedConstructor => {
|
||||||
"Classes may not have a non-static field named 'constructor'".into()
|
"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(),
|
ReadOnlyMethod => "A method cannot be readonly".into(),
|
||||||
TsBindingPatCannotBeOptional => "A binding pattern parameter cannot be optional in an \
|
TsBindingPatCannotBeOptional => "A binding pattern parameter cannot be optional in an \
|
||||||
implementation signature."
|
implementation signature."
|
||||||
@ -293,7 +293,7 @@ impl<'a> From<ErrorToDiag<'a>> for DiagnosticBuilder<'a> {
|
|||||||
"Trailing comma is disallowed inside import(...) arguments".into()
|
"Trailing comma is disallowed inside import(...) arguments".into()
|
||||||
}
|
}
|
||||||
DynamicImport => {
|
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