Guest User

Untitled

a guest
Jan 20th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. declare global {
  2. interface MapConstructor {
  3. new<K extends Narrowable, V>(entries: [K, V][]): AccumulativeMap<K, V>;
  4. }
  5.  
  6. /**
  7. * A map that can only grow. It guarantees the existence of its elements.
  8. *
  9. * @alias TotalMap
  10. * @alias FinalMap
  11. * @alias AccumulativeMap
  12. * @alias ImmutableMap
  13. */
  14. interface AccumulativeMap<K, V> extends Map<K, V> {
  15. forEach(callbackfn: (value: V, key: K, map: AccumulativeMap<K, V>) => void, thisArg?: any): void;
  16. get(key: K): V;
  17. delete(this: never): never;
  18. clear(this: never): never;
  19. }
  20. }
Add Comment
Please, Sign In to add comment