Nuxt/playground/composables/test.ts
2024-11-27 16:53:57 +08:00

15 lines
214 B
TypeScript

interface ResT {
foo: string[]
bar: string[]
}
const { data } = await useFetchCustom<ResT>('/some/endpoint', {
default: () => ({
foo: [],
bar: [],
}),
})
if (data.value) {
const a = data.value
}