(
scope: string,
queryKeyPart: TQueryKeyPart = {} as TQueryKeyPart,
)
| 20 | * @returns - The original query key part with 'scope' attached to it |
| 21 | */ |
| 22 | export function buildQueryKeyPart< |
| 23 | TQueryKeyPart extends Record<string, unknown> = Record<string, never>, |
| 24 | >( |
| 25 | scope: string, |
| 26 | queryKeyPart: TQueryKeyPart = {} as TQueryKeyPart, |
| 27 | ): TQueryKeyPart & { scope: string } { |
| 28 | return { |
| 29 | scope, |
| 30 | ...(queryKeyPart ?? {}), |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * A function that takes a scope (used for identification) and returns a query key with the region id. |
no outgoing calls
no test coverage detected