feat(types): add IPublicTypeInstanceOf to prop-types

This commit is contained in:
liujuping 2023-11-13 18:46:17 +08:00 committed by 林熠
parent ef6a203a45
commit 9108e8cfab

View File

@ -3,7 +3,7 @@ import { IPublicTypePropConfig } from './';
export type IPublicTypePropType = IPublicTypeBasicType | IPublicTypeRequiredType | IPublicTypeComplexType;
export type IPublicTypeBasicType = 'array' | 'bool' | 'func' | 'number' | 'object' | 'string' | 'node' | 'element' | 'any';
export type IPublicTypeComplexType = IPublicTypeOneOf | IPublicTypeOneOfType | IPublicTypeArrayOf | IPublicTypeObjectOf | IPublicTypeShape | IPublicTypeExact;
export type IPublicTypeComplexType = IPublicTypeOneOf | IPublicTypeOneOfType | IPublicTypeArrayOf | IPublicTypeObjectOf | IPublicTypeShape | IPublicTypeExact | IPublicTypeInstanceOf;
export interface IPublicTypeRequiredType {
type: IPublicTypeBasicType;
@ -40,3 +40,9 @@ export interface IPublicTypeExact {
value: IPublicTypePropConfig[];
isRequired?: boolean;
}
export interface IPublicTypeInstanceOf {
type: 'instanceOf';
value: IPublicTypePropConfig;
isRequired?: boolean;
}