jquense / yup

Dead simple Object schema validation
MIT License
22.93k stars 934 forks source link

'"yup"' has no exported member named 'SchemaOf' #2118

Closed Reibnitz closed 1 year ago

Reibnitz commented 1 year ago

Describe the bug Yup has no exported member named SchemaOf

To Reproduce

import { SchemaOf, object, ref, string } from 'yup'

import { ChangePasswordFormEntity } from './change-password-page'

export const changePasswordSchema: SchemaOf<ChangePasswordFormEntity> = object({
  username: string().required(),
  oldPassword: string().required(),
  newPassword: string().required(),
  repeatNewPassword: string()
    .required()
    .equals([ref('newPassword')]),
})

Expected behavior SchemaOf should be available

Platform (please complete the following information):

Additional context Was working fine on 0.32.11

jquense commented 1 year ago

correct, as of v1 that type no longer exists. I would suggest reading the migration issue and docs