Skip to content

Instantly share code, notes, and snippets.

@lucacicada
Created March 10, 2025 10:52
Show Gist options
  • Save lucacicada/df3b9f4d8725d0357b25c0342ebb7a8c to your computer and use it in GitHub Desktop.
Save lucacicada/df3b9f4d8725d0357b25c0342ebb7a8c to your computer and use it in GitHub Desktop.
Nuxt useFetch extract typings
<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