0.0.25
Parameters passed to createCache
methods load
and getKey
are no longer spread in order to avoid potential parameter mismatch caused by optional parameters.
Before:
createCache<[bool: boolean, num: number, str: string], boolean>({
getKey: async (bool, num, str) => {
// ...
},
load: async (bool, num, str) => {
// ...
}
});
After:
createCache<[bool: boolean, num: number, str: string], boolean>({
// Note the added [] wrapper
getKey: async ([bool, num, str]) => {
// ...
},
load: async ([bool, num, str]) => {
// ...
}
});