add the missing key arg for length()

This commit is contained in:
Huan LI
2018-05-30 11:52:25 +08:00
committed by GitHub
parent 348d75dac9
commit 79f0992107
+1 -1
View File
@@ -40,7 +40,7 @@ declare namespace LRU {
* `max` like-sized things. The item is passed as the first argument,
* and the key is passed as the second argument.
*/
length?(value: V): number;
length?(value: V, key?: K): number;
/**
* Function that is called on items when they are dropped from the cache.