-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue