UNPKG

@redhare/lowcode-types

Version:

Types for Ali lowCode engine

44 lines (43 loc) 1.42 kB
import { IPublicTypePropConfig } from './'; export declare type IPublicTypePropType = IPublicTypeBasicType | IPublicTypeRequiredType | IPublicTypeComplexType; export declare type IPublicTypeBasicType = 'array' | 'bool' | 'func' | 'number' | 'object' | 'string' | 'node' | 'element' | 'any'; export declare 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; }