pinia-orm icon indicating copy to clipboard operation
pinia-orm copied to clipboard

useAxiosRepo with typescript - Argument of type 'typeof MyModel' is not assignable to parameter of type 'Model'

Open nowrap opened this issue 1 year ago • 0 comments

Hello,

i am using the axios plugin in a typescript project to retrive data from an api. Running the code in dev mode works. But it won't compile:

Argument of type 'typeof MyModel' is not assignable to parameter of type 'Model'.
  Type 'typeof MyModel' is missing the following properties from type 'Model': _meta, $self, $entity, $config, and 38 more.

await useAxiosRepo(MyModel).api().get('mymodels', {

Maybe someone has a suggestion for me

Regards nowrap

nowrap avatar Apr 05 '24 20:04 nowrap