Skip to content

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented Apr 23, 2023

πŸ”— Linked issue

#465

❓ 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 useContext in capi.legacy is incompatible with the useContext in @nuxtjs/composition-api.
As far as the content is concerned, it looks no different from @nuxtjs/composition-api, so I extended the type in a similar way.

https://github.com/nuxt-community/composition-api/blob/main/src/runtime/composables/context.ts#L25-L31

πŸ“ Checklist

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

@wattanx wattanx marked this pull request as ready for review April 23, 2023 06:18
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

This looks good to me, though we may well move necessary types across from @nuxt/types and remove dependency later on, to reduce dependency on Nuxt 2-specific types, given that Bridge is meant as a temporary solution whilst migrating to Nuxt 3.

@danielroe danielroe changed the title fix: fix context typing fix: type nuxt 2 context with @nuxt/types Apr 24, 2023
@danielroe danielroe merged commit 3e234e3 into nuxt:main Apr 24, 2023
@wattanx wattanx deleted the fix-context-typing branch April 25, 2023 02:32
@danielroe danielroe mentioned this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants