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

docs(api): fix useAsyncData signature #7242

Merged
merged 1 commit into from
Sep 5, 2022
Merged

docs(api): fix useAsyncData signature #7242

merged 1 commit into from
Sep 5, 2022

Conversation

cawa-93
Copy link
Contributor

@cawa-93 cawa-93 commented Sep 5, 2022

Update signature acording to

export interface AsyncDataOptions<
DataT,
Transform extends _Transform<DataT, any> = _Transform<DataT, DataT>,
PickKeys extends KeyOfRes<_Transform> = KeyOfRes<Transform>
> {
server?: boolean
lazy?: boolean
default?: () => DataT | Ref<DataT> | null
transform?: Transform
pick?: PickKeys
watch?: MultiWatchSources
initialCache?: boolean
}
export interface RefreshOptions {
_initial?: boolean
}
export interface _AsyncData<DataT, ErrorT> {
data: Ref<DataT | null>
pending: Ref<boolean>
refresh: (opts?: RefreshOptions) => Promise<void>
error: Ref<ErrorT | null>
}

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I noticed that the signature in the documentation was different from the actual one and made the changes.

In particular, documented that data now may be null, after f350a70

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit c42b7fe
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6315dd6ceb25e700091f88bd
😎 Deploy Preview https://deploy-preview-7242--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@pi0 pi0 changed the title docs(useAsyncData): fix signature docs(api): fix useAsyncData signature Sep 5, 2022
@pi0 pi0 merged commit 8a81f2a into nuxt:main Sep 5, 2022
@pi0
Copy link
Member

pi0 commented Sep 5, 2022

Thanks!

@cawa-93 cawa-93 deleted the patch-2 branch September 5, 2022 11:54
This was referenced Sep 9, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants