UNPKG

zent

Version:

一套前端设计语言和基于React的实现

22 lines (21 loc) 1.53 kB
import type { UnknownFieldSetModelChildren } from '../utils'; import type { FieldArrayModel } from './array'; import type { IModel } from './base'; import type { BasicModel } from './basic'; import type { FieldModel } from './field'; import type { FormModel } from './form'; import type { ModelRef } from './ref'; import type { FieldSetModel } from './set'; export declare const FORM_ID: unique symbol; export declare const MODEL_ID: unique symbol; export declare const FIELD_ID: unique symbol; export declare const REF_ID: unique symbol; export declare const FIELD_ARRAY_ID: unique symbol; export declare const SET_ID: unique symbol; export declare function isModel<T>(maybeModel: any): maybeModel is BasicModel<T>; export declare function isFieldModel<T>(maybeModel: any): maybeModel is FieldModel<T>; export declare function isModelRef<T, P extends IModel<any>, M extends IModel<T>>(maybeModelRef: any): maybeModelRef is ModelRef<T, P, M>; export declare function isFieldArrayModel<Item, Child extends IModel<Item> = IModel<Item>>(maybeModel: any): maybeModel is FieldArrayModel<Item, Child>; export declare function isFieldSetModel<Children extends UnknownFieldSetModelChildren>(maybeModel: any): maybeModel is FieldSetModel<Children>; export declare function isFormModel<Children extends UnknownFieldSetModelChildren>(maybeModel: any): maybeModel is FormModel<Children>; export declare function typeOfModel(model: any): "FieldArrayModel" | "FormModel" | "FieldModel" | "FieldSetModel" | "ModelRef" | "BasicModel" | "unknown";