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

fix(nuxi): build all types on typecheck command - #5437

Merged
pi0 merged 4 commits into
nuxt:mainfrom
cawa-93:patch-2
Aug 23, 2022
Merged

fix(nuxi): build all types on typecheck command#5437
pi0 merged 4 commits into
nuxt:mainfrom
cawa-93:patch-2

Conversation

@cawa-93

@cawa-93cawa-93 commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

🔗 Linked issue

fix: nuxt/nuxt#12845

❓ 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

The writeTypes method only creates nuxt.d.ts and types/nitro.d.ts, ignoring plugins types, components, autoimport, composables and so on. As a result, type checking fails with false positives errors.

The easiest way to generate all types is to call the buildNuxt method with the _prepare: true option for better performance

📝 Checklist

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

@netlify

netlifyBot commented Jun 13, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commita222ee0
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63053d5a8fcf2400085362c5

@cawa-93
cawa-93 marked this pull request as draft June 13, 2022 09:41
@cawa-93
cawa-93 marked this pull request as ready for review June 13, 2022 09:44
@cawa-93cawa-93 changed the title fix: build all types on typecheck commandfix(nuxi): build all types on typecheck commandJun 13, 2022
@ady642

Copy link
Copy Markdown

I think we can merge this PR

@pi0
pi0 requested a review from danielroeAugust 23, 2022 20:54
pi0
pi0 approved these changes Aug 23, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks <3 LGTM waiting for @danielroe to double check.

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@pi0
pi0 merged commit 422d5c4 into nuxt:mainAug 23, 2022
@cawa-93
cawa-93 deleted the patch-2 branch August 23, 2022 21:05
@pi0pi0 mentioned this pull request Aug 26, 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.

nuxi typecheck shortcut

4 participants

@cawa-93@ady642@pi0@danielroe