fix(core): update
This commit is contained in:
@ -23,15 +23,20 @@ export class WebStore<T = any> {
|
||||
});
|
||||
}
|
||||
|
||||
async get(key) {
|
||||
async get(key: string) {
|
||||
return this.db.get(this.options.storeName, key);
|
||||
}
|
||||
|
||||
async set(key, val) {
|
||||
async check(keyArg: string): Promise<boolean> {
|
||||
const result = await this.get(keyArg);
|
||||
return !!result;
|
||||
}
|
||||
|
||||
async set(key: string, val: T) {
|
||||
return this.db.put(this.options.storeName, val, key);
|
||||
}
|
||||
|
||||
async delete(key) {
|
||||
async delete(key: string) {
|
||||
return this.db.delete(this.options.storeName, key);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user