import type { ISchema } from './schema' export type IObjectAny = IDictionary export type IWindow = typeof window export interface IDictionary { [index: string]: T } /** * 可以是同步状态值,也可以是 Promise 异步值 */ export type IMaybePromise = T | Promise /** * 让对象属性部分必填 */ export type IPartRequired = Omit & Required> /** * 让对象属性部分可选 */ export type IPartPartial = Omit & Partial> /** * 让对象属性部分可选 * @deprecated please use IPartPartial */ export type IOptional = IPartPartial /** * 让对象属性去掉只读限制 */ export type IWriteable = { -readonly [P in keyof T]: T[P] } /** * 让对象属性去掉只读限制,深递归处理 */ export type IDeepWriteable = { -readonly [P in keyof T]: IDeepWriteable } /** * 让对象属性变为只读,深递归处理 */ export type IDeepReadonly = { readonly [P in keyof T]: IDeepReadonly } export type IPath = Array export type IApiPath = string | IPath export interface ICommonProps { // 渲染器 schema schema: S // 渲染器路径 path: IPath }