Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Rollout Tier 16 - docs VueBreakpointMixin #407

Merged

Conversation

kikuomax
Copy link
Collaborator

Related issues:

Proposed Changes

  • Migration of packages/docs/src/pages/extensions/vuebreakpointmixin

Rewrites the documentation for the VueBreakpointMixin extension in the
`src/pages/extensions/vuebreakpointmixin` folder in TypeScript. Also
includes overlooked Vue 2 → 3 migration.

In `example/ExVueBreakpointMixin.vue`:
- Imports `VueBreakpointMixin` as `any`, because it does not provide
  types. A newly introduced type `VueBreakpointMixinType` supplements
  the types of the computed values of `VueBreakpointMixin`.
- Adds the `onMounted` and `beforeUnmount` methods to
  `VueBreakpointMixin`, which are aliases of the `mounted` and
  `beforeDestroy` methods respectively, so that `VueBreakpointMixin`
  conforms to the Vue 3 API

In `VueBreakpointMixin.vue`:
- Wraps `ExVueBreakpointMixin` in `shallowRef` to address the warning
  about making a component reactive

A tip for TypeScript migration:
- Explicitly import and register Buefy components so that they are
  type-checked. Note that no type-checking is performed for globally
  registered components.
@kikuomax kikuomax requested a review from wesdevpro January 17, 2025 00:47
@kikuomax kikuomax merged commit ec29113 into ntohq:dev Jan 17, 2025
18 checks passed
@kikuomax kikuomax deleted the ts-rollout-tier-16-docs-vue-breakpoint-mixin branch January 17, 2025 12:07
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