Bail when comparing a specialized form of an already ongoing comparison (#42727)

* When structurally comparing similar types, check if we are already in the middle of a more general comparison of those same types

* Do the same, but with only string manipulations
This commit is contained in:
Wesley Wigham 2021-02-23 16:13:59 -08:00 committed by GitHub
parent c117c266e0
commit 6da262591c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 869 additions and 2 deletions

View File

@ -17750,9 +17750,16 @@ namespace ts {
targetStack = [];
}
else {
// generate a key where all type parameter id positions are replaced with unconstrained type parameter ids
// this isn't perfect - nested type references passed as type arguments will muck up the indexes and thus
// prevent finding matches- but it should hit up the common cases
const broadestEquivalentId = id.split(",").map(i => i.replace(/-\d+/g, (_match, offset: number) => {
const index = length(id.slice(0, offset).match(/[-=]/g) || undefined);
return `=${index}`;
})).join(",");
for (let i = 0; i < maybeCount; i++) {
// If source and target are already being compared, consider them related with assumptions
if (id === maybeKeys[i]) {
if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
return Ternary.Maybe;
}
}
@ -19192,7 +19199,7 @@ namespace ts {
}
function isTypeReferenceWithGenericArguments(type: Type): boolean {
return isNonDeferredTypeReference(type) && some(getTypeArguments(type), t => isUnconstrainedTypeParameter(t) || isTypeReferenceWithGenericArguments(t));
return isNonDeferredTypeReference(type) && some(getTypeArguments(type), t => !!(t.flags & TypeFlags.TypeParameter) || isTypeReferenceWithGenericArguments(t));
}
/**

View File

@ -0,0 +1,162 @@
//// [performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts]
export declare type ThenArg<T> = T extends any ? any : T extends PromiseLike<infer U> ? U : T;
export interface InterfaceA<T> {
filter(callback: (newValue: T, oldValue: T) => boolean): InterfaceA<T>;
map<D>(callback: (value: T) => D): InterfaceA<D>;
await<R extends ThenArg<T>>(): InterfaceA<R>;
awaitLatest<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered2<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered3<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered4<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered5<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered6<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered7<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered8<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered9<R extends ThenArg<T>>(): InterfaceA<R>;
}
export interface InterfaceB<T> extends InterfaceA<T> {
map<D>(callback: (value: T) => D): InterfaceB<D>;
await<R extends ThenArg<T>>(): InterfaceB<R>;
awaitLatest<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered2<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered3<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered4<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered5<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered6<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered7<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered8<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered9<R extends ThenArg<T>>(): InterfaceB<R>;
}
export class A<T> implements InterfaceB<T> {
public filter(callback: (newValue: T, oldValue: T) => boolean): B<T> {
return undefined as any;
}
public map<D>(callback: (value: T) => D): B<D> {
return undefined as any;
}
public await<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered2<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered3<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered4<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered5<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered6<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered7<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered8<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered9<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitLatest<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
}
export class B<T> extends A<T> { }
//// [performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.js]
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
exports.__esModule = true;
exports.B = exports.A = void 0;
var A = /** @class */ (function () {
function A() {
}
A.prototype.filter = function (callback) {
return undefined;
};
A.prototype.map = function (callback) {
return undefined;
};
A.prototype.await = function () {
return undefined;
};
A.prototype.awaitOrdered = function () {
return undefined;
};
A.prototype.awaitOrdered2 = function () {
return undefined;
};
A.prototype.awaitOrdered3 = function () {
return undefined;
};
A.prototype.awaitOrdered4 = function () {
return undefined;
};
A.prototype.awaitOrdered5 = function () {
return undefined;
};
A.prototype.awaitOrdered6 = function () {
return undefined;
};
A.prototype.awaitOrdered7 = function () {
return undefined;
};
A.prototype.awaitOrdered8 = function () {
return undefined;
};
A.prototype.awaitOrdered9 = function () {
return undefined;
};
A.prototype.awaitLatest = function () {
return undefined;
};
return A;
}());
exports.A = A;
var B = /** @class */ (function (_super) {
__extends(B, _super);
function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
exports.B = B;

View File

@ -0,0 +1,402 @@
=== tests/cases/compiler/performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts ===
export declare type ThenArg<T> = T extends any ? any : T extends PromiseLike<infer U> ? U : T;
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 28))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 28))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 28))
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
>U : Symbol(U, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 82))
>U : Symbol(U, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 82))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 28))
export interface InterfaceA<T> {
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
filter(callback: (newValue: T, oldValue: T) => boolean): InterfaceA<T>;
>filter : Symbol(InterfaceA.filter, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 32))
>callback : Symbol(callback, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 3, 11))
>newValue : Symbol(newValue, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 3, 22))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>oldValue : Symbol(oldValue, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 3, 34))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
map<D>(callback: (value: T) => D): InterfaceA<D>;
>map : Symbol(InterfaceA.map, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 3, 75))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 8))
>callback : Symbol(callback, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 11))
>value : Symbol(value, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 22))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 8))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 8))
await<R extends ThenArg<T>>(): InterfaceA<R>;
>await : Symbol(InterfaceA.await, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 4, 53))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 5, 10))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 5, 10))
awaitLatest<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitLatest : Symbol(InterfaceA.awaitLatest, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 5, 49))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 6, 16))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 6, 16))
awaitOrdered<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered : Symbol(InterfaceA.awaitOrdered, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 6, 55))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 7, 17))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 7, 17))
awaitOrdered2<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered2 : Symbol(InterfaceA.awaitOrdered2, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 7, 56))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 8, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 8, 18))
awaitOrdered3<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered3 : Symbol(InterfaceA.awaitOrdered3, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 8, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 9, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 9, 18))
awaitOrdered4<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered4 : Symbol(InterfaceA.awaitOrdered4, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 9, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 10, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 10, 18))
awaitOrdered5<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered5 : Symbol(InterfaceA.awaitOrdered5, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 10, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 11, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 11, 18))
awaitOrdered6<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered6 : Symbol(InterfaceA.awaitOrdered6, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 11, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 12, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 12, 18))
awaitOrdered7<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered7 : Symbol(InterfaceA.awaitOrdered7, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 12, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 13, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 13, 18))
awaitOrdered8<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered8 : Symbol(InterfaceA.awaitOrdered8, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 13, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 14, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 14, 18))
awaitOrdered9<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered9 : Symbol(InterfaceA.awaitOrdered9, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 14, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 15, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 2, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 15, 18))
}
export interface InterfaceB<T> extends InterfaceA<T> {
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceA : Symbol(InterfaceA, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 94))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
map<D>(callback: (value: T) => D): InterfaceB<D>;
>map : Symbol(InterfaceB.map, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 54))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 8))
>callback : Symbol(callback, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 11))
>value : Symbol(value, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 22))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 8))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 8))
await<R extends ThenArg<T>>(): InterfaceB<R>;
>await : Symbol(InterfaceB.await, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 19, 53))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 20, 10))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 20, 10))
awaitLatest<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitLatest : Symbol(InterfaceB.awaitLatest, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 20, 49))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 21, 16))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 21, 16))
awaitOrdered<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered : Symbol(InterfaceB.awaitOrdered, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 21, 55))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 22, 17))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 22, 17))
awaitOrdered2<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered2 : Symbol(InterfaceB.awaitOrdered2, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 22, 56))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 23, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 23, 18))
awaitOrdered3<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered3 : Symbol(InterfaceB.awaitOrdered3, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 23, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 24, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 24, 18))
awaitOrdered4<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered4 : Symbol(InterfaceB.awaitOrdered4, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 24, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 25, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 25, 18))
awaitOrdered5<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered5 : Symbol(InterfaceB.awaitOrdered5, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 25, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 26, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 26, 18))
awaitOrdered6<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered6 : Symbol(InterfaceB.awaitOrdered6, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 26, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 27, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 27, 18))
awaitOrdered7<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered7 : Symbol(InterfaceB.awaitOrdered7, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 27, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 28, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 28, 18))
awaitOrdered8<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered8 : Symbol(InterfaceB.awaitOrdered8, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 28, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 29, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 29, 18))
awaitOrdered9<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered9 : Symbol(InterfaceB.awaitOrdered9, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 29, 57))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 30, 18))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 18, 28))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 30, 18))
}
export class A<T> implements InterfaceB<T> {
>A : Symbol(A, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 31, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>InterfaceB : Symbol(InterfaceB, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 16, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
public filter(callback: (newValue: T, oldValue: T) => boolean): B<T> {
>filter : Symbol(A.filter, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 44))
>callback : Symbol(callback, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 34, 18))
>newValue : Symbol(newValue, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 34, 29))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>oldValue : Symbol(oldValue, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 34, 41))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
return undefined as any;
>undefined : Symbol(undefined)
}
public map<D>(callback: (value: T) => D): B<D> {
>map : Symbol(A.map, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 36, 5))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 38, 15))
>callback : Symbol(callback, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 38, 18))
>value : Symbol(value, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 38, 29))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 38, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>D : Symbol(D, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 38, 15))
return undefined as any;
>undefined : Symbol(undefined)
}
public await<R extends ThenArg<T>>(): B<R> {
>await : Symbol(A.await, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 40, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 42, 17))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 42, 17))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered<R extends ThenArg<T>>(): B<R> {
>awaitOrdered : Symbol(A.awaitOrdered, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 44, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 46, 24))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 46, 24))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered2<R extends ThenArg<T>>(): B<R> {
>awaitOrdered2 : Symbol(A.awaitOrdered2, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 48, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 50, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 50, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered3<R extends ThenArg<T>>(): B<R> {
>awaitOrdered3 : Symbol(A.awaitOrdered3, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 52, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 54, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 54, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered4<R extends ThenArg<T>>(): B<R> {
>awaitOrdered4 : Symbol(A.awaitOrdered4, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 56, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 58, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 58, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered5<R extends ThenArg<T>>(): B<R> {
>awaitOrdered5 : Symbol(A.awaitOrdered5, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 60, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 62, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 62, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered6<R extends ThenArg<T>>(): B<R> {
>awaitOrdered6 : Symbol(A.awaitOrdered6, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 64, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 66, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 66, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered7<R extends ThenArg<T>>(): B<R> {
>awaitOrdered7 : Symbol(A.awaitOrdered7, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 68, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 70, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 70, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered8<R extends ThenArg<T>>(): B<R> {
>awaitOrdered8 : Symbol(A.awaitOrdered8, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 72, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 74, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 74, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitOrdered9<R extends ThenArg<T>>(): B<R> {
>awaitOrdered9 : Symbol(A.awaitOrdered9, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 76, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 78, 25))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 78, 25))
return undefined as any;
>undefined : Symbol(undefined)
}
public awaitLatest<R extends ThenArg<T>>(): B<R> {
>awaitLatest : Symbol(A.awaitLatest, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 80, 5))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 82, 23))
>ThenArg : Symbol(ThenArg, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 0, 0))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 33, 15))
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>R : Symbol(R, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 82, 23))
return undefined as any;
>undefined : Symbol(undefined)
}
}
export class B<T> extends A<T> { }
>B : Symbol(B, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 85, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 87, 15))
>A : Symbol(A, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 31, 1))
>T : Symbol(T, Decl(performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts, 87, 15))

View File

@ -0,0 +1,207 @@
=== tests/cases/compiler/performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.ts ===
export declare type ThenArg<T> = T extends any ? any : T extends PromiseLike<infer U> ? U : T;
>ThenArg : ThenArg<T>
export interface InterfaceA<T> {
filter(callback: (newValue: T, oldValue: T) => boolean): InterfaceA<T>;
>filter : (callback: (newValue: T, oldValue: T) => boolean) => InterfaceA<T>
>callback : (newValue: T, oldValue: T) => boolean
>newValue : T
>oldValue : T
map<D>(callback: (value: T) => D): InterfaceA<D>;
>map : <D>(callback: (value: T) => D) => InterfaceA<D>
>callback : (value: T) => D
>value : T
await<R extends ThenArg<T>>(): InterfaceA<R>;
>await : <R extends ThenArg<T>>() => InterfaceA<R>
awaitLatest<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitLatest : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered2<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered2 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered3<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered3 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered4<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered4 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered5<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered5 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered6<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered6 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered7<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered7 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered8<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered8 : <R extends ThenArg<T>>() => InterfaceA<R>
awaitOrdered9<R extends ThenArg<T>>(): InterfaceA<R>;
>awaitOrdered9 : <R extends ThenArg<T>>() => InterfaceA<R>
}
export interface InterfaceB<T> extends InterfaceA<T> {
map<D>(callback: (value: T) => D): InterfaceB<D>;
>map : <D>(callback: (value: T) => D) => InterfaceB<D>
>callback : (value: T) => D
>value : T
await<R extends ThenArg<T>>(): InterfaceB<R>;
>await : <R extends ThenArg<T>>() => InterfaceB<R>
awaitLatest<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitLatest : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered2<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered2 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered3<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered3 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered4<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered4 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered5<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered5 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered6<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered6 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered7<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered7 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered8<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered8 : <R extends ThenArg<T>>() => InterfaceB<R>
awaitOrdered9<R extends ThenArg<T>>(): InterfaceB<R>;
>awaitOrdered9 : <R extends ThenArg<T>>() => InterfaceB<R>
}
export class A<T> implements InterfaceB<T> {
>A : A<T>
public filter(callback: (newValue: T, oldValue: T) => boolean): B<T> {
>filter : (callback: (newValue: T, oldValue: T) => boolean) => B<T>
>callback : (newValue: T, oldValue: T) => boolean
>newValue : T
>oldValue : T
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public map<D>(callback: (value: T) => D): B<D> {
>map : <D>(callback: (value: T) => D) => B<D>
>callback : (value: T) => D
>value : T
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public await<R extends ThenArg<T>>(): B<R> {
>await : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered<R extends ThenArg<T>>(): B<R> {
>awaitOrdered : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered2<R extends ThenArg<T>>(): B<R> {
>awaitOrdered2 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered3<R extends ThenArg<T>>(): B<R> {
>awaitOrdered3 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered4<R extends ThenArg<T>>(): B<R> {
>awaitOrdered4 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered5<R extends ThenArg<T>>(): B<R> {
>awaitOrdered5 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered6<R extends ThenArg<T>>(): B<R> {
>awaitOrdered6 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered7<R extends ThenArg<T>>(): B<R> {
>awaitOrdered7 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered8<R extends ThenArg<T>>(): B<R> {
>awaitOrdered8 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitOrdered9<R extends ThenArg<T>>(): B<R> {
>awaitOrdered9 : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
public awaitLatest<R extends ThenArg<T>>(): B<R> {
>awaitLatest : <R extends ThenArg<T>>() => B<R>
return undefined as any;
>undefined as any : any
>undefined : undefined
}
}
export class B<T> extends A<T> { }
>B : B<T>
>A : A<T>

View File

@ -0,0 +1,89 @@
// @strict: true
export declare type ThenArg<T> = T extends any ? any : T extends PromiseLike<infer U> ? U : T;
export interface InterfaceA<T> {
filter(callback: (newValue: T, oldValue: T) => boolean): InterfaceA<T>;
map<D>(callback: (value: T) => D): InterfaceA<D>;
await<R extends ThenArg<T>>(): InterfaceA<R>;
awaitLatest<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered2<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered3<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered4<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered5<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered6<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered7<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered8<R extends ThenArg<T>>(): InterfaceA<R>;
awaitOrdered9<R extends ThenArg<T>>(): InterfaceA<R>;
}
export interface InterfaceB<T> extends InterfaceA<T> {
map<D>(callback: (value: T) => D): InterfaceB<D>;
await<R extends ThenArg<T>>(): InterfaceB<R>;
awaitLatest<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered2<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered3<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered4<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered5<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered6<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered7<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered8<R extends ThenArg<T>>(): InterfaceB<R>;
awaitOrdered9<R extends ThenArg<T>>(): InterfaceB<R>;
}
export class A<T> implements InterfaceB<T> {
public filter(callback: (newValue: T, oldValue: T) => boolean): B<T> {
return undefined as any;
}
public map<D>(callback: (value: T) => D): B<D> {
return undefined as any;
}
public await<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered2<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered3<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered4<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered5<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered6<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered7<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered8<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitOrdered9<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
public awaitLatest<R extends ThenArg<T>>(): B<R> {
return undefined as any;
}
}
export class B<T> extends A<T> { }