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 cleavejs #405

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

kikuomax
Copy link
Collaborator

Related issues:

Proposed Changes

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

Rewrites the Cleave.js example in the `src/pages/extensions/cleavejs` in
TypeScript. Includes overlooked Vue 2 → 3 migration.

In `examples/ExFormat.vue`:
- Rewrites the `cleave` directive so that it satisfies the Vue 3 API:
  - `bind` → `beforeMount`
  - `unbind` → `unmounted`
  - Removes `name`
- Introduces a new interface `CleaveContainer` to facilitate accessing
  the `_vCleave` field attached to the input element
- Removes the `.native` modifier from the `@input` event binding,
  because it is no longer necessary in Vue 3

In `Cleavejs.vue`:
- Wraps `ExFormat` in `shallowRef` to resolve 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:45
@kikuomax kikuomax merged commit c70ce94 into ntohq:dev Jan 17, 2025
18 checks passed
@kikuomax kikuomax deleted the ts-rollout-tier-16-docs-cleavejs branch January 17, 2025 10:12
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