mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
'may not' -> 'cannot'
This commit is contained in:
parent
75a1a8a493
commit
2a11222050
@ -7213,7 +7213,7 @@ module ts {
|
||||
}
|
||||
}
|
||||
if (node.questionToken && isBindingPattern(node.name) && func.body) {
|
||||
error(node, Diagnostics.A_binding_pattern_parameter_may_not_be_optional_in_an_implementation_signature);
|
||||
error(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature);
|
||||
}
|
||||
if (node.dotDotDotToken) {
|
||||
if (!isArrayType(getTypeOfSymbol(node.symbol))) {
|
||||
|
||||
@ -297,7 +297,7 @@ module ts {
|
||||
Type_0_has_no_property_1: { code: 2460, category: DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}'." },
|
||||
Type_0_is_not_an_array_type: { code: 2461, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type." },
|
||||
A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" },
|
||||
A_binding_pattern_parameter_may_not_be_optional_in_an_implementation_signature: { code: 2463, category: DiagnosticCategory.Error, key: "A binding pattern parameter may not be optional in an implementation signature." },
|
||||
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
|
||||
@ -1282,7 +1282,7 @@
|
||||
"category": "Error",
|
||||
"code": 2462
|
||||
},
|
||||
"A binding pattern parameter may not be optional in an implementation signature.": {
|
||||
"A binding pattern parameter cannot be optional in an implementation signature.": {
|
||||
"category": "Error",
|
||||
"code": 2463
|
||||
},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts(2,14): error TS2463: A binding pattern parameter may not be optional in an implementation signature.
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts(2,14): error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts(8,5): error TS2345: Argument of type '[boolean, number, string]' is not assignable to parameter of type '[string, number, boolean]'.
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ tests/cases/conformance/es6/destructuring/optionalBindingParameters1.ts(8,5): er
|
||||
|
||||
function foo([x,y,z]?: [string, number, boolean]) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2463: A binding pattern parameter may not be optional in an implementation signature.
|
||||
!!! error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters2.ts(2,14): error TS2463: A binding pattern parameter may not be optional in an implementation signature.
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters2.ts(2,14): error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
tests/cases/conformance/es6/destructuring/optionalBindingParameters2.ts(8,5): error TS2345: Argument of type '{ x: boolean; y: number; z: string; }' is not assignable to parameter of type '{ x: string; y: number; z: boolean; }'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
@ -8,7 +8,7 @@ tests/cases/conformance/es6/destructuring/optionalBindingParameters2.ts(8,5): er
|
||||
|
||||
function foo({ x, y, z }?: { x: string; y: number; z: boolean }) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2463: A binding pattern parameter may not be optional in an implementation signature.
|
||||
!!! error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user