Support Store
generic types to spec types for StoreRecord.data
and StoreRecord.id
#3691
Milestone
Store
generic types to spec types for StoreRecord.data
and StoreRecord.id
#3691
It would be excellent if we could spec an interface for the data element of all records within a given
Store
, so you would have type-aware support when reading their data in code.Have not thought it through in detail, but I am assuming
StoreRecord
would take a generic and thenStore
,GridModel
, etc. would have some way to pass it though. And of course it would need to come out the other side of a variety ofStoreRecord
-emitting APIs. But I believe it would be a big win, given how common it is to pass records around through an application.Being able to tell TS that your
id
s will be either numbers or strings (as opposed to either) could also eliminate some common boilerplate casting.The text was updated successfully, but these errors were encountered: