Skip to content

Commit

Permalink
test: test for mutate and populateCache when a value of different typ…
Browse files Browse the repository at this point in the history
…e is assgined
  • Loading branch information
Key5n committed Jun 17, 2024
1 parent 8ea098d commit 52cf67d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/type/mutate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,18 @@ export function useMutatorTypes() {

mutate(async () => '1')
mutate(async () => '1', { populateCache: false })
mutate(async () => 1, {
populateCache: (result: number) => `${result}`
})

// @ts-expect-error
mutate(async () => 1)
// @ts-expect-error
mutate(async () => 1, { populateCache: false })
// @ts-expect-error
mutate(async () => 1, {
populateCache: (result: number) => result
})
}

export function useConfigMutate() {
Expand Down

0 comments on commit 52cf67d

Please sign in to comment.