mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
Add types to query keys object
This commit is contained in:
parent
51c2731b07
commit
fb158bc069
@ -1,3 +1,4 @@
|
||||
import { QueryFunctionContext } from '@tanstack/react-query';
|
||||
import type {
|
||||
AlbumListQuery,
|
||||
SongListQuery,
|
||||
@ -14,7 +15,10 @@ import type {
|
||||
SongDetailQuery,
|
||||
} from './types';
|
||||
|
||||
export const queryKeys = {
|
||||
export const queryKeys: Record<
|
||||
string,
|
||||
Record<string, (...props: any) => QueryFunctionContext['queryKey']>
|
||||
> = {
|
||||
albumArtists: {
|
||||
detail: (serverId: string, query?: AlbumArtistDetailQuery) => {
|
||||
if (query) return [serverId, 'albumArtists', 'detail', query] as const;
|
||||
|
Loading…
Reference in New Issue
Block a user