Skip to content

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

@nowrap

Description

@nowrap

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions