Vue Types Versions Save

Vue Prop Types definitions

[email protected]

2 weeks ago

See the changelog.

[email protected]

9 months ago

See changelog.

[email protected]

10 months ago

[email protected]

10 months ago

[email protected]

1 year ago

5.0.2

1 year ago

Fix

  • expose the validateType function in the shim build (fixes #319)

5.0.1

1 year ago

Note: v5.0.0 has been skipped due to an internal bug. Please use v5.0.1 or above.

Breaking Changes

Default for booleans

bool().def(undefined) explicitly sets the default: undefined property on the type instead of removing it (https://github.com/dwightjack/vue-types/issues/284):

const type = bool().def(true) //  { type: Boolean, default: true }

// vue-types@4
type.def(undefined)//  { type: Boolean }

// vue-types@5
type.def(undefined)//  { type: Boolean, default: undefined }

Nullable strict validation

nullable validates only when a prop value is === null. This change makes it easier to use it with other validators like oneOfType.

oneOfType and oneOf strict validation

When passed a oneOf validator, oneOfType checks the actual values instead of their types.

const type = oneOfType([oneOf(['auto', 'fit-content'] as const), Number]);

// vue-types@4
typeof type === string | number

// @vue-types@5
typeof type === 'auto' | 'fit-content' | number

This makes it easier to define complex validators mixing specific values and generic types.

Standalone Nuxt module

Nuxt support has been moved to a dedicated module: vue-types-nuxt including support for both Nuxt@2 and Nuxt@3. See the usage documentation here: https://dwightjack.github.io/vue-types/guide/installation.html#nuxt

Minor Changes

  • oneOf supports null as a value: oneOf(['on', 'off', null])
  • Support for union types in oneOf (#147)

Other Changes and Notes

  • Documentation migrated to VitePress.
  • Repository structure converted to an NPM monorepo.

4.2.1

1 year ago

Bugfix Release

4.2.0

1 year ago

Main Changes

Other Changes

New Contributors

Full Changelog: https://github.com/dwightjack/vue-types/compare/4.1.1...4.2.0

4.2.0-rc.1

2 years ago
  • Add the nullable validator (#215)