Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Property 'with' does not exist in Typescript #45

Open
riskers opened this issue Apr 3, 2022 · 1 comment
Open

Property 'with' does not exist in Typescript #45

riskers opened this issue Apr 3, 2022 · 1 comment

Comments

@riskers
Copy link

riskers commented Apr 3, 2022

I rewrite official example in https://stackblitz.com/edit/typescript-hfut4q.

@riskers
Copy link
Author

riskers commented Apr 3, 2022

I known...

Because of version of Dexie.js.

dexie-relationships 's type only support Dexie.js 2.x now.

For support Dexie.js 3.x, I wrote this type file:

declare module 'dexie' {
  export interface Table<T = any, TKey = IndexableType> {
    with: (spec: Object) => Promise<Array<T>>;
  }
  export interface Collection<T = any, TKey = IndexableType> {
    with: (spec: Object) => Promise<Array<T>>;
  }
}

it's ok.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant