Fixed ApiFetch type, now returning Promise< T > instead of Promise< void >. This way main project can declare type returned by the promise dynamically.
Example:
const fetchTest = async () => {
// we now can define response type MyType
const response : MyType = await $apiFetch(`backend.test/api/test`, {
method: 'GET'
})
// ...
}
Fixed ApiFetch type, now returning Promise< T > instead of Promise< void >. This way main project can declare type returned by the promise dynamically. Example: