Bump deps w/ eslint (#2302)
* Bump deps w/ eslint * Additional cleanups * Additional * @polkadot/types done * Additional * @polkadot/typegen done * Additional * @polkadot/rpc-core done * Additional * Additional * Additional * docs * @polkadot/api-derive done * @polkadot/api done * @polkadot/api-contracts done * Update tests
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
import { DeriveCache } from './types';
|
||||
|
||||
const mapCache: Map<string, any> = new Map();
|
||||
const mapCache = new Map<string, any>();
|
||||
|
||||
const deriveMapCache: DeriveCache = {
|
||||
del: (key: string): void => {
|
||||
@@ -18,7 +18,7 @@ const deriveMapCache: DeriveCache = {
|
||||
}
|
||||
},
|
||||
get: <T = any> (key: string): T | undefined => {
|
||||
return mapCache.get(key);
|
||||
return mapCache.get(key) as T;
|
||||
},
|
||||
set: (key: string, value: any): void => {
|
||||
mapCache.set(key, value);
|
||||
@@ -29,7 +29,7 @@ const deriveNoopCache: DeriveCache = {
|
||||
del: (): void => undefined,
|
||||
forEach: () => undefined,
|
||||
get: (): undefined => undefined,
|
||||
set: (_: string, value: any): any => value
|
||||
set: (_: string, value: unknown): unknown => value
|
||||
};
|
||||
|
||||
export { deriveMapCache, deriveNoopCache };
|
||||
|
||||
Reference in New Issue
Block a user