@typed-tabletop-simulator/ui
Version:
JSX wrapper and components for Tabletop Simulator UI
19 lines (18 loc) • 961 B
TypeScript
/** @noSelfInFile */
import { OffsetProp, ScaleProp, ShadowProp, Vector2Prop, VectorProp } from "./base";
export type KeyValuePair = [UIAttributeName, UIAttributeValue];
export type ConvertResult = KeyValuePair | KeyValuePair[];
export type Converter<T> = (this: void, value: T) => ConvertResult;
export type Converters = Record<string, Converter<any>>;
export declare const convert: {
concat: <T>(name: UIAttributeName) => Converter<T[]>;
handlerName: (name: string) => string;
handlerFunction: (param: UIAttributeName) => Converter<any>;
offset: Converter<OffsetProp>;
rename: (newName: UIAttributeName) => Converter<any>;
scale: Converter<ScaleProp>;
shadow: Converter<ShadowProp>;
toggle: (name: UIAttributeName, trueValue: UIAttributeValue, falseValue: UIAttributeValue) => Converter<boolean>;
vector2: (name: UIAttributeName) => Converter<Vector2Prop>;
vector3: (name: UIAttributeName) => Converter<VectorProp>;
};