Compare commits

..

4 Commits

Author SHA1 Message Date
10d1bb35ce 1.0.11 2020-09-19 14:35:55 +00:00
8e97b51f1f fix(core): update 2020-09-19 14:35:54 +00:00
7159b33425 1.0.10 2020-09-19 14:02:15 +00:00
5860066621 fix(core): update 2020-09-19 14:02:15 +00:00
3 changed files with 4 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/webstore",
"version": "1.0.9",
"version": "1.0.11",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/webstore",
"version": "1.0.9",
"version": "1.0.11",
"private": false,
"description": "high performance storage in the browser using indexed db",
"main": "dist_ts/index.js",

View File

@ -5,7 +5,7 @@ export interface IWebStoreOptions {
storeName: string;
}
export class WebStore<T = any> {
export class WebStore<T> {
public db: plugins.idb.IDBPDatabase;
public objectStore: plugins.idb.IDBPObjectStore;
public options: IWebStoreOptions;
@ -22,7 +22,7 @@ export class WebStore<T = any> {
});
}
async get(key: string) {
async get(key: string): Promise<T> {
return this.db.get(this.options.storeName, key);
}