sindresorhus/quick-lru

Pass generic constraints to Map

tbontb-iaq opened this issue · 0 comments

I noticed that the declaration of QuickLRU in the type file inherits Map without passing generic constraints to it:

export default class QuickLRU<KeyType, ValueType>
  extends Map
  implements Iterable<[KeyType, ValueType]> { }

Consider adding generic constraints so that methods inherited from Map have better type hints:

export default class QuickLRU<KeyType, ValueType>
  extends Map<KeyType, ValueType>
  implements Iterable<[KeyType, ValueType]> {}