-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: nightly (2.5.0-dev.20170727)
Code
type StringContains<S extends string, L extends string> = (
{ [K in S]: 'true' } &
{ [key: string]: 'false' }
)[L]
type ObjectHasKey<O, L extends string> = StringContains<keyof O, L>
type First<T> = ObjectHasKey<T, '0'> // eagerly resolved as 'false'
Expected behavior:
Type First
should be left as an indexing operation.
PS: origin of the issue: gcanti/typelevel-ts#8
amir-arad, JoMarton, tyv, rozzzly, maksymc and 10 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue