vue-api-query
vue-api-query copied to clipboard
Better typescript support
It would be nice to have better typescript support. Like I have defined attributes in model, but the IDE will not detect that the property is that type of model.
Hi! That's because responses might be wrapped in data, so we don't know if the type is Event[] or WrappedResponse<Event[]>. Try using $get() to automatically unwrap it.
new Event().$get().then(response => {
response // Now the response type will be Event[]
})