mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-19 15:10:58 +00:00
docs: add status
type for useAsyncData
(#22511)
This commit is contained in:
parent
172ca80c30
commit
ed915edc3c
@ -38,11 +38,14 @@ type AsyncData<DataT, ErrorT> = {
|
|||||||
refresh: (opts?: AsyncDataExecuteOptions) => Promise<void>
|
refresh: (opts?: AsyncDataExecuteOptions) => Promise<void>
|
||||||
execute: (opts?: AsyncDataExecuteOptions) => Promise<void>
|
execute: (opts?: AsyncDataExecuteOptions) => Promise<void>
|
||||||
error: Ref<ErrorT | null>
|
error: Ref<ErrorT | null>
|
||||||
|
status: Ref<AsyncDataRequestStatus>
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AsyncDataExecuteOptions {
|
interface AsyncDataExecuteOptions {
|
||||||
dedupe?: boolean
|
dedupe?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AsyncDataRequestStatus = 'idle' | 'pending' | 'success' | 'error'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Params
|
## Params
|
||||||
|
Loading…
Reference in New Issue
Block a user