Skip to content

Commit

Permalink
feat(types): add IPublicTypeInstanceOf to prop-types
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping authored and JackLian committed Nov 14, 2023
1 parent ef6a203 commit 9108e8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/types/src/shell/type/prop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,3 +40,9 @@ export interface IPublicTypeExact {
value: IPublicTypePropConfig[];
isRequired?: boolean;
}

export interface IPublicTypeInstanceOf {
type: 'instanceOf';
value: IPublicTypePropConfig;
isRequired?: boolean;
}

0 comments on commit 9108e8c

Please sign in to comment.