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

fix(schema): exclude functions from DeepPartial #6176

Merged
merged 2 commits into from Jul 27, 2022
Merged

fix(schema): exclude functions from DeepPartial #6176

merged 2 commits into from Jul 27, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/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.

@danielroe danielroe 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 pi0 July 27, 2022 12:41
@danielroe danielroe self-assigned this Jul 27, 2022
@netlify
Copy link

netlify bot commented Jul 27, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit f476a0a
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62e13266bfb24000092bb587

@@ -13,7 +13,7 @@ export default {
* Properties that will be set directly on `Vue.config` for vue@2.
*
* @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
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
Member Author

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.

Copy link
Member

@pi0 pi0 Jul 27, 2022

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
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)

@danielroe danielroe changed the title fix(schema): correctly import app types fix(schema): exclude functions from DeepPartial Jul 27, 2022
@pi0 pi0 merged commit 12ebe3a into main Jul 27, 2022
@pi0 pi0 deleted the fix/schema-types branch July 27, 2022 13:04
@pi0 pi0 mentioned this pull request Aug 5, 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
3.x πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nuxt.config's vue types are incorrect
2 participants