Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
docs(api): fix useAsyncData signature (#7242)
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 authored Sep 5, 2022
1 parent 2db8fec commit 8a81f2a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/content/3.api/1.composables/use-async-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ function useAsyncData(
type AsyncDataOptions<DataT> = {
server?: boolean
lazy?: boolean
default?: () => DataT | Ref<DataT>
default?: () => DataT | Ref<DataT> | null
transform?: (input: DataT) => DataT
pick?: string[]
watch?: WatchSource[]
initialCache?: boolean
}

type AsyncData<DataT> = {
data: Ref<DataT>
interface RefreshOptions {
_initial?: boolean
}

type AsyncData<DataT, ErrorT> = {
data: Ref<DataT | null>
pending: Ref<boolean>
refresh: () => Promise<void>
error: Ref<any>
refresh: (opts?: RefreshOptions) => Promise<void>
error: Ref<ErrorT | null>
}


```

## Params
Expand Down

0 comments on commit 8a81f2a

Please sign in to comment.