mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 10:43:51 -05:00
Merge branch 'master' into computedPropertyName
This commit is contained in:
@@ -144,7 +144,7 @@ module ts {
|
||||
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: { 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: { code: 2323, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
|
||||
Type_0_is_not_assignable_to_type_1: { code: 2322, 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: { code: 2326, category: DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." },
|
||||
|
||||
@@ -572,10 +572,6 @@
|
||||
"category": "Error",
|
||||
"code": 2322
|
||||
},
|
||||
"Type '{0}' is not assignable to type '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2323
|
||||
},
|
||||
"Property '{0}' is missing in type '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 2324
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/// <reference path="core.ts"/>
|
||||
/// <reference path="scanner.ts"/>
|
||||
|
||||
module ts {
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ module TypeScript {
|
||||
Expression_expected: "Expression expected.",
|
||||
Type_expected: "Type expected.",
|
||||
Template_literal_cannot_be_used_as_an_element_name: "Template literal cannot be used as an element name.",
|
||||
Computed_property_names_cannot_be_used_here: "Computed property names cannot be used here.",
|
||||
Duplicate_identifier_0: "Duplicate identifier '{0}'.",
|
||||
The_name_0_does_not_exist_in_the_current_scope: "The name '{0}' does not exist in the current scope.",
|
||||
The_name_0_does_not_refer_to_a_value: "The name '{0}' does not refer to a value.",
|
||||
|
||||
@@ -97,6 +97,7 @@ module TypeScript {
|
||||
"Expression expected.": { "code": 1109, "category": DiagnosticCategory.Error },
|
||||
"Type expected.": { "code": 1110, "category": DiagnosticCategory.Error },
|
||||
"Template literal cannot be used as an element name.": { "code": 1111, "category": DiagnosticCategory.Error },
|
||||
"Computed property names cannot be used here.": { "code": 1112, "category": DiagnosticCategory.Error },
|
||||
"Duplicate identifier '{0}'.": { "code": 2000, "category": DiagnosticCategory.Error },
|
||||
"The name '{0}' does not exist in the current scope.": { "code": 2001, "category": DiagnosticCategory.Error },
|
||||
"The name '{0}' does not refer to a value.": { "code": 2002, "category": DiagnosticCategory.Error },
|
||||
|
||||
@@ -375,6 +375,10 @@
|
||||
"category": "Error",
|
||||
"code": 1111
|
||||
},
|
||||
"Computed property names cannot be used here.": {
|
||||
"category": "Error",
|
||||
"code": 1112
|
||||
},
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2000
|
||||
|
||||
@@ -620,8 +620,9 @@ var TypeScript;
|
||||
SyntaxKind[SyntaxKind["Parameter"] = 208] = "Parameter";
|
||||
SyntaxKind[SyntaxKind["EnumElement"] = 209] = "EnumElement";
|
||||
SyntaxKind[SyntaxKind["TypeAnnotation"] = 210] = "TypeAnnotation";
|
||||
SyntaxKind[SyntaxKind["ExternalModuleReference"] = 211] = "ExternalModuleReference";
|
||||
SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 212] = "ModuleNameModuleReference";
|
||||
SyntaxKind[SyntaxKind["ComputedPropertyName"] = 211] = "ComputedPropertyName";
|
||||
SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference";
|
||||
SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 213] = "ModuleNameModuleReference";
|
||||
SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword";
|
||||
SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword";
|
||||
SyntaxKind[SyntaxKind["FirstFutureReservedKeyword"] = SyntaxKind.ClassKeyword] = "FirstFutureReservedKeyword";
|
||||
@@ -1040,7 +1041,7 @@ var definitions = [
|
||||
name: 'VariableDeclaratorSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true },
|
||||
{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
@@ -1376,7 +1377,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'questionToken', isToken: true, isOptional: true, itTypeScriptSpecific: true },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' }
|
||||
]
|
||||
@@ -1398,7 +1399,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'questionToken', isToken: true, isOptional: true },
|
||||
{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true }
|
||||
],
|
||||
@@ -1500,7 +1501,7 @@ var definitions = [
|
||||
interfaces: ['IMemberDeclarationSyntax'],
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken' },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax', isOptional: true },
|
||||
{ name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true }
|
||||
@@ -1514,7 +1515,7 @@ var definitions = [
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
{ name: 'getKeyword', isToken: true, excludeFromAST: true },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
@@ -1526,7 +1527,7 @@ var definitions = [
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
{ name: 'setKeyword', isToken: true, excludeFromAST: true },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
],
|
||||
@@ -1713,7 +1714,7 @@ var definitions = [
|
||||
name: 'EnumElementSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
},
|
||||
@@ -1739,12 +1740,22 @@ var definitions = [
|
||||
{ name: 'closeBraceToken', isToken: true, excludeFromAST: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'ComputedPropertyNameSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyNameSyntax'],
|
||||
children: [
|
||||
{ name: 'openBracketToken', isToken: true },
|
||||
{ name: 'expression', type: 'IExpressionSyntax' },
|
||||
{ name: 'closeBracketToken', isToken: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'SimplePropertyAssignmentSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'colonToken', isToken: true, excludeFromAST: true },
|
||||
{ name: 'expression', type: 'IExpressionSyntax' }
|
||||
]
|
||||
@@ -1754,7 +1765,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1005,7 +1005,7 @@ module TypeScript.Parser {
|
||||
return true;
|
||||
}
|
||||
|
||||
return isPropertyName(currentToken(), inErrorRecovery);
|
||||
return isPropertyName(/*peekToken:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function tryParseEnumElementEqualsValueClause(): EqualsValueClauseSyntax {
|
||||
@@ -1019,11 +1019,11 @@ module TypeScript.Parser {
|
||||
return <EnumElementSyntax>node;
|
||||
}
|
||||
|
||||
if (!isPropertyName(currentToken(), inErrorRecovery)) {
|
||||
if (!isPropertyName(/*peekToken:*/ 0, inErrorRecovery)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new EnumElementSyntax(parseNodeData, eatPropertyName(), tryParseEnumElementEqualsValueClause());
|
||||
return new EnumElementSyntax(parseNodeData, parsePropertyName(), tryParseEnumElementEqualsValueClause());
|
||||
}
|
||||
|
||||
function isModifierKind(kind: SyntaxKind): boolean {
|
||||
@@ -1131,7 +1131,7 @@ module TypeScript.Parser {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isPropertyName(peekToken(modifierCount + 1), inErrorRecovery);
|
||||
return isPropertyName(/*peekIndex:*/ modifierCount + 1, inErrorRecovery);
|
||||
}
|
||||
|
||||
function parseAccessor(checkForStrictMode: boolean): IAccessorSyntax {
|
||||
@@ -1152,14 +1152,14 @@ module TypeScript.Parser {
|
||||
|
||||
function parseGetMemberAccessorDeclaration(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, checkForStrictMode: boolean): GetAccessorSyntax {
|
||||
return new GetAccessorSyntax(parseNodeData,
|
||||
modifiers, consumeToken(getKeyword), eatPropertyName(),
|
||||
modifiers, consumeToken(getKeyword), parsePropertyName(),
|
||||
parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode));
|
||||
}
|
||||
|
||||
function parseSetMemberAccessorDeclaration(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, checkForStrictMode: boolean): SetAccessorSyntax {
|
||||
return new SetAccessorSyntax(parseNodeData,
|
||||
modifiers, consumeToken(setKeyword), eatPropertyName(),
|
||||
modifiers, consumeToken(setKeyword), parsePropertyName(),
|
||||
parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode));
|
||||
}
|
||||
@@ -1173,10 +1173,48 @@ module TypeScript.Parser {
|
||||
// checks for a subset of the conditions of the previous two calls.
|
||||
var _modifierCount = modifierCount();
|
||||
return isConstructorDeclaration(_modifierCount) ||
|
||||
isMemberFunctionDeclaration(_modifierCount, inErrorRecovery) ||
|
||||
isAccessor(_modifierCount, inErrorRecovery) ||
|
||||
isMemberVariableDeclaration(_modifierCount, inErrorRecovery) ||
|
||||
isIndexMemberDeclaration(_modifierCount);
|
||||
isIndexMemberDeclaration(_modifierCount) ||
|
||||
isMemberVariableOrFunctionDeclaration(_modifierCount, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isMemberVariableOrFunctionDeclaration(peekIndex: number, inErrorRecovery: boolean) {
|
||||
// Check if its the start of a property or method. Both must start with a property name.
|
||||
if (!isPropertyName(peekIndex, inErrorRecovery)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SyntaxFacts.isAnyKeyword(peekToken(peekIndex).kind)) {
|
||||
// It wasn't a keyword. So this is definitely a member variable or function.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Keywords *can* technically start properties and methods. However, they often
|
||||
// are actually intended to start a real ts/js construct. Only accept a keyword
|
||||
// if it is definitely a property or method.
|
||||
// keywords are also property names. Only accept a keyword as a property
|
||||
// name if is of the form:
|
||||
// public;
|
||||
// public=
|
||||
// public:
|
||||
// public }
|
||||
// public(
|
||||
// public<
|
||||
// public <eof>
|
||||
// public <newline>
|
||||
var nextToken = peekToken(peekIndex + 1);
|
||||
switch (nextToken.kind) {
|
||||
case SyntaxKind.SemicolonToken:
|
||||
case SyntaxKind.EqualsToken:
|
||||
case SyntaxKind.ColonToken:
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
case SyntaxKind.OpenParenToken:
|
||||
case SyntaxKind.LessThanToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
return true;
|
||||
default:
|
||||
return previousTokenHasTrailingNewLine(nextToken);
|
||||
}
|
||||
}
|
||||
|
||||
function tryParseClassElement(inErrorRecovery: boolean): IClassElementSyntax {
|
||||
@@ -1186,21 +1224,28 @@ module TypeScript.Parser {
|
||||
return <IClassElementSyntax>node;
|
||||
}
|
||||
|
||||
// Have to check for indexers before anything else. That way if we see "[foo:" we
|
||||
// parse it out as an indexer and not a member function or variable.
|
||||
var _modifierCount = modifierCount();
|
||||
if (isConstructorDeclaration(_modifierCount)) {
|
||||
return parseConstructorDeclaration();
|
||||
}
|
||||
else if (isMemberFunctionDeclaration(_modifierCount, inErrorRecovery)) {
|
||||
return parseMemberFunctionDeclaration();
|
||||
else if (isIndexMemberDeclaration(_modifierCount)) {
|
||||
return parseIndexMemberDeclaration();
|
||||
}
|
||||
else if (isAccessor(_modifierCount, inErrorRecovery)) {
|
||||
return parseAccessor(/*checkForStrictMode:*/ false);
|
||||
}
|
||||
else if (isMemberVariableDeclaration(_modifierCount, inErrorRecovery)) {
|
||||
return parseMemberVariableDeclaration();
|
||||
}
|
||||
else if (isIndexMemberDeclaration(_modifierCount)) {
|
||||
return parseIndexMemberDeclaration();
|
||||
else if (isMemberVariableOrFunctionDeclaration(/*peekIndex:*/ _modifierCount, inErrorRecovery)) {
|
||||
var modifiers = parseModifiers();
|
||||
var propertyName = parsePropertyName();
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseMemberFunctionDeclaration(modifiers, propertyName);
|
||||
}
|
||||
else {
|
||||
return parseMemberVariableDeclaration(modifiers, propertyName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
@@ -1233,13 +1278,7 @@ module TypeScript.Parser {
|
||||
return new ConstructorDeclarationSyntax(parseNodeData, modifiers, constructorKeyword, callSignature, block, semicolonToken);
|
||||
}
|
||||
|
||||
function isMemberFunctionDeclaration(modifierCount: number, inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(peekToken(modifierCount), inErrorRecovery) && isCallSignature(modifierCount + 1);
|
||||
}
|
||||
|
||||
function parseMemberFunctionDeclaration(): MemberFunctionDeclarationSyntax {
|
||||
var modifiers = parseModifiers();
|
||||
var propertyName = eatPropertyName();
|
||||
function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax {
|
||||
var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false);
|
||||
|
||||
// If we got an errant => then we want to parse what's coming up without requiring an
|
||||
@@ -1259,42 +1298,13 @@ module TypeScript.Parser {
|
||||
return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, block, semicolon);
|
||||
}
|
||||
|
||||
function isDefinitelyMemberVariablePropertyName(index: number): boolean {
|
||||
// keywords are also property names. Only accept a keyword as a property
|
||||
// name if is of the form:
|
||||
// public;
|
||||
// public=
|
||||
// public:
|
||||
// public }
|
||||
// public <eof>
|
||||
// public <newline>
|
||||
if (SyntaxFacts.isAnyKeyword(peekToken(index).kind)) {
|
||||
var nextToken = peekToken(index + 1);
|
||||
switch (nextToken.kind) {
|
||||
case SyntaxKind.SemicolonToken:
|
||||
case SyntaxKind.EqualsToken:
|
||||
case SyntaxKind.ColonToken:
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
return true;
|
||||
default:
|
||||
return previousTokenHasTrailingNewLine(nextToken);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If was a property name and not a keyword, then we're good to go.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function isMemberVariableDeclaration(modifierCount: number, inErrorRecover: boolean): boolean {
|
||||
return isPropertyName(peekToken(modifierCount), inErrorRecover) && isDefinitelyMemberVariablePropertyName(modifierCount);
|
||||
}
|
||||
|
||||
function parseMemberVariableDeclaration(): MemberVariableDeclarationSyntax {
|
||||
function parseMemberVariableDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberVariableDeclarationSyntax {
|
||||
return new MemberVariableDeclarationSyntax(parseNodeData,
|
||||
parseModifiers(),
|
||||
tryParseVariableDeclarator(/*allowIn:*/ true, /*allowPropertyName:*/ true), eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false));
|
||||
modifiers,
|
||||
new VariableDeclaratorSyntax(parseNodeData, propertyName,
|
||||
parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false),
|
||||
isEqualsValueClause(/*inParameter*/ false) ? parseEqualsValueClause(/*allowIn:*/ true) : undefined),
|
||||
eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false));
|
||||
}
|
||||
|
||||
function isIndexMemberDeclaration(modifierCount: number): boolean {
|
||||
@@ -1429,8 +1439,36 @@ module TypeScript.Parser {
|
||||
return isCallSignature(/*tokenIndex:*/ 0) ||
|
||||
isConstructSignature() ||
|
||||
isIndexSignature(/*tokenIndex:*/ 0) ||
|
||||
isMethodSignature(inErrorRecovery) ||
|
||||
isPropertySignature(inErrorRecovery);
|
||||
isMethodOrPropertySignature(inErrorRecovery);
|
||||
}
|
||||
|
||||
function isMethodOrPropertySignature(inErrorRecovery: boolean): boolean {
|
||||
var _currentToken = currentToken();
|
||||
|
||||
// Keywords can start properties. However, they're often intended to start something
|
||||
// else. If we see a modifier before something that can be a property, then don't
|
||||
// try parse it out as a property. For example, if we have:
|
||||
//
|
||||
// public foo
|
||||
//
|
||||
// Then don't parse 'public' as a property name. Note: if you have:
|
||||
//
|
||||
// public
|
||||
// foo
|
||||
//
|
||||
// Then we *should* parse it as a property name, as ASI takes effect here.
|
||||
if (isModifier(_currentToken, /*index:*/ 0)) {
|
||||
var token1 = peekToken(1);
|
||||
if (!existsNewLineBetweenTokens(_currentToken, token1, source.text) &&
|
||||
isPropertyNameToken(token1, inErrorRecovery)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Note: property names also start function signatures. So it's important that we call this
|
||||
// after we calll isFunctionSignature.
|
||||
return isPropertyName(/*peekIndex:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function tryParseTypeMember(inErrorRecovery: boolean): ITypeMemberSyntax {
|
||||
@@ -1449,13 +1487,16 @@ module TypeScript.Parser {
|
||||
else if (isIndexSignature(/*tokenIndex:*/ 0)) {
|
||||
return parseIndexSignature();
|
||||
}
|
||||
else if (isMethodSignature(inErrorRecovery)) {
|
||||
// Note: it is important that isFunctionSignature is called before isPropertySignature.
|
||||
// isPropertySignature checks for a subset of isFunctionSignature.
|
||||
return parseMethodSignature();
|
||||
}
|
||||
else if (isPropertySignature(inErrorRecovery)) {
|
||||
return parsePropertySignature();
|
||||
else if (isMethodOrPropertySignature(inErrorRecovery)) {
|
||||
var propertyName = parsePropertyName();
|
||||
var questionToken = tryEatToken(SyntaxKind.QuestionToken);
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseMethodSignature(propertyName, questionToken);
|
||||
}
|
||||
else {
|
||||
return parsePropertySignature(propertyName, questionToken);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
@@ -1477,14 +1518,14 @@ module TypeScript.Parser {
|
||||
openBracketToken, parameters, eatToken(SyntaxKind.CloseBracketToken), parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
}
|
||||
|
||||
function parseMethodSignature(): MethodSignatureSyntax {
|
||||
function parseMethodSignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): MethodSignatureSyntax {
|
||||
return new MethodSignatureSyntax(parseNodeData,
|
||||
eatPropertyName(), tryEatToken(SyntaxKind.QuestionToken), parseCallSignature(/*requireCompleteTypeParameterList:*/ false));
|
||||
propertyName, questionToken, parseCallSignature(/*requireCompleteTypeParameterList:*/ false));
|
||||
}
|
||||
|
||||
function parsePropertySignature(): PropertySignatureSyntax {
|
||||
function parsePropertySignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): PropertySignatureSyntax {
|
||||
return new PropertySignatureSyntax(parseNodeData,
|
||||
eatPropertyName(), tryEatToken(SyntaxKind.QuestionToken), parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
propertyName, questionToken, parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
}
|
||||
|
||||
function isCallSignature(peekIndex: number): boolean {
|
||||
@@ -1501,54 +1542,36 @@ module TypeScript.Parser {
|
||||
}
|
||||
|
||||
function isIndexSignature(peekIndex: number): boolean {
|
||||
return peekToken(peekIndex).kind === SyntaxKind.OpenBracketToken;
|
||||
}
|
||||
|
||||
function isMethodSignature(inErrorRecovery: boolean): boolean {
|
||||
if (isPropertyName(currentToken(), inErrorRecovery)) {
|
||||
// id(
|
||||
if (isCallSignature(1)) {
|
||||
// In order to be considered an index signature, we need to see at least:
|
||||
//
|
||||
// [a:
|
||||
// [...
|
||||
// [a,
|
||||
// [public a
|
||||
// []
|
||||
//
|
||||
// Otherwise, we will think that this is the start of a computed property name
|
||||
// for a function or variable.
|
||||
if (peekToken(peekIndex).kind === SyntaxKind.OpenBracketToken) {
|
||||
var token1 = peekToken(peekIndex + 1);
|
||||
if (token1.kind === SyntaxKind.DotDotDotToken || token1.kind === SyntaxKind.CloseBracketToken) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// id?(
|
||||
if (peekToken(1).kind === SyntaxKind.QuestionToken &&
|
||||
isCallSignature(2)) {
|
||||
return true;
|
||||
if (isIdentifier(token1)) {
|
||||
var token2 = peekToken(peekIndex + 2);
|
||||
if (token2.kind === SyntaxKind.ColonToken || token2.kind === SyntaxKind.CommaToken) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (token1.kind === SyntaxKind.PublicKeyword || token1.kind === SyntaxKind.PrivateKeyword) {
|
||||
var token2 = peekToken(peekIndex + 2);
|
||||
return isIdentifier(token2);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isPropertySignature(inErrorRecovery: boolean): boolean {
|
||||
var _currentToken = currentToken();
|
||||
|
||||
// Keywords can start properties. However, they're often intended to start something
|
||||
// else. If we see a modifier before something that can be a property, then don't
|
||||
// try parse it out as a property. For example, if we have:
|
||||
//
|
||||
// public foo
|
||||
//
|
||||
// Then don't parse 'public' as a property name. Note: if you have:
|
||||
//
|
||||
// public
|
||||
// foo
|
||||
//
|
||||
// Then we *should* parse it as a property name, as ASI takes effect here.
|
||||
if (isModifier(_currentToken, /*index:*/ 0)) {
|
||||
if (!existsNewLineBetweenTokens(_currentToken, peekToken(1), source.text) &&
|
||||
isPropertyName(peekToken(1), inErrorRecovery)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Note: property names also start function signatures. So it's important that we call this
|
||||
// after we calll isFunctionSignature.
|
||||
return isPropertyName(_currentToken, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isHeritageClause(): boolean {
|
||||
var tokenKind = currentToken().kind;
|
||||
return tokenKind === SyntaxKind.ExtendsKeyword || tokenKind === SyntaxKind.ImplementsKeyword;
|
||||
@@ -1986,7 +2009,17 @@ module TypeScript.Parser {
|
||||
|
||||
consumeToken(switchKeyword);
|
||||
var openParenToken = eatToken(SyntaxKind.OpenParenToken);
|
||||
var expression = parseExpression(/*allowIn:*/ true);
|
||||
var expression: IExpressionSyntax;
|
||||
|
||||
// if we have "switch {"
|
||||
// then don't try to consume the { as the start of an expression.
|
||||
if (openParenToken.fullWidth() === 0 && currentToken().kind === SyntaxKind.OpenBraceToken) {
|
||||
expression = eatIdentifierToken();
|
||||
}
|
||||
else {
|
||||
expression = parseExpression(/*allowIn:*/ true);
|
||||
}
|
||||
|
||||
var closeParenToken = eatToken(SyntaxKind.CloseParenToken);
|
||||
var openBraceToken = eatToken(SyntaxKind.OpenBraceToken);
|
||||
|
||||
@@ -2258,7 +2291,7 @@ module TypeScript.Parser {
|
||||
return variableDeclarator.equalsValueClause === undefined;
|
||||
}
|
||||
|
||||
function tryParseVariableDeclarator(allowIn: boolean, allowPropertyName: boolean): VariableDeclaratorSyntax {
|
||||
function tryParseVariableDeclarator(allowIn: boolean): VariableDeclaratorSyntax {
|
||||
// TODO(cyrusn): What if the 'allowIn' context has changed between when we last parsed
|
||||
// and now? We could end up with an incorrect tree. For example, say we had in the old
|
||||
// tree "var i = a in b". Then, in the new tree the declarator portion moved into:
|
||||
@@ -2271,19 +2304,15 @@ module TypeScript.Parser {
|
||||
return <VariableDeclaratorSyntax>node;
|
||||
}
|
||||
|
||||
if (allowPropertyName) {
|
||||
// Debug.assert(isPropertyName(currentToken(), /*inErrorRecovery:*/ false));
|
||||
}
|
||||
|
||||
if (!allowPropertyName && !isIdentifier(currentToken())) {
|
||||
if (!isIdentifier(currentToken())) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var propertyName = allowPropertyName ? eatPropertyName() : eatIdentifierToken();
|
||||
var propertyName = eatIdentifierToken();
|
||||
var equalsValueClause: EqualsValueClauseSyntax = undefined;
|
||||
var typeAnnotation: TypeAnnotationSyntax = undefined;
|
||||
|
||||
if (propertyName.fullWidth() > 0) {
|
||||
if (fullWidth(propertyName) > 0) {
|
||||
typeAnnotation = parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false);
|
||||
|
||||
if (isEqualsValueClause(/*inParameter*/ false)) {
|
||||
@@ -3309,51 +3338,73 @@ module TypeScript.Parser {
|
||||
if (isAccessor(modifierCount(), inErrorRecovery)) {
|
||||
return parseAccessor(/*checkForStrictMode:*/ true);
|
||||
}
|
||||
else if (isFunctionPropertyAssignment(inErrorRecovery)) {
|
||||
return parseFunctionPropertyAssignment();
|
||||
|
||||
// Note: we don't want to call parsePropertyName here yet as it will convert a keyword
|
||||
// to an identifier name. We don't want to do that yet as a keyword is not legal as a
|
||||
// shorthand property assignment.
|
||||
|
||||
var _currentToken = currentToken();
|
||||
if (isIdentifier(_currentToken)) {
|
||||
var token1 = peekToken(1);
|
||||
if (token1.kind !== SyntaxKind.ColonToken &&
|
||||
token1.kind !== SyntaxKind.OpenParenToken &&
|
||||
token1.kind !== SyntaxKind.LessThanToken) {
|
||||
|
||||
// If we don't have one of:
|
||||
//
|
||||
// id:
|
||||
// id(
|
||||
// id<
|
||||
//
|
||||
// then this is a shorthand property assignment. Just return the identifier
|
||||
// token as is.
|
||||
return consumeToken(_currentToken);
|
||||
}
|
||||
}
|
||||
else if (isSimplePropertyAssignment(inErrorRecovery)) {
|
||||
return parseSimplePropertyAssignment();
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
|
||||
// All the rest of the property assignments start with property names. They are:
|
||||
// id: e
|
||||
// [e1]: e2
|
||||
// id() { }
|
||||
// [e]() { }
|
||||
if (isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) {
|
||||
var propertyName = parsePropertyName();
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseFunctionPropertyAssignment(propertyName);
|
||||
}
|
||||
else {
|
||||
// If we didn't have an identifier, then we must have gotten a keyword or a
|
||||
// literal. Neither of these are allowed in a shorthand property, so this must
|
||||
// be a simple property assignment.
|
||||
//
|
||||
// Also, if we have an identifier and it is followed by a colon then this is
|
||||
// definitely a simple property assignment.
|
||||
return new SimplePropertyAssignmentSyntax(parseNodeData,
|
||||
propertyName, eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true));
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function isPropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isAccessor(modifierCount(), inErrorRecovery) ||
|
||||
isFunctionPropertyAssignment(inErrorRecovery) ||
|
||||
isSimplePropertyAssignment(inErrorRecovery);
|
||||
isPropertyName(/*peekIndex:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function eatPropertyName(): ISyntaxToken {
|
||||
var _currentToken = currentToken();
|
||||
return SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken)
|
||||
? eatIdentifierNameToken()
|
||||
: consumeToken(_currentToken);
|
||||
function isPropertyName(peekIndex: number, inErrorRecovery: boolean): boolean {
|
||||
var token = peekToken(peekIndex);
|
||||
if (token.kind === SyntaxKind.OpenBracketToken) {
|
||||
// A '[' only starts a property name as long as we're sure it doesn't start an
|
||||
// index signature.
|
||||
return !isIndexSignature(peekIndex);
|
||||
}
|
||||
|
||||
return isPropertyNameToken(token, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isFunctionPropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(currentToken(), inErrorRecovery) &&
|
||||
isCallSignature(/*peekIndex:*/ 1);
|
||||
}
|
||||
|
||||
function parseFunctionPropertyAssignment(): FunctionPropertyAssignmentSyntax {
|
||||
return new FunctionPropertyAssignmentSyntax(parseNodeData,
|
||||
eatPropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true));
|
||||
}
|
||||
|
||||
function isSimplePropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(currentToken(), inErrorRecovery);
|
||||
}
|
||||
|
||||
function parseSimplePropertyAssignment(): SimplePropertyAssignmentSyntax {
|
||||
return new SimplePropertyAssignmentSyntax(parseNodeData,
|
||||
eatPropertyName(), eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true));
|
||||
}
|
||||
|
||||
function isPropertyName(token: ISyntaxToken, inErrorRecovery: boolean): boolean {
|
||||
function isPropertyNameToken(token: ISyntaxToken, inErrorRecovery: boolean): boolean {
|
||||
// NOTE: we do *not* want to check "isIdentifier" here. Any IdentifierName is
|
||||
// allowed here, even reserved words like keywords.
|
||||
if (SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) {
|
||||
@@ -3372,12 +3423,42 @@ module TypeScript.Parser {
|
||||
}
|
||||
}
|
||||
|
||||
return isLiteralPropertyName(token);
|
||||
}
|
||||
|
||||
function isLiteralPropertyName(token: ISyntaxToken): boolean {
|
||||
// We allow a template literal while parser for error tolerance. We'll report errors
|
||||
// on this later in the grammar checker walker.
|
||||
var kind = token.kind;
|
||||
return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.NoSubstitutionTemplateToken;
|
||||
}
|
||||
|
||||
function parsePropertyName(): IPropertyNameSyntax {
|
||||
var _currentToken = currentToken();
|
||||
if (_currentToken.kind === SyntaxKind.OpenBracketToken) {
|
||||
return parseComputedPropertyName(_currentToken);
|
||||
}
|
||||
else if (SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken)) {
|
||||
// If it was a keyword, convert it to an identifier name.
|
||||
return eatIdentifierNameToken();
|
||||
}
|
||||
else {
|
||||
// Must have been a literal.
|
||||
return consumeToken(_currentToken);
|
||||
}
|
||||
}
|
||||
|
||||
function parseComputedPropertyName(openBracketToken: ISyntaxToken): ComputedPropertyNameSyntax {
|
||||
return new ComputedPropertyNameSyntax(parseNodeData,
|
||||
consumeToken(openBracketToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true), eatToken(SyntaxKind.CloseBracketToken));
|
||||
}
|
||||
|
||||
function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax {
|
||||
return new FunctionPropertyAssignmentSyntax(parseNodeData,
|
||||
propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true));
|
||||
}
|
||||
|
||||
function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax {
|
||||
// Debug.assert(currentToken().kind === SyntaxKind.OpenBracketToken);
|
||||
consumeToken(openBracketToken);
|
||||
@@ -4339,8 +4420,8 @@ module TypeScript.Parser {
|
||||
case ListParsingState.ObjectType_TypeMembers: return tryParseTypeMember(inErrorRecovery);
|
||||
case ListParsingState.ClassOrInterfaceDeclaration_HeritageClauses: return tryParseHeritageClause();
|
||||
case ListParsingState.HeritageClause_TypeNameList: return tryParseHeritageClauseTypeName();
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_AllowIn: return tryParseVariableDeclarator(/*allowIn:*/ true, /*allowIdentifierName:*/ false);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_DisallowIn: return tryParseVariableDeclarator(/*allowIn:*/ false, /*allowIdentifierName:*/ false);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_AllowIn: return tryParseVariableDeclarator(/*allowIn:*/ true);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_DisallowIn: return tryParseVariableDeclarator(/*allowIn:*/ false);
|
||||
case ListParsingState.ArgumentList_AssignmentExpressions: return tryParseArgumentListExpression();
|
||||
case ListParsingState.ObjectLiteralExpression_PropertyAssignments: return tryParsePropertyAssignment(inErrorRecovery);
|
||||
case ListParsingState.ArrayLiteralExpression_AssignmentExpressions: return tryParseAssignmentOrOmittedExpression();
|
||||
|
||||
@@ -353,7 +353,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendNode(node.equalsValueClause);
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
}
|
||||
@@ -592,7 +592,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.questionToken);
|
||||
this.appendNode(node.typeAnnotation);
|
||||
}
|
||||
@@ -684,7 +684,7 @@ module TypeScript.PrettyPrinter {
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
this.appendSpaceList(node.modifiers);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.appendBlockOrSemicolon(node.block, node.semicolonToken);
|
||||
}
|
||||
@@ -694,7 +694,7 @@ module TypeScript.PrettyPrinter {
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.getKeyword);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
@@ -705,7 +705,7 @@ module TypeScript.PrettyPrinter {
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.setKeyword);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature)
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
@@ -895,7 +895,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.ensureSpace();
|
||||
this.appendNode(node.equalsValueClause);
|
||||
}
|
||||
@@ -926,15 +926,21 @@ module TypeScript.PrettyPrinter {
|
||||
this.appendToken(node.closeBraceToken);
|
||||
}
|
||||
|
||||
public visitComputedPropertyName(node: ComputedPropertyNameSyntax): void {
|
||||
this.appendToken(node.openBracketToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
this.appendToken(node.closeBracketToken);
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.colonToken);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.expression);
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
|
||||
@@ -219,7 +219,7 @@ module TypeScript.Scanner {
|
||||
}
|
||||
|
||||
class FixedWidthTokenWithNoTrivia implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
@@ -254,7 +254,7 @@ module TypeScript.Scanner {
|
||||
FixedWidthTokenWithNoTrivia.prototype.childCount = 0;
|
||||
|
||||
class LargeScannerToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ module TypeScript {
|
||||
_memberDeclarationBrand: any;
|
||||
}
|
||||
|
||||
export interface IPropertyAssignmentSyntax extends ISyntaxNode {
|
||||
export interface IPropertyAssignmentSyntax extends ISyntaxNodeOrToken {
|
||||
_propertyAssignmentBrand: any;
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ module TypeScript {
|
||||
_accessorBrand: any;
|
||||
|
||||
modifiers: ISyntaxToken[];
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
@@ -504,4 +504,8 @@ module TypeScript {
|
||||
export interface INameSyntax extends ITypeSyntax {
|
||||
_nameBrand: any;
|
||||
}
|
||||
|
||||
export interface IPropertyNameSyntax extends ISyntaxNodeOrToken {
|
||||
_propertyNameBrand: any;
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ var definitions:ITypeDefinition[] = [
|
||||
name: 'VariableDeclaratorSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true },
|
||||
<any>{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
@@ -525,7 +525,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'questionToken', isToken: true, isOptional: true, itTypeScriptSpecific: true },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' }
|
||||
]
|
||||
@@ -547,7 +547,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'questionToken', isToken: true, isOptional: true },
|
||||
<any>{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true }
|
||||
],
|
||||
@@ -650,7 +650,7 @@ var definitions:ITypeDefinition[] = [
|
||||
interfaces: ['IMemberDeclarationSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken' },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax', isOptional: true },
|
||||
<any>{ name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true }
|
||||
@@ -664,7 +664,7 @@ var definitions:ITypeDefinition[] = [
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
<any>{ name: 'getKeyword', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
@@ -676,7 +676,7 @@ var definitions:ITypeDefinition[] = [
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
<any>{ name: 'setKeyword', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
],
|
||||
@@ -863,7 +863,7 @@ var definitions:ITypeDefinition[] = [
|
||||
name: 'EnumElementSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
},
|
||||
@@ -889,12 +889,22 @@ var definitions:ITypeDefinition[] = [
|
||||
<any>{ name: 'closeBraceToken', isToken: true, excludeFromAST: true }
|
||||
]
|
||||
},
|
||||
<any>{
|
||||
name: 'ComputedPropertyNameSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyNameSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'openBracketToken', isToken: true },
|
||||
<any>{ name: 'expression', type: 'IExpressionSyntax' },
|
||||
<any>{ name: 'closeBracketToken', isToken: true }
|
||||
]
|
||||
},
|
||||
<any>{
|
||||
name: 'SimplePropertyAssignmentSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'colonToken', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'expression', type: 'IExpressionSyntax' }
|
||||
]
|
||||
@@ -904,7 +914,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
|
||||
@@ -152,12 +152,12 @@ module TypeScript {
|
||||
|
||||
export interface MemberFunctionDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
semicolonToken: ISyntaxToken;
|
||||
}
|
||||
export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax }
|
||||
export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax }
|
||||
|
||||
export interface MemberVariableDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
@@ -185,27 +185,27 @@ module TypeScript {
|
||||
export interface GetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
getKeyword: ISyntaxToken;
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface GetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): GetAccessorSyntax }
|
||||
export interface GetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): GetAccessorSyntax }
|
||||
|
||||
export interface SetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
setKeyword: ISyntaxToken;
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface SetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): SetAccessorSyntax }
|
||||
export interface SetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): SetAccessorSyntax }
|
||||
|
||||
export interface PropertySignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
questionToken: ISyntaxToken;
|
||||
typeAnnotation: TypeAnnotationSyntax;
|
||||
}
|
||||
export interface PropertySignatureConstructor { new (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax }
|
||||
export interface PropertySignatureConstructor { new (data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax }
|
||||
|
||||
export interface CallSignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
typeParameterList: TypeParameterListSyntax;
|
||||
@@ -229,11 +229,11 @@ module TypeScript {
|
||||
export interface IndexSignatureConstructor { new (data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax }
|
||||
|
||||
export interface MethodSignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
questionToken: ISyntaxToken;
|
||||
callSignature: CallSignatureSyntax;
|
||||
}
|
||||
export interface MethodSignatureConstructor { new (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax }
|
||||
export interface MethodSignatureConstructor { new (data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax }
|
||||
|
||||
export interface BlockSyntax extends ISyntaxNode, IStatementSyntax {
|
||||
openBraceToken: ISyntaxToken;
|
||||
@@ -535,11 +535,11 @@ module TypeScript {
|
||||
export interface VariableDeclarationConstructor { new (data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>): VariableDeclarationSyntax }
|
||||
|
||||
export interface VariableDeclaratorSyntax extends ISyntaxNode {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
typeAnnotation: TypeAnnotationSyntax;
|
||||
equalsValueClause: EqualsValueClauseSyntax;
|
||||
}
|
||||
export interface VariableDeclaratorConstructor { new (data: number, propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax }
|
||||
export interface VariableDeclaratorConstructor { new (data: number, propertyName: IPropertyNameSyntax, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax }
|
||||
|
||||
export interface ArgumentListSyntax extends ISyntaxNode {
|
||||
typeArgumentList: TypeArgumentListSyntax;
|
||||
@@ -638,18 +638,18 @@ module TypeScript {
|
||||
export interface ConstraintConstructor { new (data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken): ConstraintSyntax }
|
||||
|
||||
export interface SimplePropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
colonToken: ISyntaxToken;
|
||||
expression: IExpressionSyntax;
|
||||
}
|
||||
export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax }
|
||||
export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax }
|
||||
|
||||
export interface FunctionPropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax }
|
||||
export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax }
|
||||
|
||||
export interface ParameterSyntax extends ISyntaxNode {
|
||||
dotDotDotToken: ISyntaxToken;
|
||||
@@ -662,10 +662,10 @@ module TypeScript {
|
||||
export interface ParameterConstructor { new (data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax }
|
||||
|
||||
export interface EnumElementSyntax extends ISyntaxNode {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
equalsValueClause: EqualsValueClauseSyntax;
|
||||
}
|
||||
export interface EnumElementConstructor { new (data: number, propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax }
|
||||
export interface EnumElementConstructor { new (data: number, propertyName: IPropertyNameSyntax, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax }
|
||||
|
||||
export interface TypeAnnotationSyntax extends ISyntaxNode {
|
||||
colonToken: ISyntaxToken;
|
||||
@@ -673,6 +673,13 @@ module TypeScript {
|
||||
}
|
||||
export interface TypeAnnotationConstructor { new (data: number, colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax }
|
||||
|
||||
export interface ComputedPropertyNameSyntax extends ISyntaxNode, IPropertyNameSyntax {
|
||||
openBracketToken: ISyntaxToken;
|
||||
expression: IExpressionSyntax;
|
||||
closeBracketToken: ISyntaxToken;
|
||||
}
|
||||
export interface ComputedPropertyNameConstructor { new (data: number, openBracketToken: ISyntaxToken, expression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ComputedPropertyNameSyntax }
|
||||
|
||||
export interface ExternalModuleReferenceSyntax extends ISyntaxNode, IModuleReferenceSyntax {
|
||||
requireKeyword: ISyntaxToken;
|
||||
openParenToken: ISyntaxToken;
|
||||
|
||||
@@ -261,14 +261,13 @@ module TypeScript {
|
||||
|
||||
// Property Assignment
|
||||
SimplePropertyAssignment,
|
||||
// GetAccessorPropertyAssignment,
|
||||
// SetAccessorPropertyAssignment,
|
||||
FunctionPropertyAssignment,
|
||||
|
||||
// Misc.
|
||||
Parameter,
|
||||
EnumElement,
|
||||
TypeAnnotation,
|
||||
ComputedPropertyName,
|
||||
ExternalModuleReference,
|
||||
ModuleNameModuleReference,
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///<reference path='references.ts' />
|
||||
|
||||
module TypeScript {
|
||||
export var SourceUnitSyntax: SourceUnitConstructor = <any>function (data: number, moduleElements: IModuleElementSyntax[], endOfFileToken: ISyntaxToken) {
|
||||
export var SourceUnitSyntax: SourceUnitConstructor = <any>function(data: number, moduleElements: IModuleElementSyntax[], endOfFileToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.moduleElements = moduleElements,
|
||||
this.endOfFileToken = endOfFileToken,
|
||||
@@ -17,7 +17,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var QualifiedNameSyntax: QualifiedNameConstructor = <any>function (data: number, left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken) {
|
||||
export var QualifiedNameSyntax: QualifiedNameConstructor = <any>function(data: number, left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.dotToken = dotToken,
|
||||
@@ -36,7 +36,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectTypeSyntax: ObjectTypeConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList<ITypeMemberSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var ObjectTypeSyntax: ObjectTypeConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList<ITypeMemberSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.typeMembers = typeMembers,
|
||||
@@ -55,7 +55,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionTypeSyntax: FunctionTypeConstructor = <any>function (data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var FunctionTypeSyntax: FunctionTypeConstructor = <any>function(data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeParameterList = typeParameterList,
|
||||
this.parameterList = parameterList,
|
||||
@@ -77,7 +77,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArrayTypeSyntax: ArrayTypeConstructor = <any>function (data: number, type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken) {
|
||||
export var ArrayTypeSyntax: ArrayTypeConstructor = <any>function(data: number, type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.type = type,
|
||||
this.openBracketToken = openBracketToken,
|
||||
@@ -96,7 +96,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructorTypeSyntax: ConstructorTypeConstructor = <any>function (data: number, newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var ConstructorTypeSyntax: ConstructorTypeConstructor = <any>function(data: number, newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.typeParameterList = typeParameterList,
|
||||
@@ -121,7 +121,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var GenericTypeSyntax: GenericTypeConstructor = <any>function (data: number, name: INameSyntax, typeArgumentList: TypeArgumentListSyntax) {
|
||||
export var GenericTypeSyntax: GenericTypeConstructor = <any>function(data: number, name: INameSyntax, typeArgumentList: TypeArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.name = name,
|
||||
this.typeArgumentList = typeArgumentList,
|
||||
@@ -137,7 +137,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeQuerySyntax: TypeQueryConstructor = <any>function (data: number, typeOfKeyword: ISyntaxToken, name: INameSyntax) {
|
||||
export var TypeQuerySyntax: TypeQueryConstructor = <any>function(data: number, typeOfKeyword: ISyntaxToken, name: INameSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeOfKeyword = typeOfKeyword,
|
||||
this.name = name,
|
||||
@@ -153,7 +153,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TupleTypeSyntax: TupleTypeConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, types: ISeparatedSyntaxList<ITypeSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
export var TupleTypeSyntax: TupleTypeConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, types: ISeparatedSyntaxList<ITypeSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.types = types,
|
||||
@@ -172,7 +172,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var UnionTypeSyntax: UnionTypeConstructor = <any>function (data: number, left: ITypeSyntax, barToken: ISyntaxToken, right: ITypeSyntax) {
|
||||
export var UnionTypeSyntax: UnionTypeConstructor = <any>function(data: number, left: ITypeSyntax, barToken: ISyntaxToken, right: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.barToken = barToken,
|
||||
@@ -191,7 +191,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedTypeSyntax: ParenthesizedTypeConstructor = <any>function (data: number, openParenToken: ISyntaxToken, type: ITypeSyntax, closeParenToken: ISyntaxToken) {
|
||||
export var ParenthesizedTypeSyntax: ParenthesizedTypeConstructor = <any>function(data: number, openParenToken: ISyntaxToken, type: ITypeSyntax, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.type = type,
|
||||
@@ -210,7 +210,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var InterfaceDeclarationSyntax: InterfaceDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], body: ObjectTypeSyntax) {
|
||||
export var InterfaceDeclarationSyntax: InterfaceDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], body: ObjectTypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.interfaceKeyword = interfaceKeyword,
|
||||
@@ -238,7 +238,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.functionKeyword = functionKeyword,
|
||||
@@ -266,7 +266,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ModuleDeclarationSyntax: ModuleDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: IModuleElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var ModuleDeclarationSyntax: ModuleDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: IModuleElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.moduleKeyword = moduleKeyword,
|
||||
@@ -297,7 +297,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ClassDeclarationSyntax: ClassDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], openBraceToken: ISyntaxToken, classElements: IClassElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var ClassDeclarationSyntax: ClassDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], openBraceToken: ISyntaxToken, classElements: IClassElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.classKeyword = classKeyword,
|
||||
@@ -331,7 +331,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EnumDeclarationSyntax: EnumDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList<EnumElementSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var EnumDeclarationSyntax: EnumDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList<EnumElementSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.enumKeyword = enumKeyword,
|
||||
@@ -359,7 +359,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ImportDeclarationSyntax: ImportDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ImportDeclarationSyntax: ImportDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.importKeyword = importKeyword,
|
||||
@@ -387,7 +387,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExportAssignmentSyntax: ExportAssignmentConstructor = <any>function (data: number, exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var ExportAssignmentSyntax: ExportAssignmentConstructor = <any>function(data: number, exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.exportKeyword = exportKeyword,
|
||||
this.equalsToken = equalsToken,
|
||||
@@ -409,7 +409,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.propertyName = propertyName,
|
||||
@@ -434,7 +434,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberVariableDeclarationSyntax: MemberVariableDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var MemberVariableDeclarationSyntax: MemberVariableDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.variableDeclarator = variableDeclarator,
|
||||
@@ -453,7 +453,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructorDeclarationSyntax: ConstructorDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ConstructorDeclarationSyntax: ConstructorDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.constructorKeyword = constructorKeyword,
|
||||
@@ -478,7 +478,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IndexMemberDeclarationSyntax: IndexMemberDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var IndexMemberDeclarationSyntax: IndexMemberDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.indexSignature = indexSignature,
|
||||
@@ -497,7 +497,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var GetAccessorSyntax: GetAccessorConstructor = <any>function (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var GetAccessorSyntax: GetAccessorConstructor = <any>function(data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.getKeyword = getKeyword,
|
||||
@@ -522,7 +522,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SetAccessorSyntax: SetAccessorConstructor = <any>function (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var SetAccessorSyntax: SetAccessorConstructor = <any>function(data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.setKeyword = setKeyword,
|
||||
@@ -547,7 +547,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PropertySignatureSyntax: PropertySignatureConstructor = <any>function (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var PropertySignatureSyntax: PropertySignatureConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.questionToken = questionToken,
|
||||
@@ -566,7 +566,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CallSignatureSyntax: CallSignatureConstructor = <any>function (data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var CallSignatureSyntax: CallSignatureConstructor = <any>function(data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeParameterList = typeParameterList,
|
||||
this.parameterList = parameterList,
|
||||
@@ -585,7 +585,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructSignatureSyntax: ConstructSignatureConstructor = <any>function (data: number, newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
export var ConstructSignatureSyntax: ConstructSignatureConstructor = <any>function(data: number, newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.callSignature = callSignature,
|
||||
@@ -601,7 +601,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IndexSignatureSyntax: IndexSignatureConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var IndexSignatureSyntax: IndexSignatureConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.parameters = parameters,
|
||||
@@ -623,7 +623,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MethodSignatureSyntax: MethodSignatureConstructor = <any>function (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
export var MethodSignatureSyntax: MethodSignatureConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.questionToken = questionToken,
|
||||
@@ -642,7 +642,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BlockSyntax: BlockConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, statements: IStatementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var BlockSyntax: BlockConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, statements: IStatementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.statements = statements,
|
||||
@@ -661,7 +661,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IfStatementSyntax: IfStatementConstructor = <any>function (data: number, ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax) {
|
||||
export var IfStatementSyntax: IfStatementConstructor = <any>function(data: number, ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.ifKeyword = ifKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -689,7 +689,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableStatementSyntax: VariableStatementConstructor = <any>function (data: number, modifiers: ISyntaxToken[], variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var VariableStatementSyntax: VariableStatementConstructor = <any>function(data: number, modifiers: ISyntaxToken[], variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.variableDeclaration = variableDeclaration,
|
||||
@@ -708,7 +708,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExpressionStatementSyntax: ExpressionStatementConstructor = <any>function (data: number, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ExpressionStatementSyntax: ExpressionStatementConstructor = <any>function(data: number, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.semicolonToken = semicolonToken,
|
||||
@@ -724,7 +724,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ReturnStatementSyntax: ReturnStatementConstructor = <any>function (data: number, returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ReturnStatementSyntax: ReturnStatementConstructor = <any>function(data: number, returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.returnKeyword = returnKeyword,
|
||||
this.expression = expression,
|
||||
@@ -743,7 +743,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SwitchStatementSyntax: SwitchStatementConstructor = <any>function (data: number, switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISwitchClauseSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var SwitchStatementSyntax: SwitchStatementConstructor = <any>function(data: number, switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISwitchClauseSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.switchKeyword = switchKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -774,7 +774,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BreakStatementSyntax: BreakStatementConstructor = <any>function (data: number, breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var BreakStatementSyntax: BreakStatementConstructor = <any>function(data: number, breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.breakKeyword = breakKeyword,
|
||||
this.identifier = identifier,
|
||||
@@ -793,7 +793,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ContinueStatementSyntax: ContinueStatementConstructor = <any>function (data: number, continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var ContinueStatementSyntax: ContinueStatementConstructor = <any>function(data: number, continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.continueKeyword = continueKeyword,
|
||||
this.identifier = identifier,
|
||||
@@ -812,7 +812,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ForStatementSyntax: ForStatementConstructor = <any>function (data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ForStatementSyntax: ForStatementConstructor = <any>function(data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.forKeyword = forKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -852,7 +852,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ForInStatementSyntax: ForInStatementConstructor = <any>function (data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ForInStatementSyntax: ForInStatementConstructor = <any>function(data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.forKeyword = forKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -886,7 +886,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EmptyStatementSyntax: EmptyStatementConstructor = <any>function (data: number, semicolonToken: ISyntaxToken) {
|
||||
export var EmptyStatementSyntax: EmptyStatementConstructor = <any>function(data: number, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.semicolonToken = semicolonToken,
|
||||
semicolonToken.parent = this;
|
||||
@@ -899,7 +899,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ThrowStatementSyntax: ThrowStatementConstructor = <any>function (data: number, throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ThrowStatementSyntax: ThrowStatementConstructor = <any>function(data: number, throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.throwKeyword = throwKeyword,
|
||||
this.expression = expression,
|
||||
@@ -918,7 +918,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var WhileStatementSyntax: WhileStatementConstructor = <any>function (data: number, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var WhileStatementSyntax: WhileStatementConstructor = <any>function(data: number, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.whileKeyword = whileKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -943,7 +943,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TryStatementSyntax: TryStatementConstructor = <any>function (data: number, tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax) {
|
||||
export var TryStatementSyntax: TryStatementConstructor = <any>function(data: number, tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.tryKeyword = tryKeyword,
|
||||
this.block = block,
|
||||
@@ -965,7 +965,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var LabeledStatementSyntax: LabeledStatementConstructor = <any>function (data: number, identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var LabeledStatementSyntax: LabeledStatementConstructor = <any>function(data: number, identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.identifier = identifier,
|
||||
this.colonToken = colonToken,
|
||||
@@ -984,7 +984,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DoStatementSyntax: DoStatementConstructor = <any>function (data: number, doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var DoStatementSyntax: DoStatementConstructor = <any>function(data: number, doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.doKeyword = doKeyword,
|
||||
this.statement = statement,
|
||||
@@ -1015,7 +1015,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DebuggerStatementSyntax: DebuggerStatementConstructor = <any>function (data: number, debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var DebuggerStatementSyntax: DebuggerStatementConstructor = <any>function(data: number, debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.debuggerKeyword = debuggerKeyword,
|
||||
this.semicolonToken = semicolonToken,
|
||||
@@ -1031,7 +1031,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var WithStatementSyntax: WithStatementConstructor = <any>function (data: number, withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var WithStatementSyntax: WithStatementConstructor = <any>function(data: number, withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.withKeyword = withKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -1056,7 +1056,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PrefixUnaryExpressionSyntax: PrefixUnaryExpressionConstructor = <any>function (data: number, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax) {
|
||||
export var PrefixUnaryExpressionSyntax: PrefixUnaryExpressionConstructor = <any>function(data: number, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.operatorToken = operatorToken,
|
||||
this.operand = operand,
|
||||
@@ -1072,7 +1072,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DeleteExpressionSyntax: DeleteExpressionConstructor = <any>function (data: number, deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var DeleteExpressionSyntax: DeleteExpressionConstructor = <any>function(data: number, deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.deleteKeyword = deleteKeyword,
|
||||
this.expression = expression,
|
||||
@@ -1088,7 +1088,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeOfExpressionSyntax: TypeOfExpressionConstructor = <any>function (data: number, typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var TypeOfExpressionSyntax: TypeOfExpressionConstructor = <any>function(data: number, typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeOfKeyword = typeOfKeyword,
|
||||
this.expression = expression,
|
||||
@@ -1104,7 +1104,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VoidExpressionSyntax: VoidExpressionConstructor = <any>function (data: number, voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var VoidExpressionSyntax: VoidExpressionConstructor = <any>function(data: number, voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.voidKeyword = voidKeyword,
|
||||
this.expression = expression,
|
||||
@@ -1120,7 +1120,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConditionalExpressionSyntax: ConditionalExpressionConstructor = <any>function (data: number, condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax) {
|
||||
export var ConditionalExpressionSyntax: ConditionalExpressionConstructor = <any>function(data: number, condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.condition = condition,
|
||||
this.questionToken = questionToken,
|
||||
@@ -1145,7 +1145,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BinaryExpressionSyntax: BinaryExpressionConstructor = <any>function (data: number, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax) {
|
||||
export var BinaryExpressionSyntax: BinaryExpressionConstructor = <any>function(data: number, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.operatorToken = operatorToken,
|
||||
@@ -1164,7 +1164,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PostfixUnaryExpressionSyntax: PostfixUnaryExpressionConstructor = <any>function (data: number, operand: ILeftHandSideExpressionSyntax, operatorToken: ISyntaxToken) {
|
||||
export var PostfixUnaryExpressionSyntax: PostfixUnaryExpressionConstructor = <any>function(data: number, operand: ILeftHandSideExpressionSyntax, operatorToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.operand = operand,
|
||||
this.operatorToken = operatorToken,
|
||||
@@ -1180,7 +1180,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberAccessExpressionSyntax: MemberAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken) {
|
||||
export var MemberAccessExpressionSyntax: MemberAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.dotToken = dotToken,
|
||||
@@ -1199,7 +1199,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var InvocationExpressionSyntax: InvocationExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
export var InvocationExpressionSyntax: InvocationExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.argumentList = argumentList,
|
||||
@@ -1215,7 +1215,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArrayLiteralExpressionSyntax: ArrayLiteralExpressionConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList<IExpressionSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
export var ArrayLiteralExpressionSyntax: ArrayLiteralExpressionConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList<IExpressionSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.expressions = expressions,
|
||||
@@ -1234,7 +1234,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectLiteralExpressionSyntax: ObjectLiteralExpressionConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList<IPropertyAssignmentSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var ObjectLiteralExpressionSyntax: ObjectLiteralExpressionConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList<IPropertyAssignmentSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.propertyAssignments = propertyAssignments,
|
||||
@@ -1253,7 +1253,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectCreationExpressionSyntax: ObjectCreationExpressionConstructor = <any>function (data: number, newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
export var ObjectCreationExpressionSyntax: ObjectCreationExpressionConstructor = <any>function(data: number, newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.expression = expression,
|
||||
@@ -1272,7 +1272,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedExpressionSyntax: ParenthesizedExpressionConstructor = <any>function (data: number, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken) {
|
||||
export var ParenthesizedExpressionSyntax: ParenthesizedExpressionConstructor = <any>function(data: number, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.expression = expression,
|
||||
@@ -1291,7 +1291,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedArrowFunctionExpressionSyntax: ParenthesizedArrowFunctionExpressionConstructor = <any>function (data: number, callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
export var ParenthesizedArrowFunctionExpressionSyntax: ParenthesizedArrowFunctionExpressionConstructor = <any>function(data: number, callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.callSignature = callSignature,
|
||||
this.equalsGreaterThanToken = equalsGreaterThanToken,
|
||||
@@ -1313,7 +1313,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SimpleArrowFunctionExpressionSyntax: SimpleArrowFunctionExpressionConstructor = <any>function (data: number, parameter: ParameterSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
export var SimpleArrowFunctionExpressionSyntax: SimpleArrowFunctionExpressionConstructor = <any>function(data: number, parameter: ParameterSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.parameter = parameter,
|
||||
this.equalsGreaterThanToken = equalsGreaterThanToken,
|
||||
@@ -1335,7 +1335,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CastExpressionSyntax: CastExpressionConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var CastExpressionSyntax: CastExpressionConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.type = type,
|
||||
@@ -1357,7 +1357,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ElementAccessExpressionSyntax: ElementAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
export var ElementAccessExpressionSyntax: ElementAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.openBracketToken = openBracketToken,
|
||||
@@ -1379,7 +1379,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionExpressionSyntax: FunctionExpressionConstructor = <any>function (data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var FunctionExpressionSyntax: FunctionExpressionConstructor = <any>function(data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.functionKeyword = functionKeyword,
|
||||
this.identifier = identifier,
|
||||
@@ -1401,7 +1401,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var OmittedExpressionSyntax: OmittedExpressionConstructor = <any>function (data: number) {
|
||||
export var OmittedExpressionSyntax: OmittedExpressionConstructor = <any>function(data: number) {
|
||||
if (data) { this.__data = data; }
|
||||
};
|
||||
OmittedExpressionSyntax.prototype.kind = SyntaxKind.OmittedExpression;
|
||||
@@ -1410,7 +1410,7 @@ module TypeScript {
|
||||
throw Errors.invalidOperation();
|
||||
}
|
||||
|
||||
export var TemplateExpressionSyntax: TemplateExpressionConstructor = <any>function (data: number, templateStartToken: ISyntaxToken, templateClauses: TemplateClauseSyntax[]) {
|
||||
export var TemplateExpressionSyntax: TemplateExpressionConstructor = <any>function(data: number, templateStartToken: ISyntaxToken, templateClauses: TemplateClauseSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.templateStartToken = templateStartToken,
|
||||
this.templateClauses = templateClauses,
|
||||
@@ -1426,7 +1426,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TemplateAccessExpressionSyntax: TemplateAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax) {
|
||||
export var TemplateAccessExpressionSyntax: TemplateAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.templateExpression = templateExpression,
|
||||
@@ -1442,7 +1442,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableDeclarationSyntax: VariableDeclarationConstructor = <any>function (data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>) {
|
||||
export var VariableDeclarationSyntax: VariableDeclarationConstructor = <any>function(data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>) {
|
||||
if (data) { this.__data = data; }
|
||||
this.varKeyword = varKeyword,
|
||||
this.variableDeclarators = variableDeclarators,
|
||||
@@ -1458,7 +1458,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableDeclaratorSyntax: VariableDeclaratorConstructor = <any>function (data: number, propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var VariableDeclaratorSyntax: VariableDeclaratorConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.typeAnnotation = typeAnnotation,
|
||||
@@ -1477,7 +1477,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArgumentListSyntax: ArgumentListConstructor = <any>function (data: number, typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList<IExpressionSyntax>, closeParenToken: ISyntaxToken) {
|
||||
export var ArgumentListSyntax: ArgumentListConstructor = <any>function(data: number, typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList<IExpressionSyntax>, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeArgumentList = typeArgumentList,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -1499,7 +1499,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParameterListSyntax: ParameterListConstructor = <any>function (data: number, openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeParenToken: ISyntaxToken) {
|
||||
export var ParameterListSyntax: ParameterListConstructor = <any>function(data: number, openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.parameters = parameters,
|
||||
@@ -1518,7 +1518,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeArgumentListSyntax: TypeArgumentListConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList<ITypeSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
export var TypeArgumentListSyntax: TypeArgumentListConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList<ITypeSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.typeArguments = typeArguments,
|
||||
@@ -1537,7 +1537,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeParameterListSyntax: TypeParameterListConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList<TypeParameterSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
export var TypeParameterListSyntax: TypeParameterListConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList<TypeParameterSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.typeParameters = typeParameters,
|
||||
@@ -1556,7 +1556,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var HeritageClauseSyntax: HeritageClauseConstructor = <any>function (data: number, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList<INameSyntax>) {
|
||||
export var HeritageClauseSyntax: HeritageClauseConstructor = <any>function(data: number, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList<INameSyntax>) {
|
||||
if (data) { this.__data = data; }
|
||||
this.extendsOrImplementsKeyword = extendsOrImplementsKeyword,
|
||||
this.typeNames = typeNames,
|
||||
@@ -1572,7 +1572,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EqualsValueClauseSyntax: EqualsValueClauseConstructor = <any>function (data: number, equalsToken: ISyntaxToken, value: IExpressionSyntax) {
|
||||
export var EqualsValueClauseSyntax: EqualsValueClauseConstructor = <any>function(data: number, equalsToken: ISyntaxToken, value: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.equalsToken = equalsToken,
|
||||
this.value = value,
|
||||
@@ -1588,7 +1588,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CaseSwitchClauseSyntax: CaseSwitchClauseConstructor = <any>function (data: number, caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
export var CaseSwitchClauseSyntax: CaseSwitchClauseConstructor = <any>function(data: number, caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.caseKeyword = caseKeyword,
|
||||
this.expression = expression,
|
||||
@@ -1610,7 +1610,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DefaultSwitchClauseSyntax: DefaultSwitchClauseConstructor = <any>function (data: number, defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
export var DefaultSwitchClauseSyntax: DefaultSwitchClauseConstructor = <any>function(data: number, defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.defaultKeyword = defaultKeyword,
|
||||
this.colonToken = colonToken,
|
||||
@@ -1629,7 +1629,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ElseClauseSyntax: ElseClauseConstructor = <any>function (data: number, elseKeyword: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ElseClauseSyntax: ElseClauseConstructor = <any>function(data: number, elseKeyword: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.elseKeyword = elseKeyword,
|
||||
this.statement = statement,
|
||||
@@ -1645,7 +1645,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CatchClauseSyntax: CatchClauseConstructor = <any>function (data: number, catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax) {
|
||||
export var CatchClauseSyntax: CatchClauseConstructor = <any>function(data: number, catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.catchKeyword = catchKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -1673,7 +1673,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FinallyClauseSyntax: FinallyClauseConstructor = <any>function (data: number, finallyKeyword: ISyntaxToken, block: BlockSyntax) {
|
||||
export var FinallyClauseSyntax: FinallyClauseConstructor = <any>function(data: number, finallyKeyword: ISyntaxToken, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.finallyKeyword = finallyKeyword,
|
||||
this.block = block,
|
||||
@@ -1689,7 +1689,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TemplateClauseSyntax: TemplateClauseConstructor = <any>function (data: number, expression: IExpressionSyntax, templateMiddleOrEndToken: ISyntaxToken) {
|
||||
export var TemplateClauseSyntax: TemplateClauseConstructor = <any>function(data: number, expression: IExpressionSyntax, templateMiddleOrEndToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.templateMiddleOrEndToken = templateMiddleOrEndToken,
|
||||
@@ -1705,7 +1705,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeParameterSyntax: TypeParameterConstructor = <any>function (data: number, identifier: ISyntaxToken, constraint: ConstraintSyntax) {
|
||||
export var TypeParameterSyntax: TypeParameterConstructor = <any>function(data: number, identifier: ISyntaxToken, constraint: ConstraintSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.identifier = identifier,
|
||||
this.constraint = constraint,
|
||||
@@ -1721,7 +1721,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstraintSyntax: ConstraintConstructor = <any>function (data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken) {
|
||||
export var ConstraintSyntax: ConstraintConstructor = <any>function(data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.extendsKeyword = extendsKeyword,
|
||||
this.typeOrExpression = typeOrExpression,
|
||||
@@ -1737,7 +1737,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SimplePropertyAssignmentSyntax: SimplePropertyAssignmentConstructor = <any>function (data: number, propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax) {
|
||||
export var SimplePropertyAssignmentSyntax: SimplePropertyAssignmentConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.colonToken = colonToken,
|
||||
@@ -1756,7 +1756,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = <any>function (data: number, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.callSignature = callSignature,
|
||||
@@ -1775,7 +1775,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParameterSyntax: ParameterConstructor = <any>function (data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var ParameterSyntax: ParameterConstructor = <any>function(data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.dotDotDotToken = dotDotDotToken,
|
||||
this.modifiers = modifiers,
|
||||
@@ -1803,7 +1803,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EnumElementSyntax: EnumElementConstructor = <any>function (data: number, propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var EnumElementSyntax: EnumElementConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.equalsValueClause = equalsValueClause,
|
||||
@@ -1819,7 +1819,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeAnnotationSyntax: TypeAnnotationConstructor = <any>function (data: number, colonToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var TypeAnnotationSyntax: TypeAnnotationConstructor = <any>function(data: number, colonToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.colonToken = colonToken,
|
||||
this.type = type,
|
||||
@@ -1835,7 +1835,26 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExternalModuleReferenceSyntax: ExternalModuleReferenceConstructor = <any>function (data: number, requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken) {
|
||||
export var ComputedPropertyNameSyntax: ComputedPropertyNameConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, expression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.expression = expression,
|
||||
this.closeBracketToken = closeBracketToken,
|
||||
openBracketToken.parent = this,
|
||||
expression.parent = this,
|
||||
closeBracketToken.parent = this;
|
||||
};
|
||||
ComputedPropertyNameSyntax.prototype.kind = SyntaxKind.ComputedPropertyName;
|
||||
ComputedPropertyNameSyntax.prototype.childCount = 3;
|
||||
ComputedPropertyNameSyntax.prototype.childAt = function(index: number): ISyntaxElement {
|
||||
switch (index) {
|
||||
case 0: return this.openBracketToken;
|
||||
case 1: return this.expression;
|
||||
case 2: return this.closeBracketToken;
|
||||
}
|
||||
}
|
||||
|
||||
export var ExternalModuleReferenceSyntax: ExternalModuleReferenceConstructor = <any>function(data: number, requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.requireKeyword = requireKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@@ -1857,7 +1876,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ModuleNameModuleReferenceSyntax: ModuleNameModuleReferenceConstructor = <any>function (data: number, moduleName: INameSyntax) {
|
||||
export var ModuleNameModuleReferenceSyntax: ModuleNameModuleReferenceConstructor = <any>function(data: number, moduleName: INameSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.moduleName = moduleName,
|
||||
moduleName.parent = this;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///<reference path='references.ts' />
|
||||
|
||||
module TypeScript {
|
||||
export interface ISyntaxToken extends ISyntaxNodeOrToken, INameSyntax, IPrimaryExpressionSyntax {
|
||||
export interface ISyntaxToken extends ISyntaxNodeOrToken, INameSyntax, IPrimaryExpressionSyntax, IPropertyAssignmentSyntax, IPropertyNameSyntax {
|
||||
// Adjusts the full start of this token. Should only be called by the parser.
|
||||
setFullStart(fullStart: number): void;
|
||||
|
||||
@@ -304,7 +304,8 @@ module TypeScript.Syntax {
|
||||
}
|
||||
|
||||
class EmptyToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
@@ -418,7 +419,7 @@ module TypeScript.Syntax {
|
||||
EmptyToken.prototype.childCount = 0;
|
||||
|
||||
class RealizedToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
private _fullStart: number;
|
||||
private _isKeywordConvertedToIdentifier: boolean;
|
||||
@@ -430,11 +431,11 @@ module TypeScript.Syntax {
|
||||
public childCount: number;
|
||||
|
||||
constructor(fullStart: number,
|
||||
public kind: SyntaxKind,
|
||||
isKeywordConvertedToIdentifier: boolean,
|
||||
leadingTrivia: ISyntaxTriviaList,
|
||||
text: string,
|
||||
trailingTrivia: ISyntaxTriviaList) {
|
||||
public kind: SyntaxKind,
|
||||
isKeywordConvertedToIdentifier: boolean,
|
||||
leadingTrivia: ISyntaxTriviaList,
|
||||
text: string,
|
||||
trailingTrivia: ISyntaxTriviaList) {
|
||||
this._fullStart = fullStart;
|
||||
this._isKeywordConvertedToIdentifier = isKeywordConvertedToIdentifier;
|
||||
this._text = text;
|
||||
@@ -491,7 +492,7 @@ module TypeScript.Syntax {
|
||||
RealizedToken.prototype.childCount = 0;
|
||||
|
||||
class ConvertedKeywordToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
public parent: ISyntaxElement;
|
||||
public kind: SyntaxKind;
|
||||
|
||||
@@ -556,7 +556,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -564,7 +565,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -573,7 +575,7 @@ module TypeScript {
|
||||
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
if (this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -624,12 +626,12 @@ module TypeScript {
|
||||
|
||||
public visitGetAccessor(node: GetAccessorSyntax): void {
|
||||
if (this.checkForAccessorDeclarationInAmbientContext(node) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.propertyName, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.getKeyword, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkForDisallowedModifiers(node.modifiers) ||
|
||||
this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForDisallowedAccessorTypeParameters(node.callSignature) ||
|
||||
this.checkGetAccessorParameter(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -691,7 +693,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -700,13 +702,13 @@ module TypeScript {
|
||||
|
||||
public visitSetAccessor(node: SetAccessorSyntax): void {
|
||||
if (this.checkForAccessorDeclarationInAmbientContext(node) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.propertyName, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.setKeyword, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkForDisallowedModifiers(node.modifiers) ||
|
||||
this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForDisallowedAccessorTypeParameters(node.callSignature) ||
|
||||
this.checkForDisallowedSetAccessorTypeAnnotation(node) ||
|
||||
this.checkSetAccessorParameter(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -747,7 +749,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1338,7 +1341,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1410,16 +1413,25 @@ module TypeScript {
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
if (this.checkVariableDeclaratorInitializer(node) ||
|
||||
this.checkVariableDeclaratorIdentifier(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.visitVariableDeclarator(node);
|
||||
}
|
||||
|
||||
private checkForTemplatePropertyName(token: ISyntaxToken): boolean {
|
||||
if (token.kind === SyntaxKind.NoSubstitutionTemplateToken) {
|
||||
this.pushDiagnostic(token, DiagnosticCode.Template_literal_cannot_be_used_as_an_element_name);
|
||||
private checkForDisallowedTemplatePropertyName(propertyName: IPropertyNameSyntax): boolean {
|
||||
if (propertyName.kind === SyntaxKind.NoSubstitutionTemplateToken) {
|
||||
this.pushDiagnostic(propertyName, DiagnosticCode.Template_literal_cannot_be_used_as_an_element_name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private checkForDisallowedComputedPropertyName(propertyName: IPropertyNameSyntax): boolean {
|
||||
if (propertyName.kind === SyntaxKind.ComputedPropertyName) {
|
||||
this.pushDiagnostic(propertyName, DiagnosticCode.Computed_property_names_cannot_be_used_here);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1428,7 +1440,8 @@ module TypeScript {
|
||||
|
||||
private checkVariableDeclaratorIdentifier(node: VariableDeclaratorSyntax): boolean {
|
||||
if (node.parent.kind !== SyntaxKind.MemberVariableDeclaration) {
|
||||
if (this.checkForDisallowedEvalOrArguments(node, node.propertyName)) {
|
||||
Debug.assert(isToken(node.propertyName), "A normal variable declarator must always have a token for a name.");
|
||||
if (this.checkForDisallowedEvalOrArguments(node, <ISyntaxToken>node.propertyName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ module TypeScript {
|
||||
case SyntaxKind.Parameter: return visitor.visitParameter(<ParameterSyntax>element);
|
||||
case SyntaxKind.EnumElement: return visitor.visitEnumElement(<EnumElementSyntax>element);
|
||||
case SyntaxKind.TypeAnnotation: return visitor.visitTypeAnnotation(<TypeAnnotationSyntax>element);
|
||||
case SyntaxKind.ComputedPropertyName: return visitor.visitComputedPropertyName(<ComputedPropertyNameSyntax>element);
|
||||
case SyntaxKind.ExternalModuleReference: return visitor.visitExternalModuleReference(<ExternalModuleReferenceSyntax>element);
|
||||
case SyntaxKind.ModuleNameModuleReference: return visitor.visitModuleNameModuleReference(<ModuleNameModuleReferenceSyntax>element);
|
||||
default: return visitor.visitToken(<ISyntaxToken>element);
|
||||
@@ -190,6 +191,7 @@ module TypeScript {
|
||||
visitParameter(node: ParameterSyntax): any;
|
||||
visitEnumElement(node: EnumElementSyntax): any;
|
||||
visitTypeAnnotation(node: TypeAnnotationSyntax): any;
|
||||
visitComputedPropertyName(node: ComputedPropertyNameSyntax): any;
|
||||
visitExternalModuleReference(node: ExternalModuleReferenceSyntax): any;
|
||||
visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): any;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ module TypeScript {
|
||||
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
this.visitOptionalToken(node.semicolonToken);
|
||||
@@ -180,7 +180,7 @@ module TypeScript {
|
||||
public visitGetAccessor(node: GetAccessorSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.getKeyword);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
@@ -188,13 +188,13 @@ module TypeScript {
|
||||
public visitSetAccessor(node: SetAccessorSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.setKeyword);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitOptionalToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.typeAnnotation);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitOptionalToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
}
|
||||
@@ -483,7 +483,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.typeAnnotation);
|
||||
visitNodeOrToken(this, node.equalsValueClause);
|
||||
}
|
||||
@@ -571,13 +571,13 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitToken(node.colonToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
@@ -592,7 +592,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.equalsValueClause);
|
||||
}
|
||||
|
||||
@@ -601,6 +601,12 @@ module TypeScript {
|
||||
visitNodeOrToken(this, node.type);
|
||||
}
|
||||
|
||||
public visitComputedPropertyName(node: ComputedPropertyNameSyntax): void {
|
||||
this.visitToken(node.openBracketToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
this.visitToken(node.closeBracketToken);
|
||||
}
|
||||
|
||||
public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): void {
|
||||
this.visitToken(node.requireKeyword);
|
||||
this.visitToken(node.openParenToken);
|
||||
|
||||
@@ -6,10 +6,10 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(8,16): error TS10
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,55): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,54): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,55): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,54): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (12 errors) ====
|
||||
@@ -21,13 +21,13 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
public get AnnotatedSetter_SetterLast() { return ""; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
public set AnnotatedSetter_SetterLast(a: number) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
@@ -39,13 +39,13 @@ tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
public set AnnotatedGetter_GetterLast(aStr) { aStr = 0; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
public get AnnotatedGetter_GetterLast(): string { return ""; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: 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'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/aliasAssignments_1.ts (2 errors) ====
|
||||
@@ -8,12 +8,12 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tes
|
||||
var x = moduleA;
|
||||
x = 1; // Should be error
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2323: Property 'someClass' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2322: Property 'someClass' is missing in type 'Number'.
|
||||
var y = 1;
|
||||
y = moduleA; // should be error
|
||||
~
|
||||
!!! error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ====
|
||||
export class someClass {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambiguousOverload.ts (2 errors) ====
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is
|
||||
var x: number = foof("s", null);
|
||||
var y: string = foof("s", null);
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
function foof2(bar: string, x): string;
|
||||
function foof2(bar: string, y): number;
|
||||
@@ -17,4 +17,4 @@ tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2323: Type 'string' is
|
||||
var x2: string = foof2("s", null);
|
||||
var y2: number = foof2("s", null);
|
||||
~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: 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 TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
}
|
||||
@@ -1,46 +1,46 @@
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
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'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
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'.
|
||||
Property 'C1M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
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'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
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'.
|
||||
Property 'C2M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
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'.
|
||||
Property 'C2M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
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'.
|
||||
Property 'C2M1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2323: Type 'C2[]' is not assignable to 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(76,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
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(77,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
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(79,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: 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 TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -92,20 +92,20 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is n
|
||||
|
||||
var i1_error: I1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c1_error: C1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c2_error: C2 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
var c3_error: C3 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
|
||||
|
||||
arr_any = arr_i1; // should be ok - is
|
||||
@@ -118,78 +118,78 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is n
|
||||
arr_i1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_i1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
arr_c1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
arr_c2 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c2 = arr_c1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
arr_c2 = arr_i1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
arr_c2 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
// "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 TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
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'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
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'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
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'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: 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 TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: 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 TS2323: Type 'I1' is n
|
||||
// "clean up error" occurs at this point
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: 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 TS2323: Type 'C3' is n
|
||||
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
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'.
|
||||
Property 'state' is missing in type 'IToken'.
|
||||
|
||||
@@ -28,9 +28,9 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[
|
||||
var lineTokens:ILineTokens= this.tokenize(line, state, true);
|
||||
var tokens:IStateToken[]= lineTokens.tokens;
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
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,7 +1,7 @@
|
||||
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 TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -29,17 +29,17 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]'
|
||||
var myVar: myInt;
|
||||
var strArray: string[] = [myVar.voidFn()];
|
||||
~~~~~~~~
|
||||
!!! error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
var myArray: number[][][];
|
||||
myArray = [[1, 2]];
|
||||
~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
function isEmpty(l: { length: number }) {
|
||||
return l.length === 0;
|
||||
|
||||
@@ -2,9 +2,9 @@ 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 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[]; }'.
|
||||
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[]; }'.
|
||||
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[]; }'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,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 errors) ====
|
||||
@@ -19,12 +19,12 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
var xs4: typeof Array<typeof x>;
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! 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 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[]; }'.
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(3,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(19,1): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,9): error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,9): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(32,16): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(44,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(60,5): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,13): error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,13): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): e
|
||||
enum E {
|
||||
x = () => 4, // Error expected
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
y = (() => this).length // error, can't use this in enum
|
||||
~~~~
|
||||
!!! error TS2332: 'this' cannot be referenced in current location.
|
||||
@@ -100,7 +100,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(73,20): e
|
||||
enum E {
|
||||
x = () => 4, // Error expected
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'E'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
y = (() => this).length
|
||||
~~~~
|
||||
!!! error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3
|
||||
var a: Boolean;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts (2 errors) ====
|
||||
@@ -23,9 +23,9 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1
|
||||
var a: Number;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2323: Type 'NotNumber' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(23,1): error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts (2 errors) ====
|
||||
@@ -27,9 +27,9 @@ tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'Number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotNumber' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'NotNumber' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts (1 errors) ====
|
||||
@@ -6,5 +6,5 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1
|
||||
var a: String;
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
a = x;
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2323: Type 'NotString' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(46,1): error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2322: Type 'NotString' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts (2 errors) ====
|
||||
@@ -50,9 +50,9 @@ tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47
|
||||
|
||||
x = a; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'String' is not assignable to type 'string'.
|
||||
x = b; // expected error
|
||||
~
|
||||
!!! error TS2323: Type 'NotString' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'NotString' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignToFn.ts(8,5): error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
tests/cases/compiler/assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignToFn.ts (1 errors) ====
|
||||
@@ -11,6 +11,6 @@ tests/cases/compiler/assignToFn.ts(8,5): error TS2323: Type 'string' is not assi
|
||||
|
||||
x.f="hello";
|
||||
~~~
|
||||
!!! error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: 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 TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: 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 TS2323: Type '{ one: numbe
|
||||
|
||||
x = y;
|
||||
~
|
||||
!!! error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2323: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
y = x;
|
||||
~
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{ one: number; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
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'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: 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 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'.
|
||||
!!! 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'.
|
||||
emptyObjTuple = emptyObjArray;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2323: Property '0' is missing in type '{}[]'.
|
||||
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2322: Property '0' is missing in type '{}[]'.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: 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 TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: 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 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; }'.
|
||||
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; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
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; }'.
|
||||
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; }'.
|
||||
Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
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; }'.
|
||||
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; }'.
|
||||
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 TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2322: 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 TS2323: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
}; // error
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
f: (n) => { return 0; },
|
||||
m: 0,
|
||||
}; // error
|
||||
@@ -57,8 +57,8 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
n: 0,
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
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.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
t = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = s2;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: 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 TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: 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 TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: 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 TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
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; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: 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 TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: 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 TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
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; }'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
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; }'.
|
||||
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; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
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; }'.
|
||||
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; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -69,20 +69,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -92,46 +92,46 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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'.
|
||||
|
||||
@@ -64,18 +64,18 @@ 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 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'.
|
||||
!!! 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'.
|
||||
b8 = a8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ====
|
||||
@@ -25,19 +25,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // error, too many required params
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a; // ok
|
||||
a = b.a2; // ok
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
|
||||
var a2: (x?: number) => number;
|
||||
a2 = () => 1; // ok, same number of required params
|
||||
@@ -50,7 +50,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a5; // ok
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
|
||||
var a3: (x: number) => number;
|
||||
a3 = () => 1; // ok, fewer required params
|
||||
@@ -58,7 +58,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number) => 1; // ok, same number of required params
|
||||
a3 = (x: number, y: number) => 1; // error, too many required params
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
a3 = b.a; // ok
|
||||
a3 = b.a2; // ok
|
||||
a3 = b.a3; // ok
|
||||
@@ -66,7 +66,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a5; // ok
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
|
||||
var a4: (x: number, y?: number) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => 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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
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'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
|
||||
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
a3 = (x: number, ...z: number[]) => 1; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a3 = (x: string, y?: string, z?: string) => 1; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
a4 = (x: number) => 1; // ok, all present params match
|
||||
a4 = (x: number, y?: number) => 1; // error, second param has type mismatch
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ====
|
||||
@@ -38,26 +38,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'.
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: 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 TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: 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 TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: 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 TS2323: 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 TS2322: 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 TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
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.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
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.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: 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 TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: 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 TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
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.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
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; }'.
|
||||
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.
|
||||
Type '(x: string) => void' is not assignable to type '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; }'.
|
||||
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; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
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; }'.
|
||||
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; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -53,20 +53,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -76,38 +76,38 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = a3;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
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'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
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'.
|
||||
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'.
|
||||
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[]; }'.
|
||||
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.
|
||||
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 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[]'.
|
||||
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.
|
||||
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 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[]; }'.
|
||||
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.
|
||||
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 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[]'.
|
||||
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.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
@@ -76,18 +76,18 @@ 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 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'.
|
||||
!!! 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'.
|
||||
b8 = a8; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -113,26 +113,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b16: new <T>(x: (a: T) => T) => T[];
|
||||
a16 = b16; // error
|
||||
~~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
~~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ====
|
||||
@@ -23,14 +23,14 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b.a2; // ok
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
|
||||
var a2: new (x?: number) => number;
|
||||
a2 = b.a; // ok
|
||||
@@ -40,7 +40,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a5; // ok
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
|
||||
var a3: new (x: number) => number;
|
||||
a3 = b.a; // ok
|
||||
@@ -50,7 +50,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a5; // ok
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
|
||||
var a4: new (x: number, y?: number) => number;
|
||||
a4 = b.a; // ok
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2323: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2323: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2323: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2323: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (6 errors) ====
|
||||
@@ -22,7 +22,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = (x?: T) => null; // ok, same T of required params
|
||||
this.a = (x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
!!! error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
|
||||
this.a2 = () => null; // ok, same T of required params
|
||||
this.a2 = (x?: T) => null; // ok, same T of required params
|
||||
@@ -33,7 +33,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = (x: T) => null; // ok, same T of required params
|
||||
this.a3 = (x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
!!! error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
|
||||
this.a4 = () => null; // ok, fewer required params
|
||||
this.a4 = (x?: T, y?: T) => null; // ok, fewer required params
|
||||
@@ -77,10 +77,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
b.a = t.a2;
|
||||
b.a = t.a3;
|
||||
~~~
|
||||
!!! error TS2323: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
b.a = t.a4;
|
||||
~~~
|
||||
!!! error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
b.a = t.a5;
|
||||
|
||||
b.a2 = t.a;
|
||||
@@ -123,7 +123,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = <T>(x?: T) => null; // ok, same T of required params
|
||||
this.a = <T>(x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2323: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
|
||||
this.a2 = <T>() => null; // ok, same T of required params
|
||||
this.a2 = <T>(x?: T) => null; // ok, same T of required params
|
||||
@@ -134,7 +134,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = <T>(x: T) => null; // ok, same T of required params
|
||||
this.a3 = <T>(x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2323: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
!!! error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
|
||||
this.a4 = <T>() => null; // ok, fewer required params
|
||||
this.a4 = <T>(x?: T, y?: T) => null; // ok, fewer required params
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
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(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
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'.
|
||||
|
||||
@@ -36,19 +36,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -64,26 +64,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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 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'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
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(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
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'.
|
||||
|
||||
@@ -36,19 +36,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -64,26 +64,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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 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'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
|
||||
@@ -27,10 +27,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
b = a; // ok
|
||||
|
||||
var b2: { [x: number]: T; };
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
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(30,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
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(31,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
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(32,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
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(35,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
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(36,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: 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(41,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: 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(42,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: 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(43,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: 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(44,5): error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
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(45,5): error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
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(70,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
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(81,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
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(87,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
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'.
|
||||
|
||||
@@ -80,80 +80,80 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
t = s; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
s2 = t; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
s2 = b; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
s2 = a2; // ok
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! 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 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'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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 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'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
}
|
||||
|
||||
module WithBase {
|
||||
@@ -180,19 +180,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = t; // ok
|
||||
t = s; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
s2 = t; // ok
|
||||
s2 = b; // ok
|
||||
s2 = a2; // ok
|
||||
@@ -200,9 +200,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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 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'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
@@ -210,9 +210,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b2; // ok
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t; // ok
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2322: 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 TS2323: Type 'C' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2322: 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 TS2323: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'I'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'I'.
|
||||
i = c; // error
|
||||
~
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'fooo' is missing in type 'C'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'fooo' is missing in type 'C'.
|
||||
@@ -1,50 +1,50 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: 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 TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: 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 TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: 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 TS2323: Type 'I' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: 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 TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: 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 TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: 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 TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: 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 TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: 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 TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: 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 TS2323: Type 'I' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: 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 TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: 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 TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: 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 TS2323: Type 'I' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: 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 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; }'.
|
||||
!!! 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; }'.
|
||||
|
||||
b = a;
|
||||
b = i;
|
||||
b = d;
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
|
||||
i = a;
|
||||
i = b;
|
||||
i = d;
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
|
||||
d = a;
|
||||
d = b;
|
||||
d = i;
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2322: 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 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; }'.
|
||||
!!! 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; }'.
|
||||
a = i; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b = i;
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
b = b;
|
||||
|
||||
i = a; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
i = b;
|
||||
i = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
i = i;
|
||||
|
||||
d = a;
|
||||
d = b; // error
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
d = i; // error
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2322: 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 TS2323: Type 'D' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
c = f; // ok
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = f; // ok
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b = f; // ok
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: 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 TS2323: Type 'F' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2322: 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 TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2322: 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 TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2322: 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 TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2322: 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 TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
c = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
a = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
b = f; // error
|
||||
~
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
}
|
||||
@@ -1,60 +1,60 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: 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 TS2323: Type 'S' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: 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 TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: 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 TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: 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 TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: 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 TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: 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 TS2323: 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 TS2322: 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 TS2323: 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 TS2322: 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 TS2323: Type 'S' is not assignable to 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; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
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; }'.
|
||||
Property ''1.'' is missing in 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; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to 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; }'.
|
||||
Property ''1'' is missing in 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; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: 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 TS2323: 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 TS2322: 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 TS2323: 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 TS2322: 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 TS2323: Type 'S' is not assignable to 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; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
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; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': 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; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: 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 TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to 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; }'.
|
||||
Property '1.' is missing in 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; }'.
|
||||
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; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: 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 TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: 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 TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
t = s;
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
s = s2; // ok
|
||||
s = a2;
|
||||
~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2;
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T2'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T2'.
|
||||
t2 = s2;
|
||||
~~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'S2'.
|
||||
s2 = t;
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
s2 = b;
|
||||
~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
s2 = a2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b;
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b = a;
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = s;
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2;
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
|
||||
a2 = b2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
b2 = a2;
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t;
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2322: 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 TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = s; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
a = s2; // error
|
||||
~
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2; // error
|
||||
~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2323: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T2'.
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: 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 TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => 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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: 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 TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -29,19 +29,19 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type
|
||||
|
||||
g = f2; // Error
|
||||
~
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
g = f3; // Error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
g = f4; // Error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
class C {
|
||||
constructor(x: string);
|
||||
@@ -52,6 +52,6 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type
|
||||
|
||||
d = C; // Error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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'.
|
||||
|
||||
@@ -43,19 +43,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
class B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -83,34 +83,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
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(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
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'.
|
||||
|
||||
@@ -43,19 +43,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -71,9 +71,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
interface B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -83,34 +83,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! 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 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'.
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
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 TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
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.
|
||||
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 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'.
|
||||
!!! 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'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x4 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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; }'.
|
||||
!!! 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; }'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
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.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tstring>(a: Tstring) => Tstring'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '<Tnumber>(a: Tnumber) => Tnumber'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tnumber>(param: Tnumber) => any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ====
|
||||
@@ -12,4 +12,4 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'new <Tstring>(param: Tstring) => any'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x5 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x6 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__x7 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: 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 TS2323: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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>'.
|
||||
!!! 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>'.
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: 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 TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: 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 TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: 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 TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: 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 TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'string[]'.
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: 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 TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: 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 TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: 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 TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: 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 TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'String'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'string[]'.
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'Number'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type '{}'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user