Change in generic behavior between 3.0.1 and >=3.1.1 #27895
Labels
Bug
A bug in TypeScript
Domain: Indexed Access Types
The issue relates to accessing subtypes via index access
Fixed
A PR has been merged for this issue
Milestone
TypeScript Version: 3.2.0-dev.20181011
This code worked in 3.0.1, and is broken >=3.1.1.
Search Terms:
"is not assignable to type"
Code
For completeness, I'll just mention that I intend for users to create subinterfaces of
Entity
andEntityState
for their domain types (like@ngrx/entity
), overridingid
to be a more restrictive type. This is why theIdOf
type is important. E.g.,Expected behavior:
The code compiles without error.
Actual behavior:
Playground Link:
Playground Link
Related Issues:
I did not find any that seemed similar, but I'm also unsure what the actual underlying problem is. I did ask on StackOverflow, and they suggested I ask here.
The text was updated successfully, but these errors were encountered: