Skip to content
Permalink
Browse files

Fix ImmortalStorage constructor definition

ImmortalStorage constructor requires a Store constructors, not a Store instances.
  • Loading branch information...
masaha03 committed Feb 10, 2019
1 parent 01b1677 commit 743a14ee79e5c488b2b5dccdd4738bc22218373d
Showing with 5 additions and 1 deletion.
  1. +5 −1 immortal-db.d.ts
@@ -42,8 +42,12 @@ declare class StorageApiWrapper implements Store {
export class LocalStorageStore extends StorageApiWrapper {}
export class SessionStorageStore extends StorageApiWrapper {}

interface StoreConstructor {
new (...args: any[]): Store;
}

export class ImmortalStorage {
constructor(stores?: Store[]);
constructor(stores?: StoreConstructor[]);

get(key: string, _default?: null): Promise<string | null>;
get(key: string, _default: string): Promise<string>;

0 comments on commit 743a14e

Please sign in to comment.
You can’t perform that action at this time.