mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Print out methods in the types of object literals as if they were methods, not function typed properties.
This commit is contained in:
parent
d5ef6226da
commit
3440869010
@ -1392,7 +1392,7 @@ module ts {
|
||||
for (var i = 0; i < resolved.properties.length; i++) {
|
||||
var p = resolved.properties[i];
|
||||
var t = getTypeOfSymbol(p);
|
||||
if (p.flags & (SymbolFlags.Function | SymbolFlags.Method) && !isObjectLiteralMethod(p.valueDeclaration) && !getPropertiesOfObjectType(t).length) {
|
||||
if (p.flags & (SymbolFlags.Function | SymbolFlags.Method) && !getPropertiesOfObjectType(t).length) {
|
||||
var signatures = getSignaturesOfType(t, SignatureKind.Call);
|
||||
for (var j = 0; j < signatures.length; j++) {
|
||||
buildSymbolDisplay(p, writer);
|
||||
@ -2839,7 +2839,7 @@ module ts {
|
||||
// The expression is processed as an identifier expression (section 4.3)
|
||||
// or property access expression(section 4.10),
|
||||
// the widened type(section 3.9) of which becomes the result.
|
||||
links.resolvedType = getWidenedType(checkExpression(node.exprName));
|
||||
links.resolvedType = getWidenedType(checkExpressionOrQualifiedName(node.exprName));
|
||||
}
|
||||
return links.resolvedType;
|
||||
}
|
||||
@ -3238,30 +3238,32 @@ module ts {
|
||||
return type;
|
||||
}
|
||||
|
||||
function isContextSensitiveExpression(node: Expression): boolean {
|
||||
return isContextSensitiveCore(node);
|
||||
}
|
||||
|
||||
// Returns true if the given expression contains (at any level of nesting) a function or arrow expression
|
||||
// that is subject to contextual typing.
|
||||
function isContextSensitiveExpression(node: Node): boolean {
|
||||
function isContextSensitiveCore(node: Expression | MethodDeclaration | PropertyAssignment): boolean {
|
||||
Debug.assert(node.kind !== SyntaxKind.Method || isObjectLiteralMethod(node));
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.ArrowFunction:
|
||||
return isContextSensitiveFunctionLikeDeclaration(<FunctionExpression>node);
|
||||
case SyntaxKind.ObjectLiteralExpression:
|
||||
return forEach((<ObjectLiteralExpression>node).properties, isContextSensitiveExpression);
|
||||
return forEach((<ObjectLiteralExpression>node).properties, isContextSensitiveCore);
|
||||
case SyntaxKind.ArrayLiteralExpression:
|
||||
return forEach((<ArrayLiteralExpression>node).elements, e => isContextSensitiveExpression(e));
|
||||
return forEach((<ArrayLiteralExpression>node).elements, isContextSensitiveCore);
|
||||
case SyntaxKind.ConditionalExpression:
|
||||
return isContextSensitiveExpression((<ConditionalExpression>node).whenTrue) ||
|
||||
isContextSensitiveExpression((<ConditionalExpression>node).whenFalse);
|
||||
return isContextSensitiveCore((<ConditionalExpression>node).whenTrue) ||
|
||||
isContextSensitiveCore((<ConditionalExpression>node).whenFalse);
|
||||
case SyntaxKind.BinaryExpression:
|
||||
return (<BinaryExpression>node).operator === SyntaxKind.BarBarToken &&
|
||||
(isContextSensitiveExpression((<BinaryExpression>node).left) || isContextSensitiveExpression((<BinaryExpression>node).right));
|
||||
(isContextSensitiveCore((<BinaryExpression>node).left) || isContextSensitiveCore((<BinaryExpression>node).right));
|
||||
case SyntaxKind.LonghandPropertyAssignment:
|
||||
return isContextSensitiveExpression((<LonghandPropertyAssignment>node).initializer);
|
||||
return isContextSensitiveCore((<LonghandPropertyAssignment>node).initializer);
|
||||
case SyntaxKind.Method:
|
||||
if (isObjectLiteralMethod(node)) {
|
||||
return isContextSensitiveFunctionLikeDeclaration(<MethodDeclaration>node);
|
||||
}
|
||||
return false;
|
||||
return isContextSensitiveFunctionLikeDeclaration(<MethodDeclaration>node);
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -5115,7 +5117,7 @@ module ts {
|
||||
type = checkExpression((<LonghandPropertyAssignment>memberDecl).initializer, contextualMapper);
|
||||
}
|
||||
else if (memberDecl.kind === SyntaxKind.Method) {
|
||||
type = checkExpression(<MethodDeclaration>memberDecl, contextualMapper);
|
||||
type = checkObjectLiteralMethod(<MethodDeclaration>memberDecl, contextualMapper);
|
||||
}
|
||||
else {
|
||||
Debug.assert(memberDecl.kind === SyntaxKind.ShorthandPropertyAssignment);
|
||||
@ -5233,7 +5235,7 @@ module ts {
|
||||
}
|
||||
|
||||
function checkPropertyAccessExpressionOrQualifiedName(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, right: Identifier) {
|
||||
var type = checkExpression(left);
|
||||
var type = checkExpressionOrQualifiedName(left);
|
||||
if (type === unknownType) return type;
|
||||
if (type !== anyType) {
|
||||
var apparentType = getApparentType(getWidenedType(type));
|
||||
@ -5274,7 +5276,7 @@ module ts {
|
||||
? (<PropertyAccessExpression>node).expression
|
||||
: (<QualifiedName>node).left;
|
||||
|
||||
var type = checkExpression(left);
|
||||
var type = checkExpressionOrQualifiedName(left);
|
||||
if (type !== unknownType && type !== anyType) {
|
||||
var prop = getPropertyOfType(getWidenedType(type), propertyName);
|
||||
if (prop && prop.parent && prop.parent.flags & SymbolFlags.Class) {
|
||||
@ -6184,7 +6186,7 @@ module ts {
|
||||
links.flags |= NodeCheckFlags.ContextChecked;
|
||||
if (contextualSignature) {
|
||||
var signature = getSignaturesOfType(type, SignatureKind.Call)[0];
|
||||
if (isContextSensitiveExpression(node)) {
|
||||
if (isContextSensitiveCore(node)) {
|
||||
assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
|
||||
}
|
||||
if (!node.type) {
|
||||
@ -6590,6 +6592,18 @@ module ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
function checkExpressionOrQualifiedName(node: Expression | QualifiedName, contextualMapper?: TypeMapper): Type {
|
||||
return checkExpressionCore(node, contextualMapper);
|
||||
}
|
||||
|
||||
function checkExpression(node: Expression, contextualMapper?: TypeMapper): Type {
|
||||
return checkExpressionCore(node, contextualMapper);
|
||||
}
|
||||
|
||||
function checkObjectLiteralMethod(node: MethodDeclaration, contextualMapper?: TypeMapper): Type {
|
||||
return checkExpressionCore(node, contextualMapper);
|
||||
}
|
||||
|
||||
// Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When
|
||||
// contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the
|
||||
// expression is being inferentially typed (section 4.12.2 in spec) and provides the type mapper to use in
|
||||
@ -6597,7 +6611,7 @@ module ts {
|
||||
// object, it serves as an indicator that all contained function and arrow expressions should be considered to
|
||||
// have the wildcard function type; this form of type check is used during overload resolution to exclude
|
||||
// contextually typed function and arrow expressions in the initial phase.
|
||||
function checkExpression(node: Expression | QualifiedName | MethodDeclaration, contextualMapper?: TypeMapper): Type {
|
||||
function checkExpressionCore(node: Expression | QualifiedName | MethodDeclaration, contextualMapper?: TypeMapper): Type {
|
||||
var type = checkExpressionOrQualifiedNameOrObjectLiteralMethodNode(node, contextualMapper);
|
||||
if (contextualMapper && contextualMapper !== identityMapper && node.kind !== SyntaxKind.QualifiedName) {
|
||||
var signature = getSingleCallSignature(type);
|
||||
@ -7947,7 +7961,7 @@ module ts {
|
||||
}
|
||||
|
||||
// Check that base type can be evaluated as expression
|
||||
checkExpression(baseTypeNode.typeName);
|
||||
checkExpressionOrQualifiedName(baseTypeNode.typeName);
|
||||
}
|
||||
|
||||
var implementedTypeNodes = getClassImplementedTypeNodes(node);
|
||||
@ -8436,7 +8450,7 @@ module ts {
|
||||
// ensure it can be evaluated as an expression
|
||||
var moduleName = getFirstIdentifier(<EntityName>node.moduleReference);
|
||||
if (resolveEntityName(node, moduleName, SymbolFlags.Value | SymbolFlags.Namespace).flags & SymbolFlags.Namespace) {
|
||||
checkExpression(<EntityName>node.moduleReference);
|
||||
checkExpressionOrQualifiedName(<EntityName>node.moduleReference);
|
||||
}
|
||||
else {
|
||||
error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName));
|
||||
|
||||
@ -102,12 +102,9 @@ module ts.BreakpointResolver {
|
||||
return spanInFunctionDeclaration(<FunctionLikeDeclaration>node);
|
||||
|
||||
case SyntaxKind.Block:
|
||||
if (isFunctionBlock(node)) {
|
||||
return spanInFunctionBlock(<Block>node);
|
||||
}
|
||||
else {
|
||||
return spanInBlock(<Block>node);
|
||||
}
|
||||
return isFunctionBlock(node)
|
||||
? spanInFunctionBlock(<Block>node)
|
||||
: spanInBlock(<Block>node);
|
||||
|
||||
case SyntaxKind.TryBlock:
|
||||
case SyntaxKind.FinallyBlock:
|
||||
|
||||
@ -132,15 +132,15 @@ x = i;
|
||||
>i : () => string
|
||||
|
||||
x = { f() { return 1; } }
|
||||
>x = { f() { return 1; } } : { f: () => number; }
|
||||
>x = { f() { return 1; } } : { f(): number; }
|
||||
>x : any
|
||||
>{ f() { return 1; } } : { f: () => number; }
|
||||
>{ f() { return 1; } } : { f(): number; }
|
||||
>f : () => number
|
||||
|
||||
x = { f<T>(x: T) { return x; } }
|
||||
>x = { f<T>(x: T) { return x; } } : { f: <T>(x: T) => T; }
|
||||
>x = { f<T>(x: T) { return x; } } : { f<T>(x: T): T; }
|
||||
>x : any
|
||||
>{ f<T>(x: T) { return x; } } : { f: <T>(x: T) => T; }
|
||||
>{ f<T>(x: T) { return x; } } : { f<T>(x: T): T; }
|
||||
>f : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
|
||||
@ -133,8 +133,8 @@ a.foo(1);
|
||||
>foo : (x?: number) => any
|
||||
|
||||
var b = {
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>{ foo(x?: number) { }, a: function foo(x: number, y?: number) { }, b: (x?: number) => { }} : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>{ foo(x?: number) { }, a: function foo(x: number, y?: number) { }, b: (x?: number) => { }} : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
|
||||
foo(x?: number) { },
|
||||
>foo : (x?: number) => void
|
||||
@ -156,36 +156,36 @@ var b = {
|
||||
b.foo();
|
||||
>b.foo() : void
|
||||
>b.foo : (x?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>foo : (x?: number) => void
|
||||
|
||||
b.foo(1);
|
||||
>b.foo(1) : void
|
||||
>b.foo : (x?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>foo : (x?: number) => void
|
||||
|
||||
b.a(1);
|
||||
>b.a(1) : void
|
||||
>b.a : (x: number, y?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>a : (x: number, y?: number) => void
|
||||
|
||||
b.a(1, 2);
|
||||
>b.a(1, 2) : void
|
||||
>b.a : (x: number, y?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>a : (x: number, y?: number) => void
|
||||
|
||||
b.b();
|
||||
>b.b() : void
|
||||
>b.b : (x?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : (x?: number) => void
|
||||
|
||||
b.b(1);
|
||||
>b.b(1) : void
|
||||
>b.b : (x?: number) => void
|
||||
>b : { foo: (x?: number) => void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : { foo(x?: number): void; a: (x: number, y?: number) => void; b: (x?: number) => void; }
|
||||
>b : (x?: number) => void
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
=== tests/cases/compiler/commentsOnObjectLiteral3.ts ===
|
||||
|
||||
var v = {
|
||||
>v : { prop: number; func: () => void; func1: () => void; a: any; }
|
||||
>{ //property prop: 1 /* multiple trailing comments */ /*trailing comments*/, //property func: function () { }, //PropertyName + CallSignature func1() { }, //getter get a() { return this.prop; } /*trailing 1*/, //setter set a(value) { this.prop = value; } // trailing 2} : { prop: number; func: () => void; func1: () => void; a: any; }
|
||||
>v : { prop: number; func: () => void; func1(): void; a: any; }
|
||||
>{ //property prop: 1 /* multiple trailing comments */ /*trailing comments*/, //property func: function () { }, //PropertyName + CallSignature func1() { }, //getter get a() { return this.prop; } /*trailing 1*/, //setter set a(value) { this.prop = value; } // trailing 2} : { prop: number; func: () => void; func1(): void; a: any; }
|
||||
|
||||
//property
|
||||
prop: 1 /* multiple trailing comments */ /*trailing comments*/,
|
||||
|
||||
@ -68,9 +68,9 @@ x = M;
|
||||
>M : typeof M
|
||||
|
||||
x = { f() { } }
|
||||
>x = { f() { } } : { f: () => void; }
|
||||
>x = { f() { } } : { f(): void; }
|
||||
>x : any
|
||||
>{ f() { } } : { f: () => void; }
|
||||
>{ f() { } } : { f(): void; }
|
||||
>f : () => void
|
||||
|
||||
function f<T>(a: T) {
|
||||
|
||||
@ -12,7 +12,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): e
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(26,1): error TS2322: Type 'typeof E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f(): void; }' is not assignable to type 'void'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts (13 errors) ====
|
||||
@ -72,4 +72,4 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e
|
||||
|
||||
x = { f() { } }
|
||||
~
|
||||
!!! error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'.
|
||||
!!! error TS2322: Type '{ f(): void; }' is not assignable to type 'void'.
|
||||
@ -5,7 +5,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(7,1): error T
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(8,1): error TS2322: Type 'E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(12,1): error TS2322: Type 'C' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(16,1): error TS2322: Type 'I' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(18,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(18,1): error TS2322: Type '{ f(): void; }' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(21,1): error TS2322: Type 'typeof M' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(24,5): error TS2322: Type 'T' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(26,1): error TS2322: Type '<T>(a: T) => void' is not assignable to type 'void'.
|
||||
@ -45,7 +45,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidValues.ts(26,1): error
|
||||
|
||||
x = { f() {} }
|
||||
~
|
||||
!!! error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'.
|
||||
!!! error TS2322: Type '{ f(): void; }' is not assignable to type 'void'.
|
||||
|
||||
module M { export var x = 1; }
|
||||
x = M;
|
||||
|
||||
@ -3,8 +3,8 @@ var x = 1
|
||||
>x : number
|
||||
|
||||
var y = { x() { x++; } };
|
||||
>y : { x: () => void; }
|
||||
>{ x() { x++; } } : { x: () => void; }
|
||||
>y : { x(): void; }
|
||||
>{ x() { x++; } } : { x(): void; }
|
||||
>x : () => void
|
||||
>x++ : number
|
||||
>x : number
|
||||
|
||||
@ -7,7 +7,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(50,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo(): string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
@ -108,7 +108,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo
|
||||
// error
|
||||
var b: { [x: number]: string; } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
!!! error TS2322: Type '{ [x: number]: string | number; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: any; X: string; foo(): string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@ -23,7 +23,7 @@ var x2 = {
|
||||
|
||||
var x3 = {
|
||||
>x3 : any
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; }
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
|
||||
|
||||
a: 0,
|
||||
>a : number
|
||||
|
||||
@ -23,7 +23,7 @@ var x2 = {
|
||||
|
||||
var x3 = {
|
||||
>x3 : any
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d: () => void; x3: any; parent: any; }
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
|
||||
|
||||
a: 0,
|
||||
>a : number
|
||||
|
||||
@ -53,8 +53,8 @@ var a: { foo(x: string): string }
|
||||
>x : string
|
||||
|
||||
var b = { foo(x: string) { return ''; } };
|
||||
>b : { foo: (x: string) => string; }
|
||||
>{ foo(x: string) { return ''; } } : { foo: (x: string) => string; }
|
||||
>b : { foo(x: string): string; }
|
||||
>{ foo(x: string) { return ''; } } : { foo(x: string): string; }
|
||||
>foo : (x: string) => string
|
||||
>x : string
|
||||
|
||||
@ -129,17 +129,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -241,17 +241,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // error
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -297,17 +297,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // error
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -54,8 +54,8 @@ var a: { foo(x: Date): string }
|
||||
>Date : Date
|
||||
|
||||
var b = { foo(x: RegExp) { return ''; } };
|
||||
>b : { foo: (x: RegExp) => string; }
|
||||
>{ foo(x: RegExp) { return ''; } } : { foo: (x: RegExp) => string; }
|
||||
>b : { foo(x: RegExp): string; }
|
||||
>{ foo(x: RegExp) { return ''; } } : { foo(x: RegExp): string; }
|
||||
>foo : (x: RegExp) => string
|
||||
>x : RegExp
|
||||
>RegExp : RegExp
|
||||
@ -131,17 +131,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>x : { foo: (x: RegExp) => string; }
|
||||
>b : { foo: (x: RegExp) => string; }
|
||||
>foo4 : { (x: { foo(x: RegExp): string; }): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : { foo(x: RegExp): string; }
|
||||
>b : { foo(x: RegExp): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>x : { foo: (x: RegExp) => string; }
|
||||
>b : { foo: (x: RegExp) => string; }
|
||||
>foo4 : { (x: { foo(x: RegExp): string; }): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : { foo(x: RegExp): string; }
|
||||
>b : { foo(x: RegExp): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: (x: RegExp) => string; }): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>foo4 : { (x: { foo(x: RegExp): string; }): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -243,17 +243,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>x : { foo: (x: RegExp) => string; }
|
||||
>b : { foo: (x: RegExp) => string; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : { foo(x: RegExp): string; }
|
||||
>b : { foo(x: RegExp): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -299,17 +299,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>x : { foo: (x: RegExp) => string; }
|
||||
>b : { foo: (x: RegExp) => string; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : { foo(x: RegExp): string; }
|
||||
>b : { foo(x: RegExp): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: RegExp) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -57,8 +57,8 @@ var a: { foo(x: string, y: string): string }
|
||||
>y : string
|
||||
|
||||
var b = { foo(x: string) { return ''; } };
|
||||
>b : { foo: (x: string) => string; }
|
||||
>{ foo(x: string) { return ''; } } : { foo: (x: string) => string; }
|
||||
>b : { foo(x: string): string; }
|
||||
>{ foo(x: string) { return ''; } } : { foo(x: string): string; }
|
||||
>foo : (x: string) => string
|
||||
>x : string
|
||||
|
||||
@ -133,17 +133,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: (x: string) => string; }): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo4 : { (x: { foo(x: string): string; }): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -245,17 +245,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -301,17 +301,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // error
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>x : { foo: (x: string) => string; }
|
||||
>b : { foo: (x: string) => string; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : { foo(x: string): string; }
|
||||
>b : { foo(x: string): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -100,8 +100,8 @@ var a: {
|
||||
}
|
||||
|
||||
var b = {
|
||||
>b : { foo: (x: any) => any; }
|
||||
>{ foo(x: any) { return <any>''; }} : { foo: (x: any) => any; }
|
||||
>b : { foo(x: any): any; }
|
||||
>{ foo(x: any) { return <any>''; }} : { foo(x: any): any; }
|
||||
|
||||
foo(x: any) { return <any>''; }
|
||||
>foo : (x: any) => any
|
||||
@ -181,17 +181,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>x : { foo: (x: any) => any; }
|
||||
>b : { foo: (x: any) => any; }
|
||||
>foo4 : { (x: { foo(x: any): any; }): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : { foo(x: any): any; }
|
||||
>b : { foo(x: any): any; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>x : { foo: (x: any) => any; }
|
||||
>b : { foo: (x: any) => any; }
|
||||
>foo4 : { (x: { foo(x: any): any; }): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : { foo(x: any): any; }
|
||||
>b : { foo(x: any): any; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: (x: any) => any; }): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>foo4 : { (x: { foo(x: any): any; }): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -293,17 +293,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>x : { foo: (x: any) => any; }
|
||||
>b : { foo: (x: any) => any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : { foo(x: any): any; }
|
||||
>b : { foo(x: any): any; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -349,17 +349,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>x : { foo: (x: any) => any; }
|
||||
>b : { foo: (x: any) => any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : { foo(x: any): any; }
|
||||
>b : { foo(x: any): any; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { foo: (x: any) => any; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { foo(x: any): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -40,8 +40,8 @@ var a: { new(x: Date): string }
|
||||
>Date : Date
|
||||
|
||||
var b = { new(x: RegExp) { return ''; } }; // not a construct signature, function called new
|
||||
>b : { new: (x: RegExp) => string; }
|
||||
>{ new(x: RegExp) { return ''; } } : { new: (x: RegExp) => string; }
|
||||
>b : { new(x: RegExp): string; }
|
||||
>{ new(x: RegExp) { return ''; } } : { new(x: RegExp): string; }
|
||||
>new : (x: RegExp) => string
|
||||
>x : RegExp
|
||||
>RegExp : RegExp
|
||||
@ -103,17 +103,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>x : { new: (x: RegExp) => string; }
|
||||
>b : { new: (x: RegExp) => string; }
|
||||
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : { new(x: RegExp): string; }
|
||||
>b : { new(x: RegExp): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>x : { new: (x: RegExp) => string; }
|
||||
>b : { new: (x: RegExp) => string; }
|
||||
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : { new(x: RegExp): string; }
|
||||
>b : { new(x: RegExp): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: (x: RegExp) => string; }): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B);
|
||||
@ -159,17 +159,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>x : { new: (x: RegExp) => string; }
|
||||
>b : { new: (x: RegExp) => string; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : { new(x: RegExp): string; }
|
||||
>b : { new(x: RegExp): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -215,17 +215,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>x : { new: (x: RegExp) => string; }
|
||||
>b : { new: (x: RegExp) => string; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : { new(x: RegExp): string; }
|
||||
>b : { new(x: RegExp): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { new: (x: RegExp) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -43,8 +43,8 @@ var a: { new(x: string, y: string): string }
|
||||
>y : string
|
||||
|
||||
var b = { new(x: string) { return ''; } }; // not a construct signature, function called new
|
||||
>b : { new: (x: string) => string; }
|
||||
>{ new(x: string) { return ''; } } : { new: (x: string) => string; }
|
||||
>b : { new(x: string): string; }
|
||||
>{ new(x: string) { return ''; } } : { new(x: string): string; }
|
||||
>new : (x: string) => string
|
||||
>x : string
|
||||
|
||||
@ -105,17 +105,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; }
|
||||
>x : { new: (x: string) => string; }
|
||||
>b : { new: (x: string) => string; }
|
||||
>foo4 : { (x: { new(x: string): string; }): any; (x: { new(x: string): string; }): any; }
|
||||
>x : { new(x: string): string; }
|
||||
>b : { new(x: string): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; }
|
||||
>x : { new: (x: string) => string; }
|
||||
>b : { new: (x: string) => string; }
|
||||
>foo4 : { (x: { new(x: string): string; }): any; (x: { new(x: string): string; }): any; }
|
||||
>x : { new(x: string): string; }
|
||||
>b : { new(x: string): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: (x: string) => string; }): any; (x: { new: (x: string) => string; }): any; }
|
||||
>foo4 : { (x: { new(x: string): string; }): any; (x: { new(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B);
|
||||
@ -161,17 +161,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B);
|
||||
>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: string): string; }): any; }
|
||||
>x : B
|
||||
>B : B
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; }
|
||||
>x : { new: (x: string) => string; }
|
||||
>b : { new: (x: string) => string; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: string): string; }): any; }
|
||||
>x : { new(x: string): string; }
|
||||
>b : { new(x: string): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B): any; (x: { new: (x: string) => string; }): any; }
|
||||
>foo11 : { (x: B): any; (x: { new(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I);
|
||||
@ -217,17 +217,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I);
|
||||
>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: string): string; }): any; }
|
||||
>x : I
|
||||
>I : I
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; }
|
||||
>x : { new: (x: string) => string; }
|
||||
>b : { new: (x: string) => string; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: string): string; }): any; }
|
||||
>x : { new(x: string): string; }
|
||||
>b : { new(x: string): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I): any; (x: { new: (x: string) => string; }): any; }
|
||||
>foo14 : { (x: I): any; (x: { new(x: string): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2<string>);
|
||||
|
||||
@ -65,8 +65,8 @@ var a: { foo<T>(x: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T>(x: T) { return x; } };
|
||||
>b : { foo: <T>(x: T) => T; }
|
||||
>{ foo<T>(x: T) { return x; } } : { foo: <T>(x: T) => T; }
|
||||
>b : { foo<T>(x: T): T; }
|
||||
>{ foo<T>(x: T) { return x; } } : { foo<T>(x: T): T; }
|
||||
>foo : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
@ -144,17 +144,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T>(x: T) => T; }): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T) => T; }
|
||||
>b : { foo: <T>(x: T) => T; }
|
||||
>foo4 : { (x: { foo<T>(x: T): T; }): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : { foo<T>(x: T): T; }
|
||||
>b : { foo<T>(x: T): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T>(x: T) => T; }): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T) => T; }
|
||||
>b : { foo: <T>(x: T) => T; }
|
||||
>foo4 : { (x: { foo<T>(x: T): T; }): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : { foo<T>(x: T): T; }
|
||||
>b : { foo<T>(x: T): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T>(x: T) => T; }): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>foo4 : { (x: { foo<T>(x: T): T; }): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -256,17 +256,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<T>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T) => T; }
|
||||
>b : { foo: <T>(x: T) => T; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : { foo<T>(x: T): T; }
|
||||
>b : { foo<T>(x: T): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -312,17 +312,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T) => T; }
|
||||
>b : { foo: <T>(x: T) => T; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : { foo<T>(x: T): T; }
|
||||
>b : { foo<T>(x: T): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -83,8 +83,8 @@ var a: { foo<T, U>(x: T, y: U): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T, U>(x: T, y: U) { return x; } };
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>{ foo<T, U>(x: T, y: U) { return x; } } : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
>{ foo<T, U>(x: T, y: U) { return x; } } : { foo<T, U>(x: T, y: U): T; }
|
||||
>foo : <T, U>(x: T, y: U) => T
|
||||
>T : T
|
||||
>U : U
|
||||
@ -165,17 +165,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -277,17 +277,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, number>);
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : B<string, number>
|
||||
>B : B<T, U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string, number>);
|
||||
@ -333,17 +333,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, number>);
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : I<string, number>
|
||||
>I : I<T, U>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -67,8 +67,8 @@ var a: { foo<T extends Array<string>>(x: T): string }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T extends RegExp>(x: T) { return ''; } };
|
||||
>b : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>{ foo<T extends RegExp>(x: T) { return ''; } } : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>b : { foo<T extends RegExp>(x: T): string; }
|
||||
>{ foo<T extends RegExp>(x: T) { return ''; } } : { foo<T extends RegExp>(x: T): string; }
|
||||
>foo : <T extends RegExp>(x: T) => string
|
||||
>T : T
|
||||
>RegExp : RegExp
|
||||
@ -152,17 +152,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T extends RegExp>(x: T) => string; }): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>b : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>foo4 : { (x: { foo<T extends RegExp>(x: T): string; }): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { foo<T extends RegExp>(x: T): string; }
|
||||
>b : { foo<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T extends RegExp>(x: T) => string; }): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>b : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>foo4 : { (x: { foo<T extends RegExp>(x: T): string; }): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { foo<T extends RegExp>(x: T): string; }
|
||||
>b : { foo<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T extends RegExp>(x: T) => string; }): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo4 : { (x: { foo<T extends RegExp>(x: T): string; }): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -272,18 +272,18 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Array<number>>);
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : B<number[]>
|
||||
>B : B<T>
|
||||
>Array : T[]
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>b : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { foo<T extends RegExp>(x: T): string; }
|
||||
>b : { foo<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Number>);
|
||||
@ -333,18 +333,18 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Number>);
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : I<Number>
|
||||
>I : I<T>
|
||||
>Number : Number
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>b : { foo: <T extends RegExp>(x: T) => string; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { foo<T extends RegExp>(x: T): string; }
|
||||
>b : { foo<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { foo<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -64,8 +64,8 @@ var a: { foo<T>(x: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T>(x: T) { return null; } };
|
||||
>b : { foo: <T>(x: T) => any; }
|
||||
>{ foo<T>(x: T) { return null; } } : { foo: <T>(x: T) => any; }
|
||||
>b : { foo<T>(x: T): any; }
|
||||
>{ foo<T>(x: T) { return null; } } : { foo<T>(x: T): any; }
|
||||
>foo : <T>(x: T) => any
|
||||
>T : T
|
||||
>x : T
|
||||
@ -142,17 +142,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T>(x: T) => any; }): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>x : { foo: <T>(x: T) => any; }
|
||||
>b : { foo: <T>(x: T) => any; }
|
||||
>foo4 : { (x: { foo<T>(x: T): any; }): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : { foo<T>(x: T): any; }
|
||||
>b : { foo<T>(x: T): any; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T>(x: T) => any; }): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>x : { foo: <T>(x: T) => any; }
|
||||
>b : { foo: <T>(x: T) => any; }
|
||||
>foo4 : { (x: { foo<T>(x: T): any; }): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : { foo<T>(x: T): any; }
|
||||
>b : { foo<T>(x: T): any; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T>(x: T) => any; }): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>foo4 : { (x: { foo<T>(x: T): any; }): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -254,17 +254,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<T>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>x : { foo: <T>(x: T) => any; }
|
||||
>b : { foo: <T>(x: T) => any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : { foo<T>(x: T): any; }
|
||||
>b : { foo<T>(x: T): any; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -310,17 +310,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>x : { foo: <T>(x: T) => any; }
|
||||
>b : { foo: <T>(x: T) => any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : { foo<T>(x: T): any; }
|
||||
>b : { foo<T>(x: T): any; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -70,8 +70,8 @@ var a: { foo<T extends Date>(x: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T extends Date>(x: T) { return null; } };
|
||||
>b : { foo: <T extends Date>(x: T) => any; }
|
||||
>{ foo<T extends Date>(x: T) { return null; } } : { foo: <T extends Date>(x: T) => any; }
|
||||
>b : { foo<T extends Date>(x: T): any; }
|
||||
>{ foo<T extends Date>(x: T) { return null; } } : { foo<T extends Date>(x: T): any; }
|
||||
>foo : <T extends Date>(x: T) => any
|
||||
>T : T
|
||||
>Date : Date
|
||||
@ -155,17 +155,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T extends Date>(x: T) => any; }): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { foo: <T extends Date>(x: T) => any; }
|
||||
>b : { foo: <T extends Date>(x: T) => any; }
|
||||
>foo4 : { (x: { foo<T extends Date>(x: T): any; }): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : { foo<T extends Date>(x: T): any; }
|
||||
>b : { foo<T extends Date>(x: T): any; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T extends Date>(x: T) => any; }): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { foo: <T extends Date>(x: T) => any; }
|
||||
>b : { foo: <T extends Date>(x: T) => any; }
|
||||
>foo4 : { (x: { foo<T extends Date>(x: T): any; }): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : { foo<T extends Date>(x: T): any; }
|
||||
>b : { foo<T extends Date>(x: T): any; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T extends Date>(x: T) => any; }): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo4 : { (x: { foo<T extends Date>(x: T): any; }): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -275,18 +275,18 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Date>);
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : B<Date>
|
||||
>B : B<T>
|
||||
>Date : Date
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { foo: <T extends Date>(x: T) => any; }
|
||||
>b : { foo: <T extends Date>(x: T) => any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : { foo<T extends Date>(x: T): any; }
|
||||
>b : { foo<T extends Date>(x: T): any; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Date>);
|
||||
@ -336,18 +336,18 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Date>);
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : I<Date>
|
||||
>I : I<T>
|
||||
>Date : Date
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { foo: <T extends Date>(x: T) => any; }
|
||||
>b : { foo: <T extends Date>(x: T) => any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : { foo<T extends Date>(x: T): any; }
|
||||
>b : { foo<T extends Date>(x: T): any; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { foo<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -78,8 +78,8 @@ var a: { foo<Z, A, B, C, D>(x: Z): Z }
|
||||
>Z : Z
|
||||
|
||||
var b = { foo<A, B, C, D, E, F>(x: A) { return x; } };
|
||||
>b : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>{ foo<A, B, C, D, E, F>(x: A) { return x; } } : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>{ foo<A, B, C, D, E, F>(x: A) { return x; } } : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>foo : <A, B, C, D, E, F>(x: A) => A
|
||||
>A : A
|
||||
>B : B
|
||||
@ -162,17 +162,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo4 : { (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo4 : { (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo4 : { (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -277,17 +277,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, boolean>);
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : B<string, boolean>
|
||||
>B : B<U, V>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<B<string, number>, number, Date, string>);
|
||||
@ -340,19 +340,19 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, Date, RegExp, boolean>);
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : I<string, Date, RegExp, boolean>
|
||||
>I : I<X, Y, Z, A>
|
||||
>Date : Date
|
||||
>RegExp : RegExp
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { foo: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { foo<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { foo<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -65,8 +65,8 @@ var a: { foo<Z>(x: Z): Z }
|
||||
>Z : Z
|
||||
|
||||
var b = { foo<A>(x: A) { return x; } };
|
||||
>b : { foo: <A>(x: A) => A; }
|
||||
>{ foo<A>(x: A) { return x; } } : { foo: <A>(x: A) => A; }
|
||||
>b : { foo<A>(x: A): A; }
|
||||
>{ foo<A>(x: A) { return x; } } : { foo<A>(x: A): A; }
|
||||
>foo : <A>(x: A) => A
|
||||
>A : A
|
||||
>x : A
|
||||
@ -144,17 +144,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <A>(x: A) => A; }): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>x : { foo: <A>(x: A) => A; }
|
||||
>b : { foo: <A>(x: A) => A; }
|
||||
>foo4 : { (x: { foo<A>(x: A): A; }): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : { foo<A>(x: A): A; }
|
||||
>b : { foo<A>(x: A): A; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <A>(x: A) => A; }): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>x : { foo: <A>(x: A) => A; }
|
||||
>b : { foo: <A>(x: A) => A; }
|
||||
>foo4 : { (x: { foo<A>(x: A): A; }): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : { foo<A>(x: A): A; }
|
||||
>b : { foo<A>(x: A): A; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <A>(x: A) => A; }): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>foo4 : { (x: { foo<A>(x: A): A; }): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -256,17 +256,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>x : { foo: <A>(x: A) => A; }
|
||||
>b : { foo: <A>(x: A) => A; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : { foo<A>(x: A): A; }
|
||||
>b : { foo<A>(x: A): A; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -312,17 +312,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<X>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>x : { foo: <A>(x: A) => A; }
|
||||
>b : { foo: <A>(x: A) => A; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : { foo<A>(x: A): A; }
|
||||
>b : { foo<A>(x: A): A; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <A>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<A>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -79,8 +79,8 @@ var a: { foo<T>(x: T, y?: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T>(x: T, y?: T) { return x; } };
|
||||
>b : { foo: <T>(x: T, y?: T) => T; }
|
||||
>{ foo<T>(x: T, y?: T) { return x; } } : { foo: <T>(x: T, y?: T) => T; }
|
||||
>b : { foo<T>(x: T, y?: T): T; }
|
||||
>{ foo<T>(x: T, y?: T) { return x; } } : { foo<T>(x: T, y?: T): T; }
|
||||
>foo : <T>(x: T, y?: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
@ -160,17 +160,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T>(x: T, y?: T) => T; }): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T, y?: T) => T; }
|
||||
>b : { foo: <T>(x: T, y?: T) => T; }
|
||||
>foo4 : { (x: { foo<T>(x: T, y?: T): T; }): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : { foo<T>(x: T, y?: T): T; }
|
||||
>b : { foo<T>(x: T, y?: T): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T>(x: T, y?: T) => T; }): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T, y?: T) => T; }
|
||||
>b : { foo: <T>(x: T, y?: T) => T; }
|
||||
>foo4 : { (x: { foo<T>(x: T, y?: T): T; }): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : { foo<T>(x: T, y?: T): T; }
|
||||
>b : { foo<T>(x: T, y?: T): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T>(x: T, y?: T) => T; }): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>foo4 : { (x: { foo<T>(x: T, y?: T): T; }): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -272,17 +272,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<T>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T, y?: T) => T; }
|
||||
>b : { foo: <T>(x: T, y?: T) => T; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : { foo<T>(x: T, y?: T): T; }
|
||||
>b : { foo<T>(x: T, y?: T): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -328,17 +328,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>x : { foo: <T>(x: T, y?: T) => T; }
|
||||
>b : { foo: <T>(x: T, y?: T) => T; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : { foo<T>(x: T, y?: T): T; }
|
||||
>b : { foo<T>(x: T, y?: T): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo: <T>(x: T, y?: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { foo<T>(x: T, y?: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -85,8 +85,8 @@ var a: { foo<T, U>(x: T, y?: U): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T, U>(x: T, y?: U) { return x; } };
|
||||
>b : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>{ foo<T, U>(x: T, y?: U) { return x; } } : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>b : { foo<T, U>(x: T, y?: U): T; }
|
||||
>{ foo<T, U>(x: T, y?: U) { return x; } } : { foo<T, U>(x: T, y?: U): T; }
|
||||
>foo : <T, U>(x: T, y?: U) => T
|
||||
>T : T
|
||||
>U : U
|
||||
@ -167,17 +167,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y?: U) => T; }): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y?: U): T; }): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y?: U): T; }
|
||||
>b : { foo<T, U>(x: T, y?: U): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y?: U) => T; }): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y?: U): T; }): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y?: U): T; }
|
||||
>b : { foo<T, U>(x: T, y?: U): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y?: U) => T; }): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y?: U): T; }): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -279,17 +279,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, number>);
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : B<string, number>
|
||||
>B : B<T, U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y?: U): T; }
|
||||
>b : { foo<T, U>(x: T, y?: U): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string, number>);
|
||||
@ -335,17 +335,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, number>);
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : I<string, number>
|
||||
>I : I<T, U>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y?: U) => T; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y?: U): T; }
|
||||
>b : { foo<T, U>(x: T, y?: U): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y?: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y?: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -85,8 +85,8 @@ var a: { foo<T, U>(x: T, y?: U): T }
|
||||
>T : T
|
||||
|
||||
var b = { foo<T, U>(x: T, y: U) { return x; } };
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>{ foo<T, U>(x: T, y: U) { return x; } } : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
>{ foo<T, U>(x: T, y: U) { return x; } } : { foo<T, U>(x: T, y: U): T; }
|
||||
>foo : <T, U>(x: T, y: U) => T
|
||||
>T : T
|
||||
>U : U
|
||||
@ -167,17 +167,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { foo: <T, U>(x: T, y: U) => T; }): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo4 : { (x: { foo<T, U>(x: T, y: U): T; }): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: A);
|
||||
@ -279,17 +279,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, number>);
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : B<string, number>
|
||||
>B : B<T, U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string, number>);
|
||||
@ -335,17 +335,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, number>);
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : I<string, number>
|
||||
>I : I<T, U>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>x : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>b : { foo: <T, U>(x: T, y: U) => T; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : { foo<T, U>(x: T, y: U): T; }
|
||||
>b : { foo<T, U>(x: T, y: U): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo: <T, U>(x: T, y: U) => T; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { foo<T, U>(x: T, y: U): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -51,8 +51,8 @@ var a: { new<T extends Array<string>>(x: T): string }
|
||||
>T : T
|
||||
|
||||
var b = { new<T extends RegExp>(x: T) { return ''; } }; // not a construct signature, function called new
|
||||
>b : { new: <T extends RegExp>(x: T) => string; }
|
||||
>{ new<T extends RegExp>(x: T) { return ''; } } : { new: <T extends RegExp>(x: T) => string; }
|
||||
>b : { new<T extends RegExp>(x: T): string; }
|
||||
>{ new<T extends RegExp>(x: T) { return ''; } } : { new<T extends RegExp>(x: T): string; }
|
||||
>new : <T extends RegExp>(x: T) => string
|
||||
>T : T
|
||||
>RegExp : RegExp
|
||||
@ -122,17 +122,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T extends RegExp>(x: T) => string; }): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { new: <T extends RegExp>(x: T) => string; }
|
||||
>b : { new: <T extends RegExp>(x: T) => string; }
|
||||
>foo4 : { (x: { new<T extends RegExp>(x: T): string; }): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { new<T extends RegExp>(x: T): string; }
|
||||
>b : { new<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T extends RegExp>(x: T) => string; }): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { new: <T extends RegExp>(x: T) => string; }
|
||||
>b : { new: <T extends RegExp>(x: T) => string; }
|
||||
>foo4 : { (x: { new<T extends RegExp>(x: T): string; }): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { new<T extends RegExp>(x: T): string; }
|
||||
>b : { new<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T extends RegExp>(x: T) => string; }): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo4 : { (x: { new<T extends RegExp>(x: T): string; }): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Array<number>>);
|
||||
@ -183,18 +183,18 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Array<number>>);
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : B<number[]>
|
||||
>B : B<T>
|
||||
>Array : T[]
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { new: <T extends RegExp>(x: T) => string; }
|
||||
>b : { new: <T extends RegExp>(x: T) => string; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { new<T extends RegExp>(x: T): string; }
|
||||
>b : { new<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo11 : { (x: B<number[]>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Number>);
|
||||
@ -244,17 +244,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Number>);
|
||||
>foo14 : { (x: I<Number>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : I<Number>
|
||||
>I : I<T>
|
||||
>Number : Number
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Number>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>x : { new: <T extends RegExp>(x: T) => string; }
|
||||
>b : { new: <T extends RegExp>(x: T) => string; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : { new<T extends RegExp>(x: T): string; }
|
||||
>b : { new<T extends RegExp>(x: T): string; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Number>): any; (x: { new: <T extends RegExp>(x: T) => string; }): any; }
|
||||
>foo14 : { (x: I<Number>): any; (x: { new<T extends RegExp>(x: T): string; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ var a: { new<T>(x: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { new<T>(x: T): T { return null; } }; // not a construct signature, function called new
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>{ new<T>(x: T): T { return null; } } : { new: <T>(x: T) => T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
>{ new<T>(x: T): T { return null; } } : { new<T>(x: T): T; }
|
||||
>new : <T>(x: T) => T
|
||||
>T : T
|
||||
>x : T
|
||||
@ -114,31 +114,31 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T>(x: T) => T; }): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>x : { new: <T>(x: T) => T; }
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>foo4 : { (x: { new<T>(x: T): T; }): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : { new<T>(x: T): T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T>(x: T) => T; }): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>x : { new: <T>(x: T) => T; }
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>foo4 : { (x: { new<T>(x: T): T; }): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : { new<T>(x: T): T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T>(x: T) => T; }): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>foo4 : { (x: { new<T>(x: T): T; }): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo5(x: typeof a): number;
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new: <T>(x: T) => T; }): string; }
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new<T>(x: T): T; }): string; }
|
||||
>x : new <T>(x: T) => T
|
||||
>a : new <T>(x: T) => T
|
||||
|
||||
function foo5(x: typeof b): string; // ok
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new: <T>(x: T) => T; }): string; }
|
||||
>x : { new: <T>(x: T) => T; }
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new<T>(x: T): T; }): string; }
|
||||
>x : { new<T>(x: T): T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
|
||||
function foo5(x: any): any { }
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new: <T>(x: T) => T; }): string; }
|
||||
>foo5 : { (x: new <T>(x: T) => T): number; (x: { new<T>(x: T): T; }): string; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string>);
|
||||
@ -184,17 +184,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<T>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>x : { new: <T>(x: T) => T; }
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : { new<T>(x: T): T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -240,17 +240,17 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>x : { new: <T>(x: T) => T; }
|
||||
>b : { new: <T>(x: T) => T; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : { new<T>(x: T): T; }
|
||||
>b : { new<T>(x: T): T; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T) => T; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T): T; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -54,8 +54,8 @@ var a: { new<T extends Date>(x: T): T }
|
||||
>T : T
|
||||
|
||||
var b = { new<T extends Date>(x: T) { return null; } }; // not a construct signature, function called new
|
||||
>b : { new: <T extends Date>(x: T) => any; }
|
||||
>{ new<T extends Date>(x: T) { return null; } } : { new: <T extends Date>(x: T) => any; }
|
||||
>b : { new<T extends Date>(x: T): any; }
|
||||
>{ new<T extends Date>(x: T) { return null; } } : { new<T extends Date>(x: T): any; }
|
||||
>new : <T extends Date>(x: T) => any
|
||||
>T : T
|
||||
>Date : Date
|
||||
@ -125,17 +125,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T extends Date>(x: T) => any; }): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { new: <T extends Date>(x: T) => any; }
|
||||
>b : { new: <T extends Date>(x: T) => any; }
|
||||
>foo4 : { (x: { new<T extends Date>(x: T): any; }): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : { new<T extends Date>(x: T): any; }
|
||||
>b : { new<T extends Date>(x: T): any; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T extends Date>(x: T) => any; }): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { new: <T extends Date>(x: T) => any; }
|
||||
>b : { new: <T extends Date>(x: T) => any; }
|
||||
>foo4 : { (x: { new<T extends Date>(x: T): any; }): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : { new<T extends Date>(x: T): any; }
|
||||
>b : { new<T extends Date>(x: T): any; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T extends Date>(x: T) => any; }): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo4 : { (x: { new<T extends Date>(x: T): any; }): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<Date>);
|
||||
@ -186,18 +186,18 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<Date>);
|
||||
>foo11 : { (x: B<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : B<Date>
|
||||
>B : B<T>
|
||||
>Date : Date
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { new: <T extends Date>(x: T) => any; }
|
||||
>b : { new: <T extends Date>(x: T) => any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : { new<T extends Date>(x: T): any; }
|
||||
>b : { new<T extends Date>(x: T): any; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo11 : { (x: B<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<Date>);
|
||||
@ -247,18 +247,18 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<Date>);
|
||||
>foo14 : { (x: I<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : I<Date>
|
||||
>I : I<T>
|
||||
>Date : Date
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>x : { new: <T extends Date>(x: T) => any; }
|
||||
>b : { new: <T extends Date>(x: T) => any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : { new<T extends Date>(x: T): any; }
|
||||
>b : { new<T extends Date>(x: T): any; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<Date>): any; (x: { new: <T extends Date>(x: T) => any; }): any; }
|
||||
>foo14 : { (x: I<Date>): any; (x: { new<T extends Date>(x: T): any; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo15(x: I2);
|
||||
|
||||
@ -68,8 +68,8 @@ var a: { new <Z, A, B, CC, D>(x: Z): C<Z, A, B>; }
|
||||
>B : B
|
||||
|
||||
var b = { new<A, B, C, D, E, F>(x: A) { return x; } };
|
||||
>b : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>{ new<A, B, C, D, E, F>(x: A) { return x; } } : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>{ new<A, B, C, D, E, F>(x: A) { return x; } } : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>new : <A, B, C, D, E, F>(x: A) => A
|
||||
>A : A
|
||||
>B : B
|
||||
@ -138,17 +138,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo4 : { (x: { new<A, B, C, D, E, F>(x: A): A; }): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo4 : { (x: { new<A, B, C, D, E, F>(x: A): A; }): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo4 : { (x: { new<A, B, C, D, E, F>(x: A): A; }): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string, string>);
|
||||
@ -196,17 +196,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, boolean>);
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : B<string, boolean>
|
||||
>B : B<U, V>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo11 : { (x: B<string, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<B<string, number>, number, Date, string>);
|
||||
@ -259,18 +259,18 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, Date, RegExp, boolean>);
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : I<string, Date, RegExp, boolean>
|
||||
>I : I<X, Y, Z, A>
|
||||
>Date : Date
|
||||
>RegExp : RegExp
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>x : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>b : { new: <A, B, C, D, E, F>(x: A) => A; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
>b : { new<A, B, C, D, E, F>(x: A): A; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new: <A, B, C, D, E, F>(x: A) => A; }): any; }
|
||||
>foo14 : { (x: I<string, Date, RegExp, boolean>): any; (x: { new<A, B, C, D, E, F>(x: A): A; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@ var a: { new<Z>(x: Z): B<Z> }
|
||||
>Z : Z
|
||||
|
||||
var b = { new<A>(x: A) { return new C<A>(x); } };
|
||||
>b : { new: <A>(x: A) => C<A>; }
|
||||
>{ new<A>(x: A) { return new C<A>(x); } } : { new: <A>(x: A) => C<A>; }
|
||||
>b : { new<A>(x: A): C<A>; }
|
||||
>{ new<A>(x: A) { return new C<A>(x); } } : { new<A>(x: A): C<A>; }
|
||||
>new : <A>(x: A) => C<A>
|
||||
>A : A
|
||||
>x : A
|
||||
@ -118,17 +118,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <A>(x: A) => C<A>; }): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>x : { new: <A>(x: A) => C<A>; }
|
||||
>b : { new: <A>(x: A) => C<A>; }
|
||||
>foo4 : { (x: { new<A>(x: A): C<A>; }): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : { new<A>(x: A): C<A>; }
|
||||
>b : { new<A>(x: A): C<A>; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <A>(x: A) => C<A>; }): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>x : { new: <A>(x: A) => C<A>; }
|
||||
>b : { new: <A>(x: A) => C<A>; }
|
||||
>foo4 : { (x: { new<A>(x: A): C<A>; }): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : { new<A>(x: A): C<A>; }
|
||||
>b : { new<A>(x: A): C<A>; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <A>(x: A) => C<A>; }): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>foo4 : { (x: { new<A>(x: A): C<A>; }): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string>);
|
||||
@ -174,17 +174,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>x : { new: <A>(x: A) => C<A>; }
|
||||
>b : { new: <A>(x: A) => C<A>; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : { new<A>(x: A): C<A>; }
|
||||
>b : { new<A>(x: A): C<A>; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -230,16 +230,16 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<X>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>x : { new: <A>(x: A) => C<A>; }
|
||||
>b : { new: <A>(x: A) => C<A>; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : { new<A>(x: A): C<A>; }
|
||||
>b : { new<A>(x: A): C<A>; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <A>(x: A) => C<A>; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<A>(x: A): C<A>; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -62,8 +62,8 @@ var a: { new<T>(x: T, y?: T): B<T> }
|
||||
>T : T
|
||||
|
||||
var b = { new<T>(x: T, y?: T) { return new C<T>(x, y); } }; // not a construct signature, function called new
|
||||
>b : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>{ new<T>(x: T, y?: T) { return new C<T>(x, y); } } : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>b : { new<T>(x: T, y?: T): C<T>; }
|
||||
>{ new<T>(x: T, y?: T) { return new C<T>(x, y); } } : { new<T>(x: T, y?: T): C<T>; }
|
||||
>new : <T>(x: T, y?: T) => C<T>
|
||||
>T : T
|
||||
>x : T
|
||||
@ -133,17 +133,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T>(x: T, y?: T) => C<T>; }): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>x : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>b : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>foo4 : { (x: { new<T>(x: T, y?: T): C<T>; }): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : { new<T>(x: T, y?: T): C<T>; }
|
||||
>b : { new<T>(x: T, y?: T): C<T>; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T>(x: T, y?: T) => C<T>; }): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>x : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>b : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>foo4 : { (x: { new<T>(x: T, y?: T): C<T>; }): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : { new<T>(x: T, y?: T): C<T>; }
|
||||
>b : { new<T>(x: T, y?: T): C<T>; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T>(x: T, y?: T) => C<T>; }): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>foo4 : { (x: { new<T>(x: T, y?: T): C<T>; }): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string>): string;
|
||||
@ -189,17 +189,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string>);
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : B<string>
|
||||
>B : B<T>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>x : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>b : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : { new<T>(x: T, y?: T): C<T>; }
|
||||
>b : { new<T>(x: T, y?: T): C<T>; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>foo11 : { (x: B<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string>);
|
||||
@ -245,16 +245,16 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string>);
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : I<string>
|
||||
>I : I<T>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>x : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>b : { new: <T>(x: T, y?: T) => C<T>; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : { new<T>(x: T, y?: T): C<T>; }
|
||||
>b : { new<T>(x: T, y?: T): C<T>; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string>): any; (x: { new: <T>(x: T, y?: T) => C<T>; }): any; }
|
||||
>foo14 : { (x: I<string>): any; (x: { new<T>(x: T, y?: T): C<T>; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -70,8 +70,8 @@ var a: { new<T, U>(x: T, y?: U): B<T,U> }
|
||||
>U : U
|
||||
|
||||
var b = { new<T, U>(x: T, y?: U) { return new C<T, U>(x, y); } }; // not a construct signature, function called new
|
||||
>b : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>{ new<T, U>(x: T, y?: U) { return new C<T, U>(x, y); } } : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>{ new<T, U>(x: T, y?: U) { return new C<T, U>(x, y); } } : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>new : <T, U>(x: T, y?: U) => C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
@ -143,17 +143,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string, number>);
|
||||
@ -199,17 +199,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, number>);
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : B<string, number>
|
||||
>B : B<T, U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string, number>);
|
||||
@ -255,16 +255,16 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, number>);
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : I<string, number>
|
||||
>I : I<T, U>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y?: U) => C<T, U>; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y?: U): C<T, U>; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y?: U) => C<T, U>; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y?: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -70,8 +70,8 @@ var a: { new <T, U>(x: T, y?: U): B<T, U> };
|
||||
>U : U
|
||||
|
||||
var b = { new<T, U>(x: T, y: U) { return new C<T, U>(x, y); } }; // not a construct signature, function called new
|
||||
>b : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>{ new<T, U>(x: T, y: U) { return new C<T, U>(x, y); } } : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>{ new<T, U>(x: T, y: U) { return new C<T, U>(x, y); } } : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>new : <T, U>(x: T, y: U) => C<T, U>
|
||||
>T : T
|
||||
>U : U
|
||||
@ -143,17 +143,17 @@ function foo3(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo4(x: typeof b);
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
|
||||
function foo4(x: typeof b); // error
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
|
||||
function foo4(x: any) { }
|
||||
>foo4 : { (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>foo4 : { (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo8(x: B<string, number>);
|
||||
@ -199,17 +199,17 @@ function foo10(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo11(x: B<string, number>);
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : B<string, number>
|
||||
>B : B<T, U>
|
||||
|
||||
function foo11(x: typeof b); // ok
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
|
||||
function foo11(x: any) { }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>foo11 : { (x: B<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
function foo12(x: I<string, number>);
|
||||
@ -255,16 +255,16 @@ function foo13(x: any) { }
|
||||
>x : any
|
||||
|
||||
function foo14(x: I<string, number>);
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : I<string, number>
|
||||
>I : I<T, U>
|
||||
|
||||
function foo14(x: typeof b); // ok
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>x : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>b : { new: <T, U>(x: T, y: U) => C<T, U>; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
>b : { new<T, U>(x: T, y: U): C<T, U>; }
|
||||
|
||||
function foo14(x: any) { }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new: <T, U>(x: T, y: U) => C<T, U>; }): any; }
|
||||
>foo14 : { (x: I<string, number>): any; (x: { new<T, U>(x: T, y: U): C<T, U>; }): any; }
|
||||
>x : any
|
||||
|
||||
|
||||
@ -58,8 +58,8 @@ var a: {
|
||||
}
|
||||
|
||||
var b = {
|
||||
>b : { foo: (x: any) => any; a: (x: any) => any; b: (x: any) => any; }
|
||||
>{ foo(x) { return x; }, a: function foo(x) { return x; }, b: (x) => x} : { foo: (x: any) => any; a: (x: any) => any; b: (x: any) => any; }
|
||||
>b : { foo(x: any): any; a: (x: any) => any; b: (x: any) => any; }
|
||||
>{ foo(x) { return x; }, a: function foo(x) { return x; }, b: (x) => x} : { foo(x: any): any; a: (x: any) => any; b: (x: any) => any; }
|
||||
|
||||
foo(x) {
|
||||
>foo : (x: any) => any
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment1.ts ===
|
||||
var v = { foo() { } };
|
||||
>v : { foo: () => void; }
|
||||
>{ foo() { } } : { foo: () => void; }
|
||||
>v : { foo(): void; }
|
||||
>{ foo() { } } : { foo(): void; }
|
||||
>foo : () => void
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment2.ts ===
|
||||
var v = { 0() { } };
|
||||
>v : { 0: () => void; }
|
||||
>{ 0() { } } : { 0: () => void; }
|
||||
>v : { 0(): void; }
|
||||
>{ 0() { } } : { 0(): void; }
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment3.ts ===
|
||||
var v = { "foo"() { } };
|
||||
>v : { "foo": () => void; }
|
||||
>{ "foo"() { } } : { "foo": () => void; }
|
||||
>v : { "foo"(): void; }
|
||||
>{ "foo"() { } } : { "foo"(): void; }
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/PropertyAssignments/parserFunctionPropertyAssignment4.ts ===
|
||||
var v = { 0<T>() { } };
|
||||
>v : { 0: <T>() => void; }
|
||||
>{ 0<T>() { } } : { 0: <T>() => void; }
|
||||
>v : { 0<T>(): void; }
|
||||
>{ 0<T>() { } } : { 0<T>(): void; }
|
||||
>T : T
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/sourceMapValidationFunctionPropertyAssignment.ts ===
|
||||
var x = { n() { } };
|
||||
>x : { n: () => void; }
|
||||
>{ n() { } } : { n: () => void; }
|
||||
>x : { n(): void; }
|
||||
>{ n() { } } : { n(): void; }
|
||||
>n : () => void
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(71,5): error TS2411: Property 'foo' of type '() => string' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(73,5): error TS2411: Property '"4.0"' of type 'number' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(74,5): error TS2411: Property 'f' of type 'MyString' is not assignable to string index type 'string'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string | number | MyString | (() => void)' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
@ -160,7 +160,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
|
||||
// error
|
||||
var b: { [x: string]: string; } = {
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo: () => string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: string | number | MyString | (() => void); 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'string | number | MyString | (() => void)' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@ -29,8 +29,8 @@ class MyClass {
|
||||
|
||||
//type of 'this' in an object literal property of a function type is Any
|
||||
var obj = {
|
||||
>obj : { f: () => any; }
|
||||
>{ f() { return this.spaaace; }} : { f: () => any; }
|
||||
>obj : { f(): any; }
|
||||
>{ f() { return this.spaaace; }} : { f(): any; }
|
||||
|
||||
f() {
|
||||
>f : () => any
|
||||
@ -42,6 +42,6 @@ var obj = {
|
||||
}
|
||||
};
|
||||
var obj: { f: () => any; };
|
||||
>obj : { f: () => any; }
|
||||
>obj : { f(): any; }
|
||||
>f : () => any
|
||||
|
||||
|
||||
@ -83,8 +83,8 @@ class C<T> {
|
||||
}
|
||||
|
||||
var aa = {
|
||||
>aa : { id: number; biz: () => void; }
|
||||
>{ id:12, biz() { throw this; }} : { id: number; biz: () => void; }
|
||||
>aa : { id: number; biz(): void; }
|
||||
>{ id:12, biz() { throw this; }} : { id: number; biz(): void; }
|
||||
|
||||
id:12,
|
||||
>id : number
|
||||
|
||||
@ -14,8 +14,8 @@ var var1: string | number;
|
||||
>var1 : string | number
|
||||
|
||||
var obj1 = {
|
||||
>obj1 : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>{ // Inside method method(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string return strOrNum; }, get prop() { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string return strOrNum; }, set prop(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string }} : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>obj1 : { method(param: string | number): string | number; prop: string | number; }
|
||||
>{ // Inside method method(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string return strOrNum; }, get prop() { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string return strOrNum; }, set prop(param: string | number) { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string // variables in function declaration var var2: string | number; num = typeof var2 === "string" && var2.length; // string // parameters in function declaration num = typeof param === "string" && param.length; // string }} : { method(param: string | number): string | number; prop: string | number; }
|
||||
|
||||
// Inside method
|
||||
method(param: string | number) {
|
||||
@ -152,12 +152,12 @@ strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum);
|
||||
>typeof obj1.method(strOrNum) : string
|
||||
>obj1.method(strOrNum) : string | number
|
||||
>obj1.method : (param: string | number) => string | number
|
||||
>obj1 : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>obj1 : { method(param: string | number): string | number; prop: string | number; }
|
||||
>method : (param: string | number) => string | number
|
||||
>strOrNum : string | number
|
||||
>obj1.method(strOrNum) : string | number
|
||||
>obj1.method : (param: string | number) => string | number
|
||||
>obj1 : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>obj1 : { method(param: string | number): string | number; prop: string | number; }
|
||||
>method : (param: string | number) => string | number
|
||||
>strOrNum : string | number
|
||||
|
||||
@ -169,9 +169,9 @@ strOrNum = typeof obj1.prop === "string" && obj1.prop;
|
||||
>typeof obj1.prop === "string" : boolean
|
||||
>typeof obj1.prop : string
|
||||
>obj1.prop : string | number
|
||||
>obj1 : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>obj1 : { method(param: string | number): string | number; prop: string | number; }
|
||||
>prop : string | number
|
||||
>obj1.prop : string | number
|
||||
>obj1 : { method: (param: string | number) => string | number; prop: string | number; }
|
||||
>obj1 : { method(param: string | number): string | number; prop: string | number; }
|
||||
>prop : string | number
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user