Avoid error from tsc

This commit is contained in:
Tim Schaub
2019-09-25 12:16:16 +02:00
parent b7ae47c4b7
commit 8f7f76188a

View File

@@ -32,10 +32,9 @@ export function VOID() {}
* returned function is called twice in a row with the same arguments and the same
* this object, it will return the value from the first call in the second call.
*
* @param {function(...any): ReturnType} fn The function to memoize.
* @return {function(...any): ReturnType} The memoized function.
* @template ReturnType
* @template ThisType
* @param {function(this:ThisType, ...any):ReturnType} fn The function to memoize.
* @return {function(this:ThisType, ...any):ReturnType} The memoized function.
*/
export function memoizeOne(fn) {
let called = false;