Repository URL to install this package:
|
Version:
3.5.8 ▾
|
// @note @circular
import { InputState } from './inputs/InputState'
export interface ValidatorMeta {
input: InputState
// form: FormState
}
export type Value = string | number | boolean
export type Type =
| 'checkbox'
| 'password'
| 'color'
| 'date'
| 'text'
| 'number'
// ^ are main
| 'search'
| 'range'
| 'tel'
| 'email'
| 'url'
export type ValidatorFunction = (
value: Value,
meta?: ValidatorMeta
) => boolean | string
// | ValueType[] | { [key: string]: ValueType }
export type SerializerFunction<ValueType = any> = (
inputState: InputState
) => { [key: string]: ValueType }
export interface SerializedObj {
[key: string]: string
}
export { ThemedOuterStyledProps } from 'styleh-components'
import { StyledComponentClass } from 'styleh-components'
export type StylehComponent<Props> = StyledComponentClass<Props, any>
export interface AnyObj {
[key: string]: any
}
// @thought for CommonState
// interface IValidatable {}
// interface ISerializable {}
// interface IMergable {}
// interface IIdentifiable {}