Nuxt/playground/composables/test.ts

15 lines
214 B
TypeScript
Raw Normal View History

2024-11-27 08:51:07 +00:00
interface ResT {
foo: string[]
bar: string[]
}
const { data } = await useFetchCustom<ResT>('/some/endpoint', {
default: () => ({
foo: [],
bar: [],
}),
})
if (data.value) {
const a = data.value
}