You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the current version of redis-om does not have any support for a custom repository entity type. Apparently, the Entity type is hard coded into the Repository class (correct me if I am wrong).
I think this is a good point to introduce some Typescript Generics support.
A more advanced approach would be to infer the resulting entity type from the Schema definition. However, this would need a lot of refactoring of the type definitions.
The text was updated successfully, but these errors were encountered:
It seems like the current version of
redis-om
does not have any support for a custom repository entity type. Apparently, theEntity
type is hard coded into theRepository
class (correct me if I am wrong).I think this is a good point to introduce some Typescript Generics support.
I am thinking of something like this:
With this approach, the
save
,fetch
, ... functions of the repository would give proper IntelliSense.I assume the changes wouldn't be too much. Something like:
A more advanced approach would be to infer the resulting entity type from the Schema definition. However, this would need a lot of refactoring of the type definitions.
The text was updated successfully, but these errors were encountered: