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

fix(schema): exclude functions from DeepPartial - #6176

Merged
pi0 merged 2 commits into
mainfrom
fix/schema-types
Jul 27, 2022
Merged

fix(schema): exclude functions from DeepPartial#6176
pi0 merged 2 commits into
mainfrom
fix/schema-types

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14162

❓ 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

An early return for functions solves some issues with functional types (including missing types for hook, for example). There were also a couple of incorrect types in _app.

📝 Checklist

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

@danielroedanielroe added types 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Jul 27, 2022
@danielroe
danielroe requested a review from pi0July 27, 2022 12:41
@danielroedanielroe self-assigned this Jul 27, 2022
@netlify

netlifyBot commented Jul 27, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitf476a0a
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62e13266bfb24000092bb587

*
* @see [vue@2 Documentation](https://v2.vuejs.org/v2/api/#Global-Config)
* @type {import('vue/types/vue').VueConfiguration}
* @type {typeof import('vue/types/vue').VueConfiguration}

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.

Does it makes sense to automatically infer this in untyped?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

The issue is that we have a two stage build here.

@pi0pi0Jul 27, 2022

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.

Sure. I mean if untyped can add automatically add typeof prefix to import in @type annotations.

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.

(anyway, this fix makes sense. Was thinking of a way to avoid future issues like this)

pi0
pi0 approved these changes Jul 27, 2022
@danielroedanielroe changed the title fix(schema): correctly import app typesfix(schema): exclude functions from DeepPartialJul 27, 2022
@pi0
pi0 merged commit 12ebe3a into mainJul 27, 2022
@pi0
pi0 deleted the fix/schema-types branch July 27, 2022 13:04
@pi0pi0 mentioned this pull request Aug 5, 2022
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 usagetypes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuxt.config's vue types are incorrect

2 participants

@danielroe@pi0