Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Typescript error with cordova-sqlite adapter #73

Open
julienkermarec opened this issue Jun 22, 2017 · 4 comments
Open

Typescript error with cordova-sqlite adapter #73

julienkermarec opened this issue Jun 22, 2017 · 4 comments

Comments

@julienkermarec
Copy link

Hello,

I have a typescript error with the cordova-sqllite adapter :

Argument of type '{adapter:"cordova-sqlite";} is not assignable to parameter of type 'FruitDOWNAdapterConfiguration' Types of property 'adapter' are incompatible. Type "cordova-sqlite" is not assignable to type '"fruitdown"'

erreur typescript adapter cordov-sqlite

@ghost
Copy link

ghost commented Sep 26, 2017

Hello,

@julienkermarec have you solve this issue?
im also having the same error.

@julienkermarec
Copy link
Author

No, i have always this problem.

The compilation works, but i have this typescript error

@pablomaurer
Copy link

pablomaurer commented Feb 2, 2018

import PouchDB from "pouchdb";
import PouchCdvAdapter from "pouchdb-adapter-cordova-sqlite";

PouchDB.plugin(PouchCdvAdapter);

works for me.

@paolosanchi
Copy link
Contributor

paolosanchi commented Jul 18, 2018

@julienkermarec, hope you already solved.

This works for me:

import PouchDB from 'pouchdb';
import PouchDBAdapterCordovaSqlite from 'pouchdb-adapter-cordova-sqlite';
[...]
PouchDB.plugin(PouchDBAdapterCordovaSqlite);
[...]
this.db = new PouchDB('favoris', {adapter: 'cordova-sqlite') as any);

note the "as any"

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

No branches or pull requests

3 participants