UNPKG

slightning-coco-widget

Version:

SLIGHTNING 的 CoCo 控件框架。

47 lines (46 loc) 2.18 kB
import * as CoCo from "../../coco"; import * as CreationProject1 from "../../creation-project-1"; import * as CreationProject2 from "../../creation-project-2"; import { ChildTypeInfo, Type } from "./type"; export declare enum StringEnumInputType { DROPDOWN = "INLINE", OPTION_SWITCH = "OPTION_SWITCH" } type StandardEntry<T extends string> = { label: string; value: T; }; type Entry<T extends string> = ({ label: string; value: T; } | [string, T] | T); export declare class StringEnumType<T extends string> implements Type<T> { readonly entries: StandardEntry<T>[]; readonly inputType: StringEnumInputType; readonly valueToLabelMap: Record<T, string>; readonly values: T[]; constructor(entries: Entry<T>[]); constructor(props: { entries: Entry<T>[]; inputType?: StringEnumInputType | null | undefined; } | Entry<T>[]); validate(this: this, value: unknown): value is T; getSameDirectionChildren(this: this): ChildTypeInfo[]; getReverseDirectionChildren(this: this): ChildTypeInfo[]; isVoid(this: this): boolean; typeToString(this: this): string; inlineTypeToString(this: this): string; toCoCoPropertyValueTypes(this: this): CoCo.PropertyValueTypes; toCoCoMethodParamValueTypes(this: this): CoCo.MethodParamValueTypes; toCoCoMethodValueTypes(this: this): CoCo.MethodValueTypes; toCoCoEventParamValueTypes(this: this): CoCo.EventParamValueTypes; toCreationProject1PropValueTypes(this: this): CreationProject1.PropValueTypes; toCreationProject1MethodParamValueTypes(this: this): CreationProject1.MethodParamValueTypes; toCreationProject1MethodValueTypes(this: this): CreationProject1.MethodValueTypes; toCreationProject1EmitParamValueTypes(this: this): CreationProject1.EmitParamValueTypes; toCreationProject2PropValueTypes(this: this): CreationProject2.PropValueTypes; toCreationProject2MethodParamValueTypes(this: this): CreationProject2.MethodParamValueTypes; toCreationProject2MethodValueTypes(this: this): CreationProject2.MethodValueTypes; toCreationProject2EmitParamValueTypes(this: this): CreationProject2.EmitParamValueTypes; } export {};