mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
This commit is contained in:
+33
-43
@@ -3182,18 +3182,17 @@ module ts {
|
||||
target: Type,
|
||||
errorNode: Node,
|
||||
chainedMessage?: DiagnosticMessage,
|
||||
terminalMessage?: DiagnosticMessage,
|
||||
containingMessageChain?: DiagnosticMessageChain): boolean {
|
||||
|
||||
return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, chainedMessage, terminalMessage, containingMessageChain);
|
||||
return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, chainedMessage, containingMessageChain);
|
||||
}
|
||||
|
||||
function isTypeAssignableTo(source: Type, target: Type): boolean {
|
||||
return checkTypeAssignableTo(source, target, /*errorNode*/ undefined);
|
||||
}
|
||||
|
||||
function checkTypeAssignableTo(source: Type, target: Type, errorNode: Node, chainedMessage?: DiagnosticMessage, terminalMessage?: DiagnosticMessage): boolean {
|
||||
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, chainedMessage, terminalMessage);
|
||||
function checkTypeAssignableTo(source: Type, target: Type, errorNode: Node, chainedMessage?: DiagnosticMessage): boolean {
|
||||
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, chainedMessage);
|
||||
}
|
||||
|
||||
function isTypeRelatedTo(source: Type, target: Type, relation: Map<boolean>): boolean {
|
||||
@@ -3237,7 +3236,7 @@ module ts {
|
||||
var typeName2 = typeToString(base);
|
||||
|
||||
var errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_properties_0_of_types_1_and_2_are_not_identical, prop.name, typeName1, typeName2);
|
||||
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2_Colon, typeToString(type), typeName1, typeName2);
|
||||
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);
|
||||
addDiagnostic(createDiagnosticForNodeFromMessageChain(typeNode, errorInfo, program.getCompilerHost().getNewLine()));
|
||||
}
|
||||
}
|
||||
@@ -3273,7 +3272,6 @@ module ts {
|
||||
relation: Map<boolean>,
|
||||
errorNode: Node,
|
||||
chainedMessage?: DiagnosticMessage,
|
||||
terminalMessage?: DiagnosticMessage,
|
||||
containingMessageChain?: DiagnosticMessageChain): boolean {
|
||||
|
||||
var errorInfo: DiagnosticMessageChain;
|
||||
@@ -3285,7 +3283,7 @@ module ts {
|
||||
|
||||
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
||||
|
||||
var result = isRelatedToWithCustomErrors(source, target, errorNode !== undefined, chainedMessage, terminalMessage);
|
||||
var result = isRelatedToWithCustomErrors(source, target, errorNode !== undefined, chainedMessage);
|
||||
if (overflow) {
|
||||
error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
|
||||
}
|
||||
@@ -3302,10 +3300,10 @@ module ts {
|
||||
}
|
||||
|
||||
function isRelatedTo(source: Type, target: Type, reportErrors?: boolean): boolean {
|
||||
return isRelatedToWithCustomErrors(source, target, reportErrors, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
return isRelatedToWithCustomErrors(source, target, reportErrors, /*chainedMessage*/ undefined);
|
||||
}
|
||||
|
||||
function isRelatedToWithCustomErrors(source: Type, target: Type, reportErrors: boolean, chainedMessage: DiagnosticMessage, terminalMessage: DiagnosticMessage): boolean {
|
||||
function isRelatedToWithCustomErrors(source: Type, target: Type, reportErrors: boolean, chainedMessage: DiagnosticMessage): boolean {
|
||||
if (relation === identityRelation) {
|
||||
// both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases
|
||||
if (source === target) return true;
|
||||
@@ -3357,15 +3355,9 @@ module ts {
|
||||
}
|
||||
}
|
||||
if (reportErrors) {
|
||||
// The error should end in a period when this is the deepest error in the chain
|
||||
// (when errorInfo is undefined). Otherwise, it has a colon before the nested
|
||||
// error.
|
||||
|
||||
chainedMessage = chainedMessage || Diagnostics.Type_0_is_not_assignable_to_type_1_Colon;
|
||||
terminalMessage = terminalMessage || Diagnostics.Type_0_is_not_assignable_to_type_1;
|
||||
var diagnosticKey = errorInfo ? chainedMessage : terminalMessage;
|
||||
Debug.assert(diagnosticKey);
|
||||
reportError(diagnosticKey, typeToString(source), typeToString(target));
|
||||
chainedMessage = chainedMessage || Diagnostics.Type_0_is_not_assignable_to_type_1;
|
||||
Debug.assert(chainedMessage);
|
||||
reportError(chainedMessage, typeToString(source), typeToString(target));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3545,7 +3537,7 @@ module ts {
|
||||
}
|
||||
if (!isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors)) {
|
||||
if (reportErrors) {
|
||||
reportError(Diagnostics.Types_of_property_0_are_incompatible_Colon, symbolToString(targetProp));
|
||||
reportError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3651,7 +3643,7 @@ module ts {
|
||||
if (!isRelatedTo(s, t, reportErrors)) {
|
||||
if (!isRelatedTo(t, s, false)) {
|
||||
if (reportErrors) {
|
||||
reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible_Colon,
|
||||
reportError(Diagnostics.Types_of_parameters_0_and_1_are_incompatible,
|
||||
source.parameters[i < sourceMax ? i : sourceMax].name,
|
||||
target.parameters[i < targetMax ? i : targetMax].name);
|
||||
}
|
||||
@@ -3695,7 +3687,7 @@ module ts {
|
||||
}
|
||||
if (!isRelatedTo(sourceType, targetType, reportErrors)) {
|
||||
if (reportErrors) {
|
||||
reportError(Diagnostics.Index_signatures_are_incompatible_Colon);
|
||||
reportError(Diagnostics.Index_signatures_are_incompatible);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3726,7 +3718,7 @@ module ts {
|
||||
}
|
||||
if (!compatible) {
|
||||
if (reportErrors) {
|
||||
reportError(Diagnostics.Index_signatures_are_incompatible_Colon);
|
||||
reportError(Diagnostics.Index_signatures_are_incompatible);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3819,8 +3811,7 @@ module ts {
|
||||
|
||||
// In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the
|
||||
// subtype as the first argument to the error
|
||||
checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation,
|
||||
Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_Colon,
|
||||
checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation,
|
||||
Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0,
|
||||
errorMessageChainHead);
|
||||
}
|
||||
@@ -3932,8 +3923,8 @@ module ts {
|
||||
callback(s, t);
|
||||
}
|
||||
}
|
||||
|
||||
function createInferenceContext(typeParameters: TypeParameter[], inferUnionTypes: boolean): InferenceContext {
|
||||
|
||||
function createInferenceContext(typeParameters: TypeParameter[], inferUnionTypes: boolean): InferenceContext {
|
||||
var inferences: Type[][] = [];
|
||||
for (var i = 0; i < typeParameters.length; i++) inferences.push([]);
|
||||
return {
|
||||
@@ -5158,8 +5149,8 @@ module ts {
|
||||
}
|
||||
|
||||
function inferTypeArguments(signature: Signature, args: Expression[], excludeArgument?: boolean[]): InferenceContext {
|
||||
var typeParameters = signature.typeParameters;
|
||||
var context = createInferenceContext(typeParameters, /*inferUnionTypes*/ false);
|
||||
var typeParameters = signature.typeParameters;
|
||||
var context = createInferenceContext(typeParameters, /*inferUnionTypes*/ false);
|
||||
var mapper = createInferenceMapper(context);
|
||||
// First infer from arguments that are not context sensitive
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
@@ -5209,7 +5200,7 @@ module ts {
|
||||
var constraint = getConstraintOfTypeParameter(typeParameters[i]);
|
||||
if (constraint) {
|
||||
typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined,
|
||||
Diagnostics.Type_0_does_not_satisfy_the_constraint_1_Colon, Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
|
||||
Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5230,7 +5221,6 @@ module ts {
|
||||
checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined);
|
||||
// Use argument expression as error location when reporting errors
|
||||
var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined,
|
||||
Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,
|
||||
Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1);
|
||||
if (!isValidArgument) {
|
||||
return false;
|
||||
@@ -5330,7 +5320,7 @@ module ts {
|
||||
var inferenceCandidates = resultOfFailedInference.inferences[resultOfFailedInference.failedTypeParameterIndex];
|
||||
|
||||
var diagnosticChainHead = chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError
|
||||
Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly_Colon,
|
||||
Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly,
|
||||
typeToString(failedTypeParameter));
|
||||
|
||||
reportNoCommonSupertypeError(inferenceCandidates, node.func, diagnosticChainHead);
|
||||
@@ -5607,7 +5597,7 @@ module ts {
|
||||
if (fullTypeCheck && targetType !== unknownType) {
|
||||
var widenedType = getWidenedType(exprType, /*supressNoImplicitAnyErrors*/ true);
|
||||
if (!(isTypeAssignableTo(targetType, widenedType))) {
|
||||
checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other);
|
||||
checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other);
|
||||
}
|
||||
}
|
||||
return targetType;
|
||||
@@ -5788,7 +5778,7 @@ module ts {
|
||||
else {
|
||||
var exprType = checkExpression(node.body);
|
||||
if (node.type) {
|
||||
checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined);
|
||||
checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, /*chainedMessage*/ undefined);
|
||||
}
|
||||
checkFunctionExpressionBodies(node.body);
|
||||
}
|
||||
@@ -6094,7 +6084,7 @@ module ts {
|
||||
// Use default messages
|
||||
if (ok) {
|
||||
// to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported
|
||||
checkTypeAssignableTo(valueType, leftType, node.left, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
checkTypeAssignableTo(valueType, leftType, node.left, /*chainedMessage*/ undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6475,7 +6465,7 @@ module ts {
|
||||
var constraint = getConstraintOfTypeParameter((<TypeReference>type).target.typeParameters[i]);
|
||||
if (fullTypeCheck && constraint) {
|
||||
var typeArgument = (<TypeReference>type).typeArguments[i];
|
||||
checkTypeAssignableTo(typeArgument, constraint, node, Diagnostics.Type_0_does_not_satisfy_the_constraint_1_Colon, Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
|
||||
checkTypeAssignableTo(typeArgument, constraint, node, Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7117,7 +7107,7 @@ module ts {
|
||||
if (node.initializer) {
|
||||
if (!(getNodeLinks(node.initializer).flags & NodeCheckFlags.TypeChecked)) {
|
||||
// Use default messages
|
||||
checkTypeAssignableTo(checkAndMarkExpression(node.initializer), type, node, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
checkTypeAssignableTo(checkAndMarkExpression(node.initializer), type, node, /*chainedMessage*/ undefined);
|
||||
}
|
||||
checkCollisionWithConstDeclarations(node);
|
||||
}
|
||||
@@ -7230,7 +7220,7 @@ module ts {
|
||||
func.type ||
|
||||
(func.kind === SyntaxKind.GetAccessor && getSetAccessorTypeAnnotationNode(<AccessorDeclaration>getDeclarationOfKind(func.symbol, SyntaxKind.SetAccessor)));
|
||||
if (checkAssignability) {
|
||||
checkTypeAssignableTo(checkExpression(node.expression), returnType, node.expression, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
checkTypeAssignableTo(checkExpression(node.expression), returnType, node.expression, /*chainedMessage*/ undefined);
|
||||
}
|
||||
else if (func.kind == SyntaxKind.Constructor) {
|
||||
// constructor doesn't have explicit return type annotation and yet its return type is known - declaring type
|
||||
@@ -7258,7 +7248,7 @@ module ts {
|
||||
var caseType = checkExpression(clause.expression);
|
||||
if (!isTypeAssignableTo(expressionType, caseType)) {
|
||||
// check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails
|
||||
checkTypeAssignableTo(caseType, expressionType, clause.expression, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
checkTypeAssignableTo(caseType, expressionType, clause.expression, /*chainedMessage*/ undefined);
|
||||
}
|
||||
}
|
||||
checkBlock(clause);
|
||||
@@ -7395,10 +7385,10 @@ module ts {
|
||||
if (type.baseTypes.length) {
|
||||
if (fullTypeCheck) {
|
||||
var baseType = type.baseTypes[0];
|
||||
checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Class_0_incorrectly_extends_base_class_1_Colon, Diagnostics.Class_0_incorrectly_extends_base_class_1);
|
||||
checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Class_0_incorrectly_extends_base_class_1);
|
||||
var staticBaseType = getTypeOfSymbol(baseType.symbol);
|
||||
checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name,
|
||||
Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
|
||||
Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
|
||||
if (baseType.symbol !== resolveEntityName(node, node.baseType.typeName, SymbolFlags.Value)) {
|
||||
error(node.baseType, Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType));
|
||||
}
|
||||
@@ -7417,7 +7407,7 @@ module ts {
|
||||
if (t !== unknownType) {
|
||||
var declaredType = (t.flags & TypeFlags.Reference) ? (<TypeReference>t).target : t;
|
||||
if (declaredType.flags & (TypeFlags.Class | TypeFlags.Interface)) {
|
||||
checkTypeAssignableTo(type, t, node.name, Diagnostics.Class_0_incorrectly_implements_interface_1_Colon, Diagnostics.Class_0_incorrectly_implements_interface_1);
|
||||
checkTypeAssignableTo(type, t, node.name, Diagnostics.Class_0_incorrectly_implements_interface_1);
|
||||
}
|
||||
else {
|
||||
error(typeRefNode, Diagnostics.A_class_may_only_implement_another_class_or_interface);
|
||||
@@ -7562,7 +7552,7 @@ module ts {
|
||||
// run subsequent checks only if first set succeeded
|
||||
if (checkInheritedPropertiesAreIdentical(type, node.name)) {
|
||||
forEach(type.baseTypes, baseType => {
|
||||
checkTypeAssignableTo(type, baseType, node.name, Diagnostics.Interface_0_incorrectly_extends_interface_1_Colon, Diagnostics.Interface_0_incorrectly_extends_interface_1);
|
||||
checkTypeAssignableTo(type, baseType, node.name , Diagnostics.Interface_0_incorrectly_extends_interface_1);
|
||||
});
|
||||
checkIndexConstraints(type);
|
||||
}
|
||||
@@ -7614,7 +7604,7 @@ module ts {
|
||||
// If it is a constant value (not undefined), it is syntactically constrained to be a number.
|
||||
// Also, we do not need to check this for ambients because there is already
|
||||
// a syntax error if it is not a constant.
|
||||
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
|
||||
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined);
|
||||
}
|
||||
}
|
||||
else if (ambient) {
|
||||
|
||||
@@ -140,17 +140,16 @@ module ts {
|
||||
Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
|
||||
Cannot_find_global_type_0: { code: 2318, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
|
||||
Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." },
|
||||
Interface_0_cannot_simultaneously_extend_types_1_and_2_Colon: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':" },
|
||||
Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
|
||||
Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
|
||||
Type_0_is_not_assignable_to_type_1_Colon: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}':" },
|
||||
Type_0_is_not_assignable_to_type_1: { code: 2323, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
|
||||
Property_0_is_missing_in_type_1: { code: 2324, category: DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
|
||||
Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." },
|
||||
Types_of_property_0_are_incompatible_Colon: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible:" },
|
||||
Types_of_property_0_are_incompatible: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." },
|
||||
Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." },
|
||||
Types_of_parameters_0_and_1_are_incompatible_Colon: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible:" },
|
||||
Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." },
|
||||
Index_signature_is_missing_in_type_0: { code: 2329, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
|
||||
Index_signatures_are_incompatible_Colon: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible:" },
|
||||
Index_signatures_are_incompatible: { code: 2330, category: DiagnosticCategory.Error, key: "Index signatures are incompatible." },
|
||||
this_cannot_be_referenced_in_a_module_body: { code: 2331, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a module body." },
|
||||
this_cannot_be_referenced_in_current_location: { code: 2332, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
|
||||
this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
|
||||
@@ -163,7 +162,6 @@ module ts {
|
||||
Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" },
|
||||
Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." },
|
||||
An_index_expression_argument_must_be_of_type_string_number_or_any: { code: 2342, category: DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', or 'any'." },
|
||||
Type_0_does_not_satisfy_the_constraint_1_Colon: { code: 2343, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}':" },
|
||||
Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." },
|
||||
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
|
||||
Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." },
|
||||
@@ -173,7 +171,6 @@ module ts {
|
||||
Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." },
|
||||
Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
|
||||
Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." },
|
||||
Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon: { code: 2353, category: DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other:" },
|
||||
No_best_common_type_exists_among_return_expressions: { code: 2354, category: DiagnosticCategory.Error, key: "No best common type exists among return expressions." },
|
||||
A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." },
|
||||
An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
|
||||
@@ -234,12 +231,9 @@ module ts {
|
||||
Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
|
||||
Class_name_cannot_be_0: { code: 2414, category: DiagnosticCategory.Error, key: "Class name cannot be '{0}'" },
|
||||
Class_0_incorrectly_extends_base_class_1: { code: 2415, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." },
|
||||
Class_0_incorrectly_extends_base_class_1_Colon: { code: 2416, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}':" },
|
||||
Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
|
||||
Class_static_side_0_incorrectly_extends_base_class_static_side_1_Colon: { code: 2418, category: DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}':" },
|
||||
Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." },
|
||||
Class_0_incorrectly_implements_interface_1: { code: 2420, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." },
|
||||
Class_0_incorrectly_implements_interface_1_Colon: { code: 2421, category: DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}':" },
|
||||
A_class_may_only_implement_another_class_or_interface: { code: 2422, category: DiagnosticCategory.Error, key: "A class may only implement another class or interface." },
|
||||
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." },
|
||||
Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
|
||||
@@ -247,7 +241,6 @@ module ts {
|
||||
Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
|
||||
Interface_name_cannot_be_0: { code: 2427, category: DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" },
|
||||
All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." },
|
||||
Interface_0_incorrectly_extends_interface_1_Colon: { code: 2429, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}':" },
|
||||
Interface_0_incorrectly_extends_interface_1: { code: 2430, category: DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
|
||||
Enum_name_cannot_be_0: { code: 2431, category: DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" },
|
||||
In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
|
||||
@@ -271,8 +264,7 @@ module ts {
|
||||
Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant.", isEarly: true },
|
||||
Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'.", isEarly: true },
|
||||
An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." },
|
||||
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly_Colon: { code: 2453, category: DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly:" },
|
||||
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_Colon: { code: 2454, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}':" },
|
||||
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
|
||||
Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
|
||||
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_name_1_from_private_module_2: { code: 4001, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
"category": "Error",
|
||||
"code": 2319
|
||||
},
|
||||
"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':": {
|
||||
"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.": {
|
||||
"category": "Error",
|
||||
"code": 2320
|
||||
},
|
||||
@@ -560,7 +560,7 @@
|
||||
"category": "Error",
|
||||
"code": 2321
|
||||
},
|
||||
"Type '{0}' is not assignable to type '{1}':": {
|
||||
"Type '{0}' is not assignable to type '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2322
|
||||
},
|
||||
@@ -576,7 +576,7 @@
|
||||
"category": "Error",
|
||||
"code": 2325
|
||||
},
|
||||
"Types of property '{0}' are incompatible:": {
|
||||
"Types of property '{0}' are incompatible.": {
|
||||
"category": "Error",
|
||||
"code": 2326
|
||||
},
|
||||
@@ -584,7 +584,7 @@
|
||||
"category": "Error",
|
||||
"code": 2327
|
||||
},
|
||||
"Types of parameters '{0}' and '{1}' are incompatible:": {
|
||||
"Types of parameters '{0}' and '{1}' are incompatible.": {
|
||||
"category": "Error",
|
||||
"code": 2328
|
||||
},
|
||||
@@ -592,7 +592,7 @@
|
||||
"category": "Error",
|
||||
"code": 2329
|
||||
},
|
||||
"Index signatures are incompatible:": {
|
||||
"Index signatures are incompatible.": {
|
||||
"category": "Error",
|
||||
"code": 2330
|
||||
},
|
||||
@@ -644,10 +644,6 @@
|
||||
"category": "Error",
|
||||
"code": 2342
|
||||
},
|
||||
"Type '{0}' does not satisfy the constraint '{1}':": {
|
||||
"category": "Error",
|
||||
"code": 2343
|
||||
},
|
||||
"Type '{0}' does not satisfy the constraint '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2344
|
||||
@@ -684,10 +680,6 @@
|
||||
"category": "Error",
|
||||
"code": 2352
|
||||
},
|
||||
"Neither type '{0}' nor type '{1}' is assignable to the other:": {
|
||||
"category": "Error",
|
||||
"code": 2353
|
||||
},
|
||||
"No best common type exists among return expressions.": {
|
||||
"category": "Error",
|
||||
"code": 2354
|
||||
@@ -928,18 +920,10 @@
|
||||
"category": "Error",
|
||||
"code": 2415
|
||||
},
|
||||
"Class '{0}' incorrectly extends base class '{1}':": {
|
||||
"category": "Error",
|
||||
"code": 2416
|
||||
},
|
||||
"Class static side '{0}' incorrectly extends base class static side '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2417
|
||||
},
|
||||
"Class static side '{0}' incorrectly extends base class static side '{1}':": {
|
||||
"category": "Error",
|
||||
"code": 2418
|
||||
},
|
||||
"Type name '{0}' in extends clause does not reference constructor function for '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2419
|
||||
@@ -948,10 +932,6 @@
|
||||
"category": "Error",
|
||||
"code": 2420
|
||||
},
|
||||
"Class '{0}' incorrectly implements interface '{1}':": {
|
||||
"category": "Error",
|
||||
"code": 2421
|
||||
},
|
||||
"A class may only implement another class or interface.": {
|
||||
"category": "Error",
|
||||
"code": 2422
|
||||
@@ -980,10 +960,6 @@
|
||||
"category": "Error",
|
||||
"code": 2428
|
||||
},
|
||||
"Interface '{0}' incorrectly extends interface '{1}':": {
|
||||
"category": "Error",
|
||||
"code": 2429
|
||||
},
|
||||
"Interface '{0}' incorrectly extends interface '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2430
|
||||
@@ -1080,14 +1056,10 @@
|
||||
"category": "Error",
|
||||
"code": 2452
|
||||
},
|
||||
"The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly:": {
|
||||
"The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.": {
|
||||
"category": "Error",
|
||||
"code": 2453
|
||||
},
|
||||
"Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}':": {
|
||||
"category": "Error",
|
||||
"code": 2454
|
||||
},
|
||||
"Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2455
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Interface 'Bar' incorrectly extends interface 'Foo':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Int
|
||||
|
||||
interface Bar extends Foo {
|
||||
~~~
|
||||
!!! error TS2429: Interface 'Bar' incorrectly extends interface 'Foo':
|
||||
!!! error TS2429: Types of property 'f' are incompatible:
|
||||
!!! error TS2429: Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
!!! error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
!!! error TS2430: Types of property 'f' are incompatible.
|
||||
!!! error TS2430: Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
f(key: string): string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"':
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
Property 'someClass' is missing in type 'Number'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
@@ -8,8 +8,8 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tes
|
||||
var x = moduleA;
|
||||
x = 1; // Should be error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"':
|
||||
!!! error TS2322: Property 'someClass' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2323: Property 'someClass' is missing in type 'Number'.
|
||||
var y = 1;
|
||||
y = moduleA; // should be error
|
||||
~
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base<string>':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base<string>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'String' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtypi
|
||||
// is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T)
|
||||
class Derived<U> extends Base<string> { // error
|
||||
~~~~~~~
|
||||
!!! error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base<string>':
|
||||
!!! error TS2416: Types of property 'x' are incompatible:
|
||||
!!! error TS2416: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base<string>'.
|
||||
!!! error TS2415: Types of property 'x' are incompatible.
|
||||
!!! error TS2415: Type 'String' is not assignable to type 'string'.
|
||||
x: String;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'U' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSuperty
|
||||
// is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T)
|
||||
class Derived<U extends String> extends Base { // error
|
||||
~~~~~~~
|
||||
!!! error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base':
|
||||
!!! error TS2416: Types of property 'x' are incompatible:
|
||||
!!! error TS2416: Type 'U' is not assignable to type 'string'.
|
||||
!!! error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base'.
|
||||
!!! error TS2415: Types of property 'x' are incompatible.
|
||||
!!! error TS2415: Type 'U' is not assignable to type 'string'.
|
||||
x: U;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments':
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS
|
||||
function foo(a) {
|
||||
arguments = 10; /// This shouldnt be of type number and result in error.
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'IArguments':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
}
|
||||
@@ -1,49 +1,49 @@
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]':
|
||||
Type 'C3' is not assignable to type 'I1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
Type 'C3' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]':
|
||||
Type 'I1' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
Type 'I1' is not assignable to type 'C1'.
|
||||
Property 'C1M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]':
|
||||
Type 'C3' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
Type 'C3' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]':
|
||||
Type 'C1' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
Type 'C1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]':
|
||||
Type 'I1' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
Type 'I1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]':
|
||||
Type 'C3' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
Type 'C3' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
Type 'C2' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
Type 'C1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
Type 'I1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -95,20 +95,20 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
|
||||
|
||||
var i1_error: I1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c1_error: C1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c2_error: C2 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
var c3_error: C3 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
|
||||
|
||||
arr_any = arr_i1; // should be ok - is
|
||||
@@ -121,81 +121,81 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
|
||||
arr_i1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_i1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'I1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c1 = arr_c1; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_i1; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'C1M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'C1M1' is missing in type 'I1'.
|
||||
arr_c1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c2 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c2 = arr_c1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C1'.
|
||||
arr_c2 = arr_i1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'I1'.
|
||||
arr_c2 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C3'.
|
||||
|
||||
// "clean up bug" occurs at this point
|
||||
// if you move these three expressions to another file, they raise an error
|
||||
// something to do with state from the above propagating forward?
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C2'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C1'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'I1'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
Type 'C2' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
Type 'C1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
Type 'I1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -72,47 +72,47 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is n
|
||||
// "clean up error" occurs at this point
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C2'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C1'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'I1'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is n
|
||||
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]':
|
||||
Type 'IToken' is not assignable to type 'IStateToken':
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
Property 'state' is missing in type 'IToken'.
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[
|
||||
var lineTokens:ILineTokens= this.tokenize(line, state, true);
|
||||
var tokens:IStateToken[]= lineTokens.tokens;
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]':
|
||||
!!! error TS2322: Type 'IToken' is not assignable to type 'IStateToken':
|
||||
!!! error TS2322: Property 'state' is missing in type 'IToken'.
|
||||
!!! error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
!!! error TS2323: Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
!!! error TS2323: Property 'state' is missing in type 'IToken'.
|
||||
if (tokens.length === 0) {
|
||||
return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other:
|
||||
Type '{ foo: string; }' is not assignable to type '{ id: number; }':
|
||||
tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
Property 'id' is missing in type '{ foo: string; }'.
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: strin
|
||||
// has type { foo: string }[], which is not assignable to { id: number }[].
|
||||
<{ id: number; }[]>[{ foo: "s" }];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other:
|
||||
!!! error TS2353: Type '{ foo: string; }' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2353: Property 'id' is missing in type '{ foo: string; }'.
|
||||
!!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
!!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2352: Property 'id' is missing in type '{ foo: string; }'.
|
||||
|
||||
// Should succeed, as the {} element causes the type of the array to be {}[]
|
||||
<{ id: number; }[]>[{ foo: "s" }, {}];
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string' or 'number'.
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]':
|
||||
Type 'number[]' is not assignable to type 'number[][]':
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
Type 'number[]' is not assignable to type 'number[][]'.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -29,17 +29,17 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]'
|
||||
var myVar: myInt;
|
||||
var strArray: string[] = [myVar.voidFn()];
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'void[]' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
var myArray: number[][][];
|
||||
myArray = [[1, 2]];
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]':
|
||||
!!! error TS2322: Type 'number[]' is not assignable to type 'number[][]':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
!!! error TS2323: Type 'number[]' is not assignable to type 'number[][]'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
|
||||
function isEmpty(l: { length: number }) {
|
||||
return l.length === 0;
|
||||
|
||||
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }':
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
Property 'isArray' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
|
||||
@@ -19,8 +19,8 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }':
|
||||
!!! error TS2322: Property 'isArray' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
!!! error TS2323: Property 'isArray' is missing in type 'Number'.
|
||||
var xs4: typeof Array<typeof x>;
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }':
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }':
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type '{ one: number; }'.
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: numbe
|
||||
|
||||
x = y;
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }':
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2323: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
y = x;
|
||||
~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }':
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{ one: number; }'.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => number':
|
||||
Type 'string | number' is not assignable to type 'number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
Property '0' is missing in type '{}[]'.
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// error
|
||||
numArray = numStrTuple;
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => number':
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
emptyObjTuple = emptyObjArray;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]':
|
||||
!!! error TS2322: Property '0' is missing in type '{}[]'.
|
||||
!!! error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2323: Property '0' is missing in type '{}[]'.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ====
|
||||
var b2: { b: number;} = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = {b: 0, a: 0 };
|
||||
|
||||
@@ -33,16 +33,16 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
}; // error
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
f: (n) => { return 0; },
|
||||
m: 0,
|
||||
}; // error
|
||||
@@ -57,8 +57,8 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
n: 0,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(4,5): error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
Types of property 'name' are incompatible:
|
||||
Types of property 'name' are incompatible.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
Property 'id' is missing in type '{ name: string; }'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS
|
||||
foo({ id: 1234, name: false }); // Error, name of wrong type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
!!! error TS2345: Types of property 'name' are incompatible:
|
||||
!!! error TS2345: Types of property 'name' are incompatible.
|
||||
!!! error TS2345: Type 'boolean' is not assignable to type 'string'.
|
||||
foo({ name: "hello" }); // Error, id required but missing
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -61,42 +61,42 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -69,20 +69,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -92,46 +92,46 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -68,22 +68,22 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
+45
-45
@@ -1,29 +1,29 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number':
|
||||
Types of parameters 'args' and 'args' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'args' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number':
|
||||
Types of parameters 'x' and 'args' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'x' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number':
|
||||
Types of parameters 'args' and 'z' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'z' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'z' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'args' and 'z' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -42,17 +42,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (...args: number[]) => 1; // ok, same number of required params
|
||||
a = (...args: string[]) => 1; // error, type mismatch
|
||||
~
|
||||
!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'args' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a = (x?: string) => 1; // error, incompatible type
|
||||
~
|
||||
!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 'args' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var a2: (x: number, ...z: number[]) => number;
|
||||
@@ -63,9 +63,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = (x: number, ...args: number[]) => 1; // ok, same number of required params
|
||||
a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a2 = (x: number, y?: number) => 1; // ok, same number of required params
|
||||
|
||||
@@ -76,36 +76,36 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number, y: string) => 1; // ok, all present params match
|
||||
a3 = (x: number, y?: number, z?: number) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: number, ...z: number[]) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'z' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: string, y?: string, z?: string) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var a4: (x?: number, y?: string, ...z: number[]) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
a4 = (x?: number, y?: number) => 1; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x: number) => 1; // ok, all present params match
|
||||
a4 = (x: number, y?: number) => 1; // error, second param has type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types
|
||||
a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,30 +1,30 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -53,20 +53,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -76,38 +76,38 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
|
||||
@@ -80,22 +80,22 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -121,26 +121,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b16: new <T>(x: (a: T) => T) => T[];
|
||||
a16 = b16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
b = a; // ok
|
||||
|
||||
class B2 extends A {
|
||||
@@ -41,10 +41,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Derived> {
|
||||
@@ -56,9 +56,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; };
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // ok
|
||||
|
||||
var b2: { [x: number]: T; };
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -94,91 +94,91 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t; // error
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
s2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
s2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
s2 = a2; // ok
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
}
|
||||
|
||||
module WithBase {
|
||||
@@ -205,20 +205,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = t; // ok
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
s2 = t; // ok
|
||||
s2 = b; // ok
|
||||
s2 = a2; // ok
|
||||
@@ -226,10 +226,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
@@ -237,10 +237,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b2; // ok
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t; // ok
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2322: Type 'I' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2322: Type 'C' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
Property 'fooo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'foo' is missing in type 'I'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'I'.
|
||||
i = c; // error
|
||||
~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'fooo' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'fooo' is missing in type 'C'.
|
||||
+72
-72
@@ -1,50 +1,50 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
|
||||
@@ -81,49 +81,49 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a;
|
||||
b = i;
|
||||
b = d;
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
|
||||
i = a;
|
||||
i = b;
|
||||
i = d;
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
|
||||
d = a;
|
||||
d = b;
|
||||
d = i;
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -155,78 +155,78 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
a = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
b = i;
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
b = b;
|
||||
|
||||
i = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
i = b;
|
||||
i = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
i = i;
|
||||
|
||||
d = a;
|
||||
d = b; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
d = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
|
||||
|
||||
@@ -87,34 +87,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
c = f; // ok
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
a = f; // ok
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
b = f; // ok
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
|
||||
+27
-27
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2322: Type 'F' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
|
||||
|
||||
@@ -94,44 +94,44 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
c = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
a = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
b = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
}
|
||||
+87
-87
@@ -1,60 +1,60 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: Type 'T' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Property ''1.0'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
|
||||
|
||||
@@ -81,74 +81,74 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t;
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
t = s;
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
s = s2; // ok
|
||||
s = a2;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2;
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T2'.
|
||||
t2 = s2;
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'S2'.
|
||||
s2 = t;
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
s2 = b;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
s2 = a2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
b = a;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s;
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a2 = b2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
!!! error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
b2 = a2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t;
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
|
||||
module NumbersAndStrings {
|
||||
@@ -173,8 +173,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = s2; // ok
|
||||
s = a2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // ok
|
||||
@@ -182,52 +182,52 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s2 = b; // ok
|
||||
s2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }':
|
||||
!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
a = s2; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }':
|
||||
!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2323: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number':
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number':
|
||||
Types of parameters 'x' and 's1' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
Types of parameters 'x' and 's1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number':
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
|
||||
g = f2; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
g = f3; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 's1' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
g = f4; // Error
|
||||
~
|
||||
!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
class C {
|
||||
constructor(x: string);
|
||||
@@ -52,6 +52,6 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
|
||||
d = C; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,32 +1,32 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
class B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
interface B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: string]: string; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'string'.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x4 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'string[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }':
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }':
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }':
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }':
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>':
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x5 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>':
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x6 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>':
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x7 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>':
|
||||
!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'string[]'.
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'string[]'.
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
Types of property 'toString' are incompatible:
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString:
|
||||
var b: {} = a; // ok
|
||||
var c: Object = a; // should be error
|
||||
~
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
!!! error TS2322: Types of property 'toString' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
Types of property 'toString' are incompatible:
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2322: Type '{}' is not assignable to type 'Function':
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function':
|
||||
Types of property 'apply' are incompatible:
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
Types of property 'apply' are incompatible.
|
||||
Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ====
|
||||
var errObj: Object = { toString: 0 }; // Error, incompatible toString
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
!!! error TS2322: Types of property 'toString' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
var goodObj: Object = {
|
||||
toString(x?) {
|
||||
return "";
|
||||
@@ -22,8 +22,8 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type
|
||||
|
||||
var errFun: Function = {}; // Error for no call signature
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Function':
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
|
||||
function foo() { }
|
||||
module foo {
|
||||
@@ -46,6 +46,6 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type
|
||||
|
||||
var badFundule: Function = bad; // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function':
|
||||
!!! error TS2322: Types of property 'apply' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
!!! error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Types of property 'apply' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
@@ -6,14 +6,14 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -79,19 +79,19 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
M2.M3 = { x: '' }; // Error
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
(M2).M3 = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
(M2.M3) = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
function fn() { }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }':
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }':
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
Index signature is missing in type '() => void'.
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignatur
|
||||
|
||||
var v1: {
|
||||
~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }':
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{}'.
|
||||
[n: number]: Foo
|
||||
} = o; // Should be allowed
|
||||
|
||||
var v2: {
|
||||
~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }':
|
||||
!!! error TS2322: Index signature is missing in type '() => void'.
|
||||
!!! error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
!!! error TS2323: Index signature is missing in type '() => void'.
|
||||
[n: number]: Bar
|
||||
} = f; // Should be allowed
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y':
|
||||
tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
|
||||
Named properties 'm' of types 'X' and 'Y' are not identical.
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@ tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interfac
|
||||
|
||||
interface Z extends X, Y { }
|
||||
~
|
||||
!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y':
|
||||
!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
|
||||
!!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical.
|
||||
@@ -2,7 +2,7 @@ tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected.
|
||||
tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected.
|
||||
tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'.
|
||||
tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'.
|
||||
tests/cases/compiler/bases.ts(11,7): error TS2421: Class 'C' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'.
|
||||
@@ -30,8 +30,8 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o
|
||||
|
||||
class C extends B implements I {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Property 'x' is missing in type 'C'.
|
||||
constructor() {
|
||||
~~~~~~~~~~~~~~~
|
||||
this.x: any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
Types of property 'a' are incompatible:
|
||||
Type '(x: number) => string' is not assignable to type '(x: number) => number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -63,10 +63,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
// S's
|
||||
interface I2 extends Base2 {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
!!! error TS2429: Types of property 'a' are incompatible:
|
||||
!!! error TS2429: Type '(x: number) => string' is not assignable to type '(x: number) => number':
|
||||
!!! error TS2429: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
Types of property 'a2' are incompatible:
|
||||
Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
Types of property 'a8' are incompatible:
|
||||
Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -67,11 +67,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
|
||||
interface I2<T, U> extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a2' are incompatible:
|
||||
!!! error TS2429: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]':
|
||||
!!! error TS2429: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2429: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -82,15 +82,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
|
||||
interface I4 extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a8' are incompatible:
|
||||
!!! error TS2429: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2429: Types of property 'foo' are incompatible:
|
||||
!!! error TS2429: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>':
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
|
||||
Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesTha
|
||||
|
||||
interface A extends I<number>, I<string> { }
|
||||
~
|
||||
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>':
|
||||
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
|
||||
!!! error TS2320: Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
|
||||
|
||||
var x: A;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other.
|
||||
Property '2' is missing in type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other.
|
||||
Property '2' is missing in type '[C, D]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other:
|
||||
Types of property '1' are incompatible:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other.
|
||||
Types of property '1' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other:
|
||||
Types of property '0' are incompatible:
|
||||
Type 'C' is not assignable to type 'A':
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other.
|
||||
Types of property '0' are incompatible.
|
||||
Type 'C' is not assignable to type 'A'.
|
||||
Property 'a' is missing in type 'C'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other:
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => number':
|
||||
Type 'string | number' is not assignable to type 'number':
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot find name 't4'.
|
||||
|
||||
@@ -33,14 +33,14 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot
|
||||
var emptyObjTuple = <[{}, {}]>numStrTuple;
|
||||
var numStrBoolTuple = <[number, string, boolean]>numStrTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other:
|
||||
!!! error TS2353: Property '2' is missing in type '[number, string]'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other.
|
||||
!!! error TS2352: Property '2' is missing in type '[number, string]'.
|
||||
var classCDTuple: [C, D] = [new C(), new D()];
|
||||
var interfaceIITuple = <[I, I]>classCDTuple;
|
||||
var classCDATuple = <[C, D, A]>classCDTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other:
|
||||
!!! error TS2353: Property '2' is missing in type '[C, D]'.
|
||||
!!! error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other.
|
||||
!!! error TS2352: Property '2' is missing in type '[C, D]'.
|
||||
var eleFromCDA1 = classCDATuple[2]; // A
|
||||
var eleFromCDA2 = classCDATuple[5]; // {}
|
||||
var t10: [E1, E2] = [E1.one, E2.one];
|
||||
@@ -50,24 +50,24 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot
|
||||
// error
|
||||
var t3 = <[number, number]>numStrTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other:
|
||||
!!! error TS2353: Types of property '1' are incompatible:
|
||||
!!! error TS2353: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other.
|
||||
!!! error TS2352: Types of property '1' are incompatible.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
var t9 = <[A, I]>classCDTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other:
|
||||
!!! error TS2353: Types of property '0' are incompatible:
|
||||
!!! error TS2353: Type 'C' is not assignable to type 'A':
|
||||
!!! error TS2353: Property 'a' is missing in type 'C'.
|
||||
!!! error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other.
|
||||
!!! error TS2352: Types of property '0' are incompatible.
|
||||
!!! error TS2352: Type 'C' is not assignable to type 'A'.
|
||||
!!! error TS2352: Property 'a' is missing in type 'C'.
|
||||
var array1 = <number[]>numStrTuple;
|
||||
~~~~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'.
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other:
|
||||
!!! error TS2353: Types of property 'pop' are incompatible:
|
||||
!!! error TS2353: Type '() => string | number' is not assignable to type '() => number':
|
||||
!!! error TS2353: Type 'string | number' is not assignable to type 'number':
|
||||
!!! error TS2353: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
!!! error TS2352: Types of property 'pop' are incompatible.
|
||||
!!! error TS2352: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2352: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
t4[2] = 10;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 't4'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
|
||||
@@ -28,11 +28,11 @@ tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not
|
||||
var c3 = new Z();
|
||||
c1 = c2 = c3; // a bug made this not report the same error as below
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
c2 = c3; // Error TS111: Cannot convert Z to Y
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2322: Type 'A' is not assignable to type 'B':
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
Property 'value' is missing in type 'A'.
|
||||
tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
@@ -23,8 +23,8 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not
|
||||
// error cases
|
||||
b = a = new A();
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B':
|
||||
!!! error TS2322: Property 'value' is missing in type 'A'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2323: Property 'value' is missing in type 'A'.
|
||||
a = b = new A();
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z'
|
||||
|
||||
c1 = c2 = c3; // Should be error
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2421: Class 'D2' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2420: Class 'D2' incorrectly implements interface 'I'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7)
|
||||
|
||||
class D2 implements I {
|
||||
~~
|
||||
!!! error TS2421: Class 'D2' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2420: Class 'D2' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Types have separate declarations of a private property 'x'.
|
||||
public foo(x: any) { return x }
|
||||
private x = 3;
|
||||
other(x: any) { return x }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n
|
||||
class A { foo(): number { return 1; } }
|
||||
class C implements A {} // error
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Property 'foo' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Property 'foo' is missing in type 'C'.
|
||||
|
||||
class C2 extends A {
|
||||
foo() {
|
||||
@@ -22,5 +22,5 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'foo' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'C'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n
|
||||
}
|
||||
class C implements A {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Property 'x' is missing in type 'C'.
|
||||
foo() {
|
||||
return 1;
|
||||
}
|
||||
@@ -25,5 +25,5 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'x' is missing in type 'C'.
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2322: Type 'C2' is not assignable to type 'C':
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n
|
||||
}
|
||||
class C implements A {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Types have separate declarations of a private property 'x'.
|
||||
private x = 1;
|
||||
foo() {
|
||||
return 1;
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n
|
||||
var c2: C2;
|
||||
c = c2;
|
||||
~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type '{ bar?: string; }' is not assignable to type '{ bar: string; }':
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'.
|
||||
Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
|
||||
class Derived2 extends Base<{ bar: string; }> {
|
||||
~~~~~~~~
|
||||
!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>':
|
||||
!!! error TS2416: Types of property 'foo' are incompatible:
|
||||
!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }':
|
||||
!!! error TS2416: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'.
|
||||
!!! error TS2415: Types of property 'foo' are incompatible.
|
||||
!!! error TS2415: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'.
|
||||
!!! error TS2415: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
foo: {
|
||||
bar?: string; // error
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only
|
||||
tests/cases/compiler/classUpdateTests.ts(46,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/classUpdateTests.ts(47,18): error TS2335: 'super' can only be referenced in a derived class.
|
||||
tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
|
||||
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2416: Class 'L' incorrectly extends base class 'G':
|
||||
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'.
|
||||
Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
tests/cases/compiler/classUpdateTests.ts(69,7): error TS2416: Class 'M' incorrectly extends base class 'G':
|
||||
tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'.
|
||||
Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
|
||||
tests/cases/compiler/classUpdateTests.ts(105,15): error TS2339: Property 'p1' does not exist on type 'Q'.
|
||||
@@ -96,8 +96,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do
|
||||
|
||||
class L extends G {
|
||||
~
|
||||
!!! error TS2416: Class 'L' incorrectly extends base class 'G':
|
||||
!!! error TS2416: Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
!!! error TS2415: Class 'L' incorrectly extends base class 'G'.
|
||||
!!! error TS2415: Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
constructor(private p1:number) {
|
||||
super(); // NO ERROR
|
||||
}
|
||||
@@ -105,8 +105,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do
|
||||
|
||||
class M extends G {
|
||||
~
|
||||
!!! error TS2416: Class 'M' incorrectly extends base class 'G':
|
||||
!!! error TS2416: Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
!!! error TS2415: Class 'M' incorrectly extends base class 'G'.
|
||||
!!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
constructor(private p1:number) { // ERROR
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
var i = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class 'D' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2420: Class 'D' incorrectly implements interface 'I'.
|
||||
Property 'foo' is missing in type 'D'.
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class
|
||||
|
||||
class D implements I, J {
|
||||
~
|
||||
!!! error TS2421: Class 'D' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Property 'foo' is missing in type 'D'.
|
||||
!!! error TS2420: Class 'D' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Property 'foo' is missing in type 'D'.
|
||||
baz() { }
|
||||
bat() { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape':
|
||||
Types of property 'Utils' are incompatible:
|
||||
Type 'typeof Utils' is not assignable to type 'typeof Utils':
|
||||
tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
Types of property 'Utils' are incompatible.
|
||||
Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
Property 'convert' is missing in type 'typeof Utils'.
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static
|
||||
|
||||
class Path extends Shape {
|
||||
~~~~
|
||||
!!! error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape':
|
||||
!!! error TS2418: Types of property 'Utils' are incompatible:
|
||||
!!! error TS2418: Type 'typeof Utils' is not assignable to type 'typeof Utils':
|
||||
!!! error TS2418: Property 'convert' is missing in type 'typeof Utils'.
|
||||
!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
!!! error TS2417: Types of property 'Utils' are incompatible.
|
||||
!!! error TS2417: Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
!!! error TS2417: Property 'convert' is missing in type 'typeof Utils'.
|
||||
name: string;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(5,1): error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2323: Type 'string' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2322: Type 'string' is not assignable to type '{ a: string; }':
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2323: Type 'string' is not assignable to type '{ a: string; }'.
|
||||
Property 'a' is missing in type 'String'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2323: Type 'string' is not assignable to type 'void'.
|
||||
|
||||
@@ -28,8 +28,8 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen
|
||||
var x4: {a: string};
|
||||
x4 += '';
|
||||
~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }':
|
||||
!!! error TS2322: Property 'a' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'String'.
|
||||
|
||||
var x5: void;
|
||||
x5 += '';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean':
|
||||
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2323: Type 'string | number' is not assignable to type 'boolean'.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ====
|
||||
var x: boolean = (true ? 1 : ""); // should be an error
|
||||
~
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'boolean':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
@@ -1,17 +1,17 @@
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2322: Type 'A | B' is not assignable to type 'A':
|
||||
Type 'B' is not assignable to type 'A':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2323: Type 'A | B' is not assignable to type 'A'.
|
||||
Type 'B' is not assignable to type 'A'.
|
||||
Property 'propertyA' is missing in type 'B'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2322: Type 'A | B' is not assignable to type 'B':
|
||||
Type 'A' is not assignable to type 'B':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2323: Type 'A | B' is not assignable to type 'B'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
Property 'propertyB' is missing in type 'A'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number':
|
||||
Type '(n: X) => string' is not assignable to type '(t: X) => number':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string':
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => string':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean':
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => boolean':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -32,27 +32,27 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou
|
||||
//Be contextually typed and and bct is not identical, results in errors that union type is not assignable to target
|
||||
var result2: A = true ? a : b;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'A | B' is not assignable to type 'A':
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'A':
|
||||
!!! error TS2322: Property 'propertyA' is missing in type 'B'.
|
||||
!!! error TS2323: Type 'A | B' is not assignable to type 'A'.
|
||||
!!! error TS2323: Type 'B' is not assignable to type 'A'.
|
||||
!!! error TS2323: Property 'propertyA' is missing in type 'B'.
|
||||
var result3: B = true ? a : b;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'A | B' is not assignable to type 'B':
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B':
|
||||
!!! error TS2322: Property 'propertyB' is missing in type 'A'.
|
||||
!!! error TS2323: Type 'A | B' is not assignable to type 'B'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2323: Property 'propertyB' is missing in type 'A'.
|
||||
|
||||
var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number':
|
||||
!!! error TS2322: Type '(n: X) => string' is not assignable to type '(t: X) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2323: Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string':
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => string':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean':
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => boolean':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D':
|
||||
tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
|
||||
Named properties 'm' of types 'B' and 'D' are not identical.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Inte
|
||||
|
||||
interface E extends B { } // Error here for extending B and D
|
||||
~
|
||||
!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D':
|
||||
!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
|
||||
!!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical.
|
||||
interface E extends D { } // No duplicate error here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not satisfy the constraint 'A':
|
||||
tests/cases/compiler/constraints0.ts(14,9): error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
Property 'a' is missing in type 'B'.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not sati
|
||||
var v1: C<A>; // should work
|
||||
var v2: C<B>; // should not work
|
||||
~~~~
|
||||
!!! error TS2343: Type 'B' does not satisfy the constraint 'A':
|
||||
!!! error TS2343: Property 'a' is missing in type 'B'.
|
||||
!!! error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
!!! error TS2344: Property 'a' is missing in type 'B'.
|
||||
|
||||
var y = v1.x.a; // 'a' should be of type 'number'
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
Types of property 'a' are incompatible:
|
||||
Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
// S's
|
||||
interface I2 extends Base2 {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
!!! error TS2429: Types of property 'a' are incompatible:
|
||||
!!! error TS2429: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number':
|
||||
!!! error TS2429: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: new (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
+26
-26
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
Types of property 'a2' are incompatible:
|
||||
Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
Types of property 'a8' are incompatible:
|
||||
Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
|
||||
interface I2<T, U> extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a2' are incompatible:
|
||||
!!! error TS2429: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]':
|
||||
!!! error TS2429: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2429: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -72,15 +72,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
|
||||
interface I4 extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a8' are incompatible:
|
||||
!!! error TS2429: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2429: Types of property 'foo' are incompatible:
|
||||
!!! error TS2429: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number | boolean' is not assignable to type '() => string | number':
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number':
|
||||
Type 'boolean' is not assignable to type 'string | number':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(8,1): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]':
|
||||
Types of property '0' are incompatible:
|
||||
Type '{}' is not assignable to type '{ a: string; }':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'.
|
||||
Types of property '0' are incompatible.
|
||||
Type '{}' is not assignable to type '{ a: string; }'.
|
||||
Property 'a' is missing in type '{}'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'.
|
||||
Property '2' is missing in type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => string':
|
||||
Type 'string | number' is not assignable to type 'string':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => string'.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23
|
||||
var numStrTuple: [number, string] = [5, "hello"];
|
||||
var numStrTuple2: [number, string] = [5, "foo", true];
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number | boolean' is not assignable to type '() => string | number':
|
||||
!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number':
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string | number':
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
!!! error TS2323: Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'number'.
|
||||
var numStrBoolTuple: [number, string, boolean] = [5, "foo", true];
|
||||
var objNumTuple: [{ a: string }, number] = [{ a: "world" }, 5];
|
||||
var strTupleTuple: [string, [number, {}]] = ["bar", [5, { x: 1, y: 1 }]];
|
||||
@@ -40,19 +40,19 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23
|
||||
// error
|
||||
objNumTuple = [ {}, 5];
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]':
|
||||
!!! error TS2322: Types of property '0' are incompatible:
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ a: string; }':
|
||||
!!! error TS2322: Property 'a' is missing in type '{}'.
|
||||
!!! error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'.
|
||||
!!! error TS2323: Types of property '0' are incompatible.
|
||||
!!! error TS2323: Type '{}' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2323: Property 'a' is missing in type '{}'.
|
||||
numStrBoolTuple = numStrTuple;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]':
|
||||
!!! error TS2322: Property '2' is missing in type '[number, string]'.
|
||||
!!! error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'.
|
||||
!!! error TS2323: Property '2' is missing in type '[number, string]'.
|
||||
var strStrTuple: [string, string] = ["foo", "bar", 5];
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => string':
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient.
|
||||
tests/cases/compiler/contextualTyping.ts(197,15): error TS2300: Duplicate identifier 'Point'.
|
||||
tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'.
|
||||
tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'.
|
||||
tests/cases/compiler/contextualTyping.ts(230,5): error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping.ts (4 errors) ====
|
||||
@@ -242,5 +242,5 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not
|
||||
interface B extends A { }
|
||||
var x: B = { };
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/contextualTyping11.ts(1,13): error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]':
|
||||
Type 'foo' is not assignable to type '{ id: number; }':
|
||||
tests/cases/compiler/contextualTyping11.ts(1,13): error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type 'foo' is not assignable to type '{ id: number; }'.
|
||||
Property 'id' is missing in type 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping11.ts (1 errors) ====
|
||||
class foo { public bar:{id:number;}[] = [<foo>({})]; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]':
|
||||
!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2322: Property 'id' is missing in type 'foo'.
|
||||
!!! error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2323: Type 'foo' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2323: Property 'id' is missing in type 'foo'.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user