mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-07-18 23:25:41 +00:00
Swap to eslint (#154)
* 311 problems (173 errors, 138 warnings) * Make a start... * swap to react config * Literally a handful left * Clean. * any removal * Use Record * Adjust versions * Update with latest eslint-standard ruleset * Update defaults.ts
This commit is contained in:
@@ -2,27 +2,27 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { KeyringStore } from '../types';
|
||||
import { KeyringStore, KeyringJson } from '../types';
|
||||
|
||||
import store from 'store';
|
||||
|
||||
export default class BrowserStore implements KeyringStore {
|
||||
all (cb: (key: string, value: any) => void): void {
|
||||
store.each((value: any, key: string) =>
|
||||
cb(key, value)
|
||||
);
|
||||
public all (cb: (key: string, value: KeyringJson) => void): void {
|
||||
store.each((value: KeyringJson, key: string): void => {
|
||||
cb(key, value);
|
||||
});
|
||||
}
|
||||
|
||||
get (key: string, cb: (value: any) => void): void {
|
||||
public get (key: string, cb: (value: KeyringJson) => void): void {
|
||||
cb(store.get(key));
|
||||
}
|
||||
|
||||
remove (key: string, cb?: () => void): void {
|
||||
public remove (key: string, cb?: () => void): void {
|
||||
store.remove(key);
|
||||
cb && cb();
|
||||
}
|
||||
|
||||
set (key: string, value: any, cb?: () => void): void {
|
||||
public set (key: string, value: KeyringJson, cb?: () => void): void {
|
||||
store.set(key, value);
|
||||
cb && cb();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user