Skip to content

Commit 994f390

Browse files
committed
Revert "Propagate outer type parameters of single signature types (#57403)"
This reverts commit e1874f3.
1 parent 11e7932 commit 994f390

9 files changed

+18
-321
lines changed

src/compiler/checker.ts

Lines changed: 18 additions & 75 deletions
Large diffs are not rendered by default.

src/compiler/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6508,7 +6508,6 @@ export const enum ObjectFlags {
65086508
ContainsSpread = 1 << 21, // Object literal contains spread operation
65096509
ObjectRestType = 1 << 22, // Originates in object rest declaration
65106510
InstantiationExpressionType = 1 << 23, // Originates in instantiation expression
6511-
SingleSignatureType = 1 << 27, // A single signature type extracted from a potentially broader type
65126511
/** @internal */
65136512
IsClassInstanceClone = 1 << 24, // Type is a clone of a class instance type
65146513
// Flags that require TypeFlags.Object and ObjectFlags.Reference
@@ -6723,12 +6722,6 @@ export interface AnonymousType extends ObjectType {
67236722
instantiations?: Map<string, Type>; // Instantiations of generic type alias (undefined if non-generic)
67246723
}
67256724

6726-
/** @internal */
6727-
// A SingleSignatureType may have bespoke outer type parameters to handle free type variable inferences
6728-
export interface SingleSignatureType extends AnonymousType {
6729-
outerTypeParameters?: TypeParameter[];
6730-
}
6731-
67326725
/** @internal */
67336726
export interface InstantiationExpressionType extends AnonymousType {
67346727
node: NodeWithTypeArguments;
@@ -7014,8 +7007,6 @@ export interface Signature {
70147007
isolatedSignatureType?: ObjectType; // A manufactured type that just contains the signature for purposes of signature comparison
70157008
/** @internal */
70167009
instantiations?: Map<string, Signature>; // Generic signature instantiation cache
7017-
/** @internal */
7018-
implementationSignatureCache?: Signature; // Copy of the signature with fresh type parameters to use in checking the body of a potentially self-referential generic function (deferred)
70197010
}
70207011

70217012
export const enum IndexKind {

tests/baselines/reference/api/typescript.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6709,7 +6709,6 @@ declare namespace ts {
67096709
ContainsSpread = 2097152,
67106710
ObjectRestType = 4194304,
67116711
InstantiationExpressionType = 8388608,
6712-
SingleSignatureType = 134217728,
67136712
}
67146713
interface ObjectType extends Type {
67156714
objectFlags: ObjectFlags;

tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

tests/baselines/reference/genericCallWithinOwnBodyCastTypeParameterIdentity.symbols

Lines changed: 0 additions & 104 deletions
This file was deleted.

tests/baselines/reference/nestedGenericSpreadInference.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/baselines/reference/nestedGenericSpreadInference.symbols

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/cases/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/cases/compiler/nestedGenericSpreadInference.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)