typescript - ts(2769) Niciun suprasarcină nu se potrivește acestei apelări atunci când se folosește $patch pe Ref<T> în magazinul Pinia


Sunt blocat cu o problemă de TypeScript. Codul funcționează de fapt, este doar o eroare a IDE-ului care mi se aruncă pentru că încerc să folosesc funcția $patch din Pinia.

Iată magazinul meu:

import { AuthenticationResult } from '@azure/msal-browser'
import { defineStore } from 'pinia'
import { ref } from 'vue'

const useAuthStore = defineStore('auth', () => {
  const details = ref<AuthenticationResult>()

  return { details }
})

export default useAuthStore

Iată codul meu care încearcă să corecteze proprietatea details:

const tokenResponse: AuthenticationResult = await instance.acquireTokenSilent(loginRedirectRequest)

const authStore = useAuthStore()

authStore.$patch({
  details: tokenResponse
})

Eroarea pe care o primesc este afișată mai jos:

No overload matches this call.
  Overload 1 of 2, '(partialState: _DeepPartial<{ details: { authority: string; uniqueId: string; tenantId: string; scopes: string[]; account: { homeAccountId: string; environment: string; tenantId: string; username: string; localAccountId: string; name?: string | undefined; idTokenClaims?: { ...; } | undefined; nativeAccountId?: string | undefined; } | null; ... 13 more ...; fromNativeBroker?: boolean | undefined; } | undefined; }>): void', gave the following error.
  Overload 2 of 2, '(stateMutator: (state: { details: { authority: string; uniqueId: string; tenantId: string; scopes: string[]; account: { homeAccountId: string; environment: string; tenantId: string; username: string; localAccountId: string; name?: string | undefined; idTokenClaims?: { ...; } | undefined; nativeAccountId?: string | undefined; } | null; ... 13 more ...; fromNativeBroker?: boolean | undefined; } | undefined; }) => any): void', gave the following error.ts(2769)
useAuthStore.ts(8, 12): The expected type comes from property 'details' which is declared here on type '_DeepPartial<{ details: { authority: string; uniqueId: string; tenantId: string; scopes: string[]; account: { homeAccountId: string; environment: string; tenantId: string; username: string; localAccountId: string; name?: string | undefined; idTokenClaims?: { ...; } | undefined; nativeAccountId?: string | undefined; ...'