From fb158bc069c318b3b5ec1bc89fdad7a5ddc6b516 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 20 May 2023 22:40:22 -0700 Subject: [PATCH] Add types to query keys object --- src/renderer/api/query-keys.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/api/query-keys.ts b/src/renderer/api/query-keys.ts index dbed3868..ffec8089 100644 --- a/src/renderer/api/query-keys.ts +++ b/src/renderer/api/query-keys.ts @@ -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 QueryFunctionContext['queryKey']> +> = { albumArtists: { detail: (serverId: string, query?: AlbumArtistDetailQuery) => { if (query) return [serverId, 'albumArtists', 'detail', query] as const;