Remove ExtenedMap, ToggleSet, and observable versions (#3310)

- Switch to helper functions instead. They don't impact the prototype
  tree and it means that we don't need to introduce versions that are
  both observable and "normal"

- Tidy <ItemListLayout> and hiddenTableColumns to not need
  pre-initialization

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-02-16 18:20:22 -05:00
1 parent ed91ef2d03
commit 8088d3b5c2
10 files changed
+58 -105

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@
import type Conf from "conf";
import type { Migrations } from "conf/dist/source/types";
import { ExtendedMap, iter } from "../common/utils";
import { getOrInsert, iter } from "../common/utils";
import { isTestEnv } from "../common/vars";
export function migrationLog(...args: any[]) {
@@ -20,10 +20,10 @@ export interface MigrationDeclaration {
}
export function joinMigrations(...declarations: MigrationDeclaration[]): Migrations<any> {
const migrations = new ExtendedMap<string, ((store: Conf<any>) => void)[]>();
const migrations = new Map<string, ((store: Conf<any>) => void)[]>();
for (const decl of declarations) {
migrations.getOrInsert(decl.version, () => []).push(decl.run);
getOrInsert(migrations, decl.version, []).push(decl.run);
}
return Object.fromEntries(