Closed
Description
cc @sandersn
TypeScript Version: 3.4.0-dev.20190131
Search Terms:
Code
type Remap1<T> = { [P in keyof T]: Remap1<T[P]>; };
type Remap2<T> = T extends object ? { [P in keyof T]: Remap2<T[P]>; } : T;
type a = Remap1<string[]>;
type b = Remap2<string[]>;
Expected behavior:
a type and b type are:
any[]
But this is also wrong. Must be string[].
Actual behavior:
b type is:
{
[x: number]: string;
length: number;
toString: {};
toLocaleString: {};
pop: {};
push: {};
concat: {};
join: {};
reverse: {};
shift: {};
slice: {};
sort: {};
splice: {};
unshift: {};
indexOf: {};
lastIndexOf: {};
every: {};
... 13 more ...;
includes: {};
}
Related Issues:
#29442