CodeDredd / pinia-orm

The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.
https://pinia-orm.codedredd.de/
MIT License
444 stars 38 forks source link

Repository find() method is missing from type declarations #1884

Closed DaRosenberg closed 2 months ago

DaRosenberg commented 2 months ago

Environment

No response

Reproduction

N/A

Describe the bug

The docs indicate that there is a find() method directly on the repository: https://pinia-orm.codedredd.de/api/query/find

It does also work at runtime.

But in the type declarations, the find() method is only available on the query interface: repo.query().find(id)

It seems to be the type declarations are wrong and the repository interface should have the find() method on it (since it evidently does work at runtime)

Additional context

No response

Logs

No response

CodeDredd commented 2 months ago

This is not a bug but a feature 😉 . To reduce code i tried to use a proxy to query the same functions which are in query. The only thing that was wrong is the type. But this is already fixed in this issue #1863 if you use the edge release channel.

I am also soon releasing 1.9.2. So if you wait i bit you don't need to checkout the release edge channel.

DaRosenberg commented 2 months ago

Excellent, thanks @CodeDredd