forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprop-types.ts
More file actions
48 lines (44 loc) · 1.35 KB
/
prop-types.ts
File metadata and controls
48 lines (44 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* eslint-disable max-len */
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 | IPublicTypeInstanceOf;
export interface IPublicTypeRequiredType {
type: IPublicTypeBasicType;
isRequired?: boolean;
}
export interface IPublicTypeOneOf {
type: 'oneOf';
value: string[];
isRequired?: boolean;
}
export interface IPublicTypeOneOfType {
type: 'oneOfType';
value: IPublicTypePropType[];
isRequired?: boolean;
}
export interface IPublicTypeArrayOf {
type: 'arrayOf';
value: IPublicTypePropType;
isRequired?: boolean;
}
export interface IPublicTypeObjectOf {
type: 'objectOf';
value: IPublicTypePropType;
isRequired?: boolean;
}
export interface IPublicTypeShape {
type: 'shape';
value: IPublicTypePropConfig[];
isRequired?: boolean;
}
export interface IPublicTypeExact {
type: 'exact';
value: IPublicTypePropConfig[];
isRequired?: boolean;
}
export interface IPublicTypeInstanceOf {
type: 'instanceOf';
value: IPublicTypePropConfig;
isRequired?: boolean;
}