Skip to content

Observable is not defined error while trying localForage.newObservable({})Β #29

@PraveenRL

Description

@PraveenRL

I'm working on [email protected] with [email protected] and localforage-observable@^2.1.1

Just following the same steps as in documentation, but getting error in localforage.newObservable(). Tried with different versions of localforage-observable also, but nothing works

import localForage from "localforage";
// OR based on your configuration:
// import * as localForage from "localforage";

import { extendPrototype } from "localforage-observable";

var localforage = extendPrototype(localForage);
localforage.ready().then(() => {
  // TypeScript will find `newObservable()` after the casting that `extendPrototype()` does
  var observable = localforage.newObservable();
});

Following error while running application:

Unhandled Promise rejection: Observable is not defined ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: Observable is not defined
    at newObservable.factory (localforage-observable.js:444:9)
    at LocalForage.newObservable (localforage-observable.js:431:40)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions