You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support re-aliasing of type alias instantiations (#42284)
* New aliases for type alias instantiations
* New aliases for conditional, mapped, and anonymous object type instantiations
* Accept new baselines
* Fix issues with re-aliasing
* Accept new baselines
Copy file name to clipboardExpand all lines: tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.types
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ export type Matching<InjectedProps, DecorationTargetProps> = {
113
113
};
114
114
115
115
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
116
-
>Omit : Pick<T, Exclude<keyof T, K>>
116
+
>Omit : Omit<T, K>
117
117
118
118
export type InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps> =
tests/cases/conformance/types/conditional/conditionalTypes1.ts(30,9): error TS2322: Type 'T["x"]' is not assignable to type 'string'.
14
14
Type 'string | undefined' is not assignable to type 'string'.
15
15
Type 'undefined' is not assignable to type 'string'.
16
-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(103,5): error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'T'.
17
-
'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, FunctionPropertyNames<T>>'.
18
-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(104,5): error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'T'.
19
-
'T' could be instantiated with an arbitrary type which could be unrelated to 'Pick<T, NonFunctionPropertyNames<T>>'.
20
-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'Pick<T, NonFunctionPropertyNames<T>>' is not assignable to type 'Pick<T, FunctionPropertyNames<T>>'.
16
+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(103,5): error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'T'.
17
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'FunctionProperties<T>'.
18
+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(104,5): error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'T'.
19
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'NonFunctionProperties<T>'.
20
+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'NonFunctionProperties<T>' is not assignable to type 'FunctionProperties<T>'.
21
21
Type 'FunctionPropertyNames<T>' is not assignable to type 'NonFunctionPropertyNames<T>'.
22
-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'Pick<T, FunctionPropertyNames<T>>' is not assignable to type 'Pick<T, NonFunctionPropertyNames<T>>'.
22
+
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
23
+
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
24
+
Type 'string' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'.
25
+
Type 'keyof T' is not assignable to type 'never'.
26
+
Type 'string | number | symbol' is not assignable to type 'never'.
27
+
Type 'string' is not assignable to type 'never'.
28
+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'FunctionProperties<T>' is not assignable to type 'NonFunctionProperties<T>'.
23
29
Type 'NonFunctionPropertyNames<T>' is not assignable to type 'FunctionPropertyNames<T>'.
30
+
Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
31
+
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
32
+
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
33
+
Type 'keyof T' is not assignable to type 'never'.
24
34
tests/cases/conformance/types/conditional/conditionalTypes1.ts(114,5): error TS2322: Type 'keyof T' is not assignable to type 'FunctionPropertyNames<T>'.
25
35
Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
26
36
Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'.
tests/cases/conformance/types/conditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.
53
63
Type 'string | number' is not assignable to type 'ZeroOf<T>'.
54
64
Type 'string' is not assignable to type 'ZeroOf<T>'.
55
-
tests/cases/conformance/types/conditional/conditionalTypes1.ts(263,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'T1', but here has type 'Foo<T & U>'.
65
+
tests/cases/conformance/types/conditional/conditionalTypes1.ts(263,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'T1', but here has type 'T2'.
56
66
tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS2322: Type 'T95<U>' is not assignable to type 'T94<U>'.
57
67
Type 'number | boolean' is not assignable to type 'T94<U>'.
0 commit comments