derbyjs / racer

Realtime model synchronization engine for Node.js
1.19k stars 118 forks source link

[TS typings] Allow model.ref's to param to be a Query or Filter, to match implementation #311

Closed ericyhwang closed 3 months ago

ericyhwang commented 3 months ago

The implementation of model.ref allows the to param to be a Query or Filter. In those cases, it calls that query or filter object's ref method: https://github.com/derbyjs/racer/blob/d8fbfcd097084385dec87f17aaf46efeb4582626/src/Model/ref.ts#L259-L260

This updates the TypeScript typings for model.ref to allow that use-case.