Skip to content

Commit 7b2ace0

Browse files
committed
Swap Extract & Exclude to use intersection/negation
1 parent 051571d commit 7b2ace0

35 files changed

Lines changed: 816 additions & 150 deletions

File tree

‎tsc/internal/bundled/libs/lib.es5.d.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,14 +1613,14 @@ type Record<K extends keyof any, T> = {
16131613
};
16141614

16151615
/**
1616-
* Exclude from T those types that are assignable to U
1616+
* Construct the type of values in T that are not in U
16171617
*/
1618-
type Exclude<T, U> = T extends U ? never : T;
1618+
type Exclude<T, U> = T & not U;
16191619

16201620
/**
1621-
* Extract from T those types that are assignable to U
1621+
* Construct the type of values common to T and U
16221622
*/
1623-
type Extract<T, U> = T extends U ? T : never;
1623+
type Extract<T, U> = T & U;
16241624

16251625
/**
16261626
* Construct a type with the properties of T except for those in type K.

‎tsc/testdata/baselines/reference/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth
22
Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
33
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
44
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
5-
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
6-
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
7-
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
8-
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
9-
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
10-
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
5+
Type '(string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]) | (number extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & number] extends GetProps<C>[keyof TInjectedProps & number] ? GetProps<C>[keyof TInjectedProps & number] : TInjectedProps[keyof TInjectedProps & number] : GetProps<C>[number]) | (symbol extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & symbol] extends GetProps<C>[keyof TInjectedProps & symbol] ? GetProps<C>[keyof TInjectedProps & symbol] : TInjectedProps[keyof TInjectedProps & symbol] : GetProps<C>[symbol])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
6+
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
7+
Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
8+
Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
119

1210

1311
==== circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts (1 errors) ====
@@ -79,10 +77,8 @@ circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth
7977
!!! error TS2344: Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
8078
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
8179
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
82-
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
83-
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
84-
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
85-
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
86-
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
87-
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
80+
!!! error TS2344: Type '(string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]) | (number extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & number] extends GetProps<C>[keyof TInjectedProps & number] ? GetProps<C>[keyof TInjectedProps & number] : TInjectedProps[keyof TInjectedProps & number] : GetProps<C>[number]) | (symbol extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & symbol] extends GetProps<C>[keyof TInjectedProps & symbol] ? GetProps<C>[keyof TInjectedProps & symbol] : TInjectedProps[keyof TInjectedProps & symbol] : GetProps<C>[symbol])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
81+
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
82+
!!! error TS2344: Type 'GetProps<C>[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
83+
!!! error TS2344: Type 'GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
8884

‎tsc/testdata/baselines/reference/compiler/coAndContraVariantInferences3.types‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type OverloadDefinitions = { readonly [P in number]: (...args: any[]) => any; };
2323

2424
type OverloadBinder<T extends OverloadDefinitions> = (args: OverloadParameters<T>) => OverloadKeys<T> | undefined;
2525
>OverloadBinder : OverloadBinder<T>
26-
>args : Parameters<{ [P in Extract<keyof T, number>]: T[P]; }[Extract<keyof T, number>]>
26+
>args : Parameters<{ [P in OverloadKeys<T>]: T[P]; }[OverloadKeys<T>]>
2727

2828
type OverloadKeys<T extends OverloadDefinitions> = Extract<keyof T, number>;
2929
>OverloadKeys : OverloadKeys<T>
@@ -36,7 +36,7 @@ type OverloadFunction<T extends OverloadDefinitions> = UnionToIntersection<T[key
3636

3737
type OverloadBinders<T extends OverloadDefinitions> = { [P in OverloadKeys<T>]: (args: OverloadParameters<T>) => boolean | undefined; };
3838
>OverloadBinders : OverloadBinders<T>
39-
>args : Parameters<{ [P_1 in Extract<keyof T, number>]: T[P_1]; }[Extract<keyof T, number>]>
39+
>args : Parameters<{ [P_1 in OverloadKeys<T>]: T[P_1]; }[OverloadKeys<T>]>
4040

4141
type OverloadDeprecations<T extends OverloadDefinitions> = { [P in OverloadKeys<T>]?: DeprecationOptions; };
4242
>OverloadDeprecations : OverloadDeprecations<T>

‎tsc/testdata/baselines/reference/compiler/conditionalTypesSimplifyWhenTrivial.types‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ const fn1 = <Params>(
66
><Params>( params: Pick<Params, Exclude<keyof Params, never>>,): Params => params : <Params>(params: Pick<Params, Exclude<keyof Params, never>>) => Params
77

88
params: Pick<Params, Exclude<keyof Params, never>>,
9-
>params : Pick<Params, Exclude<keyof Params, never>>
9+
>params : Pick<Params, keyof Params>
1010

1111
): Params => params;
12-
>params : Pick<Params, Exclude<keyof Params, never>>
12+
>params : Pick<Params, keyof Params>
1313

1414
function fn2<T>(x: Exclude<T, never>) {
1515
>fn2 : <T>(x: Exclude<T, never>) => void
16-
>x : Exclude<T, never>
16+
>x : T
1717

1818
var y: T = x;
1919
>y : T
20-
>x : Exclude<T, never>
20+
>x : T
2121

2222
x = y;
2323
>x = y : T
24-
>x : Exclude<T, never>
24+
>x : T
2525
>y : T
2626
}
2727

@@ -30,27 +30,27 @@ const fn3 = <Params>(
3030
><Params>( params: Pick<Params, Extract<keyof Params, keyof Params>>,): Params => params : <Params>(params: Pick<Params, Extract<keyof Params, keyof Params>>) => Params
3131

3232
params: Pick<Params, Extract<keyof Params, keyof Params>>,
33-
>params : Pick<Params, Extract<keyof Params, keyof Params>>
33+
>params : Pick<Params, keyof Params>
3434

3535
): Params => params;
36-
>params : Pick<Params, Extract<keyof Params, keyof Params>>
36+
>params : Pick<Params, keyof Params>
3737

3838
function fn4<T>(x: Extract<T, T>) {
3939
>fn4 : <T>(x: Extract<T, T>) => void
40-
>x : Extract<T, T>
40+
>x : T
4141

4242
var y: T = x;
4343
>y : T
44-
>x : Extract<T, T>
44+
>x : T
4545

4646
x = y;
4747
>x = y : T
48-
>x : Extract<T, T>
48+
>x : T
4949
>y : T
5050
}
5151

5252
declare var x: Extract<number | string, any>; // Should be `numebr | string` and not `any`
53-
>x : string | number
53+
>x : any
5454

5555
type ExtractWithDefault<T, U, D = never> = T extends U ? T : D;
5656
>ExtractWithDefault : ExtractWithDefault<T, U, D>

‎tsc/testdata/baselines/reference/compiler/contextualTypesNegatedTypeLikeConstraintInGenericMappedType2.types‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,41 @@ const matcher = typeTags<Value>();
3636
matcher({
3737
>matcher({ A: (_) => _.a, B: (_) => "fail",}) : unknown
3838
>matcher : <P extends { readonly [Tag in Tags<"_tag", Value> & string]: (_: Extract<Value, { readonly _tag: Tag; }>) => any; } & { readonly [Tag in Exclude<keyof P, Tags<"_tag", Value>>]: never; }>(fields: P) => unknown
39-
>{ A: (_) => _.a, B: (_) => "fail",} : { A: (_: { _tag: "A"; a: number; }) => number; B: (_: { _tag: "B"; b: number; }) => string; }
39+
>{ A: (_) => _.a, B: (_) => "fail",} : { A: (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number; B: (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string; }
4040

4141
A: (_) => _.a,
42-
>A : (_: { _tag: "A"; a: number; }) => number
43-
>(_) => _.a : (_: { _tag: "A"; a: number; }) => number
44-
>_ : { _tag: "A"; a: number; }
42+
>A : (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number
43+
>(_) => _.a : (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number
44+
>_ : { _tag: "A"; a: number; } & { readonly _tag: "A"; }
4545
>_.a : number
46-
>_ : { _tag: "A"; a: number; }
46+
>_ : { _tag: "A"; a: number; } & { readonly _tag: "A"; }
4747
>a : number
4848

4949
B: (_) => "fail",
50-
>B : (_: { _tag: "B"; b: number; }) => string
51-
>(_) => "fail" : (_: { _tag: "B"; b: number; }) => string
52-
>_ : { _tag: "B"; b: number; }
50+
>B : (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string
51+
>(_) => "fail" : (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string
52+
>_ : { _tag: "B"; b: number; } & { readonly _tag: "B"; }
5353
>"fail" : "fail"
5454

5555
});
5656

5757
matcher({
5858
>matcher({ A: (_) => _.a, B: (_) => "fail", C: (_) => "fail",}) : unknown
5959
>matcher : <P extends { readonly [Tag in Tags<"_tag", Value> & string]: (_: Extract<Value, { readonly _tag: Tag; }>) => any; } & { readonly [Tag in Exclude<keyof P, Tags<"_tag", Value>>]: never; }>(fields: P) => unknown
60-
>{ A: (_) => _.a, B: (_) => "fail", C: (_) => "fail",} : { A: (_: { _tag: "A"; a: number; }) => number; B: (_: { _tag: "B"; b: number; }) => string; C: (_: any) => string; }
60+
>{ A: (_) => _.a, B: (_) => "fail", C: (_) => "fail",} : { A: (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number; B: (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string; C: (_: any) => string; }
6161

6262
A: (_) => _.a,
63-
>A : (_: { _tag: "A"; a: number; }) => number
64-
>(_) => _.a : (_: { _tag: "A"; a: number; }) => number
65-
>_ : { _tag: "A"; a: number; }
63+
>A : (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number
64+
>(_) => _.a : (_: { _tag: "A"; a: number; } & { readonly _tag: "A"; }) => number
65+
>_ : { _tag: "A"; a: number; } & { readonly _tag: "A"; }
6666
>_.a : number
67-
>_ : { _tag: "A"; a: number; }
67+
>_ : { _tag: "A"; a: number; } & { readonly _tag: "A"; }
6868
>a : number
6969

7070
B: (_) => "fail",
71-
>B : (_: { _tag: "B"; b: number; }) => string
72-
>(_) => "fail" : (_: { _tag: "B"; b: number; }) => string
73-
>_ : { _tag: "B"; b: number; }
71+
>B : (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string
72+
>(_) => "fail" : (_: { _tag: "B"; b: number; } & { readonly _tag: "B"; }) => string
73+
>_ : { _tag: "B"; b: number; } & { readonly _tag: "B"; }
7474
>"fail" : "fail"
7575

7676
C: (_) => "fail",

‎tsc/testdata/baselines/reference/compiler/crossProductUnionIntersectionRepeatedPropDeclarationsNoOOM1.types‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)