Create onboarding and its guard

  • Declare types for function return values
  • Do absolutely everything in your power to avoid any
  • Read this post. In here lies your proximate problem - get is a “class C” function, and so it must be declared to return a Promise (or Observable), and its first word should be return. You have some design leeway for what store and remove are, but need to be aware of the consequences of the choices

So I would write get like this, which should give you an idea of how to fix the rest of StorageService:

get<T>(key: string): Promise<T> {
  return this.storage.ready().then(() => this.storage.get(key));
}