build(deps): update latest
BREAKING CHANGE: peerDependencies: `react@>=18.2.0`
This commit is contained in:
@ -11,7 +11,7 @@ import { handleCheckboxBoolean } from '../utils/handleCheckboxBoolean'
|
||||
import { handleOptionalEmptyStringToNull } from '../utils/handleOptionalEmptyStringToNull'
|
||||
|
||||
export interface Schema {
|
||||
[property: string]: any
|
||||
[property: string | symbol]: any
|
||||
}
|
||||
|
||||
export type Error = ErrorObject
|
||||
|
@ -1,11 +1,11 @@
|
||||
import type { TObject } from '@sinclair/typebox'
|
||||
|
||||
import type { ObjectAny } from './types'
|
||||
import type { Schema } from '../hooks/useForm'
|
||||
|
||||
export const handleCheckboxBoolean = (
|
||||
object: ObjectAny,
|
||||
validateSchemaObject: TObject<ObjectAny>
|
||||
): ObjectAny => {
|
||||
object: Schema,
|
||||
validateSchemaObject: TObject<Schema>
|
||||
): Schema => {
|
||||
const booleanProperties: string[] = []
|
||||
for (const property in validateSchemaObject.properties) {
|
||||
const rule = validateSchemaObject.properties[property]
|
||||
|
@ -1,4 +1,6 @@
|
||||
export const handleOptionalEmptyStringToNull = <K>(
|
||||
import type { Schema } from '../hooks/useForm'
|
||||
|
||||
export const handleOptionalEmptyStringToNull = <K extends Schema>(
|
||||
object: K,
|
||||
required: string[] = []
|
||||
): K => {
|
||||
|
@ -1,3 +0,0 @@
|
||||
export interface ObjectAny {
|
||||
[key: string]: any
|
||||
}
|
Reference in New Issue
Block a user