Use tsconfig references (#4328)

* Use tsconfig references

* Move types-known (temp until lower-level split)

* Sources

* Adjust

* tesconfig.eslint.json

* Bumps

* AdjustAdjust

* Linting passing... a start...

* Adjust

* Merge derive

* Merge

* api-contract-support

* It builds?

* compare locations
This commit is contained in:
Jaco
2021-12-14 12:04:50 +02:00
committed by GitHub
parent cbb5a021a0
commit 736fd536f9
292 changed files with 1675 additions and 1273 deletions
-30
View File
@@ -1,30 +0,0 @@
// Copyright 2017-2021 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DeriveCache } from './types';
const mapCache = new Map<string, any>();
export const deriveMapCache: DeriveCache = {
del: (key: string): void => {
mapCache.delete(key);
},
forEach: (cb: (key: string, value: any) => void): void => {
for (const [k, v] of mapCache.entries()) {
cb(k, v);
}
},
get: <T = any> (key: string): T | undefined => {
return mapCache.get(key) as T;
},
set: (key: string, value: any): void => {
mapCache.set(key, value);
}
};
export const deriveNoopCache: DeriveCache = {
del: (): void => undefined,
forEach: () => undefined,
get: (): undefined => undefined,
set: (_: string, value: unknown): unknown => value
};