Closed

Description
TypeScript Version: 2.9.0-dev.20180411
Code
type A = { [P in keyof "a"]?: boolean }; // { padStart?: boolean | undefined, ... }
type Indirect<T> = { [P in keyof T]?: boolean };
type B = Indirect<"a">; // "a"
declare const a: A;
const b: B = a; // Error
Expected behavior:
No error. B
is the same as A
.
Actual behavior:
Error: B
is the string literal type "a"
.