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

piniaOrm() Expected 1 arguments, but got 0 #1859

Closed shuifsdf8oYioa closed 2 months ago

shuifsdf8oYioa commented 4 months ago

Environment

Nuxt project info: 5:12:55 PM


Reproduction

https://stackblitz.com/edit/nuxt-starter-ptph58?file=orm.ts See line 11 (you might have to wait 1-2 minutes until project is installed and indexed on stackblitz)

Describe the bug

If one copies your code from https://pinia-orm.codedredd.de/plugins/axios/guide/setup typescript will report Expected 1 arguments, but got 0 for piniaOrm().use.

PiniaPlugin expects a context but it is not clear where to get this context from.

I believe the issue originated in this commit: https://github.com/CodeDredd/pinia-orm/commit/fda0f99f165ac73ca338cb349a2612eb42273eb7#diff-f384333fe1870b086401a85c6a971359a62254e85ef6dba3046aed7501a71b5eR37

Additional context

No response

Logs

No response