manchenkoff / nuxt-auth-sanctum

Nuxt module for Laravel Sanctum authentication
https://manchenkoff.gitbook.io/nuxt-auth-sanctum/
MIT License
171 stars 21 forks source link

useSanctumClient() does not show typescript warnings #232

Open alexandrmucha opened 5 hours ago

alexandrmucha commented 5 hours ago

Hi, I would like to use client from const client = useSanctumClient() instead of $fetch. The problem is that I am not getting the typescript warnings like I am used to with $fetch. Is this a bug, or can I turn it on somehow? I use visual studio code.

const client = useSanctumClient();

const { data } = await useAsyncData('itemData', () =>
  client(`/item/${id}/data`)
);
manchenkoff commented 2 hours ago

Hey @alexandrmucha, what kind of warnings do you expect from this code?

I don't think it is a bug since useSanctumClient returns an instance of $fetch.create(). You can see more details here - Docs.