docs: indicate what useAsyncData must return (#28259)

This commit is contained in:
Aleksei Nagovitsyn 2024-07-23 22:43:24 +02:00 committed by GitHub
parent 00ddd7bdac
commit d5023955d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,7 @@ export function useAsyncData<
* Provides access to data that resolves asynchronously in an SSR-friendly composable.
* See {@link https://nuxt.com/docs/api/composables/use-async-data}
* @param key A unique key to ensure that data fetching can be properly de-duplicated across requests.
* @param handler An asynchronous function that must return a truthy value (for example, it should not be `undefined` or `null`) or the request may be duplicated on the client side.
* @param handler An asynchronous function that must return a value (it should not be `undefined`) or the request may be duplicated on the client side.
* @param options customize the behavior of useAsyncData
*/
export function useAsyncData<