提交学习笔记专用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
231 B

  1. export declare class DoubleIndexedKV<K, V> {
  2. keyToValue: Map<K, V>;
  3. valueToKey: Map<V, K>;
  4. set(key: K, value: V): void;
  5. getByKey(key: K): V | undefined;
  6. getByValue(value: V): K | undefined;
  7. clear(): void;
  8. }