(input: InvalidationKeyInput)
| 14 | export type InvalidationKeyInput = InvalidationKey | { readonly id: string; readonly options?: ClientForOptions } |
| 15 | |
| 16 | const normalizeKey = (input: InvalidationKeyInput): InvalidationKey => { |
| 17 | if (Array.isArray(input)) return input |
| 18 | const handler = input as { id: string; options?: ClientForOptions } |
| 19 | return makeQueryKey(handler.options ? { id: handler.id, options: handler.options } : { id: handler.id }) |
| 20 | } |
| 21 | |
| 22 | // Disambiguates `add` overloads: a `string[]` means a single key; an array |
| 23 | // containing arrays-or-objects means a batch of inputs. |
no test coverage detected
searching dependent graphs…