Encountered an issue while trying to establish a connection with the PouchDB Database.
An error message states: Typescript Cannot use 'new' with an expression whose type lacks a call or construct signature
Shown below is the code snippet in question:-
var PouchDB = require("pouchdb");
@Injectable()
export class PouchDBService {
private isInstantiated: boolean;
private database: any;
public constructor(private http: Http) {
if(!this.isInstantiated) {
this.database = new PouchDB("db_name"); <--issue arises here
this.isInstantiated = true;
}