Overall I love TypeScript. But sometimes it’s so frustrating…
No overload matches this call.
Overload 1 of 2, '(queryKey: QueryKey, updater: Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverSuccessResult<...> | undefined, InfiniteQueryObserverLoadingErrorResult<...> | ... 3 more ... | undefined>, options?: SetDataOptions | undefined): [...][]', gave the following error.
Argument of type '(chatPages: UseInfiniteQueryResult<Chat>) => { pages: any[]; pageParams: unknown[]; } | undefined' is not assignable to parameter of type 'Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryO...'.
Type '(chatPages: UseInfiniteQueryResult<Chat>) => { pages: any[]; pageParams: unknown[]; } | undefined' is not assignable to type 'DataUpdateFunction<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | Inf...'.
Types of parameters 'chatPages' and 'input' are incompatible.
Type 'InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverS...' is not assignable to type 'UseInfiniteQueryResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown>'.
Type 'undefined' is not assignable to type 'UseInfiniteQueryResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown>'.
Overload 2 of 2, '(filters: QueryFilters, updater: Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverSuccessResult<...> | undefined, InfiniteQueryObserverLoadingErrorResult<...> | ... 3 more ... | undefined>, options?: SetDataOptions | undefined): [...][]', gave the following error.
Type 'string[]' has no properties in common with type 'QueryFilters'.ts(2769)
Overall I love TypeScript. But sometimes it’s so frustrating…
No overload matches this call. Overload 1 of 2, '(queryKey: QueryKey, updater: Updater<InfiniteQueryObserverLoadingErrorResult<Record<{ account: EmbeddedEntity<Account | ReducerAccount>; id: string; unread: number; last_message: string | null; updated_at: Date; }> & Readonly<...>, unknown> | InfiniteQueryObserverLoadingResult<...> | InfiniteQueryObserverRefetchErrorResult<...> | InfiniteQueryObserverSuccessResult<...> | undefined, InfiniteQueryObserverLo...
Expand text...