Created
March 10, 2025 10:52
-
-
Save lucacicada/df3b9f4d8725d0357b25c0342ebb7a8c to your computer and use it in GitHub Desktop.
Nuxt useFetch extract typings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
import type { FetchResult } from '#app' | |
type Data = FetchResult<'/api/something', 'get'> | |
const { data } = await useFetch('/api/something') | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment