Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

docs(api): fix useAsyncData signature - #7242

Merged
pi0 merged 1 commit into
nuxt:mainfrom
cawa-93:patch-2
Sep 5, 2022
Merged

docs(api): fix useAsyncData signature#7242
pi0 merged 1 commit into
nuxt:mainfrom
cawa-93:patch-2

Conversation

@cawa-93

Copy link
Copy Markdown
Contributor

Update signature acording to

exportinterfaceAsyncDataOptions<
DataT,
Transformextends_Transform<DataT,any>=_Transform<DataT,DataT>,
PickKeysextendsKeyOfRes<_Transform>=KeyOfRes<Transform>
>{
server?: boolean
lazy?: boolean
default?: ()=>DataT|Ref<DataT>|null
transform?: Transform
pick?: PickKeys
watch?: MultiWatchSources
initialCache?: boolean
}
exportinterfaceRefreshOptions{
_initial?: boolean
}
exportinterface_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

netlifyBot commented Sep 5, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commitc42b7fe
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6315dd6ceb25e700091f88bd
😎 Deploy Previewhttps://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.

@pi0pi0 changed the title docs(useAsyncData): fix signaturedocs(api): fix useAsyncData signatureSep 5, 2022
@pi0
pi0 merged commit 8a81f2a into nuxt:mainSep 5, 2022
@pi0

pi0 commented Sep 5, 2022

Copy link
Copy Markdown
Member

Thanks!

@cawa-93
cawa-93 deleted the patch-2 branch September 5, 2022 11:54
This was referenced Sep 9, 2022
Sign up for freeto 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

@cawa-93@pi0@danielroe