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

fix(schema): decrease recursion on DeepPartial - #4695

Merged
pi0 merged 1 commit into
mainfrom
fix/decrease-recursing
Apr 29, 2022
Merged

fix(schema): decrease recursion on DeepPartial#4695
pi0 merged 1 commit into
mainfrom
fix/decrease-recursing

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#13838

❓ 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

This slightly improves performance of the recursive DeepPartial type. I'm not sure why we had the union here, but removing it does improve the performance of defineNuxtConfig.

We could also allow an escape hatch from DeepPartial with a complementary utility type - might be worth considering if this happens again. UserConfig here is already partial, and doesn't need to be processed.

📝 Checklist

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

@danielroedanielroe added types schema 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Apr 28, 2022
@danielroe
danielroe requested a review from pi0April 28, 2022 16:27
@danielroedanielroe self-assigned this Apr 28, 2022
@netlify

netlifyBot commented Apr 28, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit36b96d3
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/626ac05f7cd14f000807a260

pi0
pi0 approved these changes Apr 29, 2022
@pi0pi0 changed the title fix(schema): decrease recursion on DeepPartialfix(schema): decrease recursion on DeepPartialApr 29, 2022
@pi0
pi0 merged commit 59a8d43 into mainApr 29, 2022
@pi0
pi0 deleted the fix/decrease-recursing branch April 29, 2022 08:50
@pi0

pi0 commented Apr 29, 2022

Copy link
Copy Markdown
Member

Nice fix!

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usageschematypes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuxt config ts error

2 participants

@danielroe@pi0