Closed
Description
π Search Terms
Literal type, string mapping type, intersection
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
π» Code
type Foo = { prop: string };
type T0 = Foo["prop"]; // string
type T1 = Foo["prop" & `p${string}p`]; // string
type T2 = Foo["prop" & `p${Lowercase<string>}p`]; // string
type T3 = Foo["prop" & Lowercase<string>]; // Error, wat?
π Actual behavior
Error.
π Expected behavior
No error.
Additional information about the issue
See here.