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 10 - Datetimepicker #380

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

kikuomax
Copy link
Collaborator

Related issues:

Proposed Changes

  • Migration of datetimepicker

Rewrites `Datetimepicker` in the `src/components/datetimepicker` folder
in TypeScript:
- `modelValue` allow `null`
- Replaces `isNaN(date)` with `isNaN(date.valueOf())` which should
  produce an equivalent result
- Introduces new types:
  - `DatetimeFormatter`: type of the `datetimeFormatter` prop
  - `DatetimeParser`: type of the `datetimeParser` prop
  - `DatetimeCreator`: type of the `datetimeCreator` prop

Here is a tip for TypeScript migration:
- Register Buefy components with "direct" names rather than the `name`
  fields so that they are type-checked
Rewrites the spec for `Datetimepicker` in the
`src/components/datetimepicker` folder in TypeScript.

All the changes are straightforward. Here are a tip for Jest → Vitest
migration:
- Import the spec building blocks from the `vitest` package
`rollup.config.mjs` removes "datetimepicker" from `JS_COMPONENTS`.
Rewrites the documentation for `Datetimepicker` in the
`src/pages/components/datetimepicker` folder in TypeScript.

In `examples/ExEditable.vue`:
- Adds a missing field `enableSeconds` to `data`, which is `false`
  anyway

Other changes are straightforward. Here is a tip for TypeScript
migration:
- Explicitly import and register 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 13, 2025 13:51
@kikuomax kikuomax merged commit a71f31b into ntohq:dev Jan 14, 2025
18 checks passed
@kikuomax kikuomax deleted the ts-rollout-tier-10-datetimepicker branch January 14, 2025 00:16
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.

TypeScript Rollout Tier 10
2 participants