Comments (6)
I'm newbie for typings. Since I am using angular2 cli, they have a build system, what I did is to put
declare module 'relational-pouch';
in typings.d.ts
under src
. And then in your own file reference them as.
import * as PouchDB from 'pouchdb';
import * as Relational from 'relational-pouch';
PouchDB.plugin(Relational);
I did import pouchdb typings, so that one has no issue. Once i declare the module, seems everything is fine to me. I'm using it now. If I need to do createIndex, I'll have to do the same thing with package pouchdb-find
.
In short, I didn't use the approach outlined in above thread. Of course angular2 cli build might be doing its own thing.
from relational-pouch.
It seems we can do the same fix for relational-pouch but can we test is? I don't know typescript. Can you test it?
from relational-pouch.
Looks good! Can this issue be closed?
from relational-pouch.
I am facing issues while including it in typescript. ANy help will be greatly appreciated.
from relational-pouch.
Promise.resolve is not a function error
from relational-pouch.
Facing this save issue, doing the steps suggested by @windmaomao. THe compiler complains about the import * as PouchDB from 'pouchdb';
throwing a warning:
55:8-22 "export 'plugin' (imported as 'PouchDB') was not found in 'pouchdb'
This compiles at the very least:
import PouchDB from 'pouchdb';
import * as Relational from 'relational-pouch';
PouchDB.plugin(Relational); // in constructor
I found this is the only way to get it to compile correctly but then I get the Promise.resolve is not a function error.
from relational-pouch.
Related Issues (20)
- Dead link in documentation HOT 1
- Heelp!!!! new post not adding to authors HOT 2
- Depreciate IE8 support HOT 1
- Delete all schema docs.
- Is db.rel.find() have an option for paging? HOT 12
- How to use 'pouchdb-validation' and 'relational-pouch'?
- How does the sync performance of this compare to vanilla pouchdb?
- Handling error while saving Relational data
- Handling ECONNRESET HOT 4
- don't save hasMany/queryInverse with many-to-many HOT 2
- find and delete by id not working
- find action, slow performance HOT 2
- db.rel.findHasMany is not working HOT 3
- [help] CouchDb 3.0 - Partitioned Databases HOT 5
- Delete successful but data has not removed HOT 2
- How to return _conflicts attribute HOT 1
- how to get sort data? HOT 1
- why pouchdb.rel.find() works only with integer id? HOT 6
- React Native app crashes when try to import
- Confused about "hasMany" relationship (see description below) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relational-pouch.