Skip to content

0.0.25

Compare
Choose a tag to compare
@bvaughn bvaughn released this 16 Mar 14:01
· 119 commits to main since this release

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]) => {
    // ...
  }
});