We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
keyof "a"
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.
B
A
Actual behavior:
Error: B is the string literal type "a".
"a"