@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
25 lines (24 loc) • 583 B
TypeScript
declare enum Type {
BOOLEAN = "boolean",
BUTTON = "button"
}
type Input = boolean | null;
type InputMapGeneric = {
[key in Type]: Input;
};
interface InputMap extends InputMapGeneric {
[Type.BOOLEAN]: boolean;
[Type.BUTTON]: null;
}
type Output = 0 | 1 | null;
type OutputMapGeneric = {
[key in Type]: Output;
};
interface OutputMap extends OutputMapGeneric {
[Type.BOOLEAN]: 0 | 1;
[Type.BUTTON]: null;
}
export declare class ParamsValueToDefaultConverter {
static convert<T extends Type>(type: T, value: InputMap[T]): OutputMap[T];
}
export {};