declare interface Map { getOrCreate(key: K, newValue: V): V; getOrCreate(key: K, newValueFn: () => V): V; update(key: K, updateFn: (v: V | undefined) => V): void; }