fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
27 lines (26 loc) • 822 B
TypeScript
import { ElementType } from '../../internal';
import { InputBlockFoxFields } from '../rdo/modal-block.rdo';
export interface IPluginFormBlock extends InputBlockFoxFields {
elementType: ElementType;
id: string;
label: string | null;
multi?: boolean;
custom?: boolean;
text?: string;
value: string | null;
files?: string[];
}
export declare class PluginFormBlockDto extends InputBlockFoxFields implements IPluginFormBlock {
id: string;
label: string | null;
elementType: ElementType;
multi?: boolean;
custom?: boolean;
text?: string;
value: string | null;
files?: string[];
setLabel(label: string): this;
setValue(value: string): this;
setText(text: string): this;
setParam<T extends keyof PluginFormBlockDto>(name: T, value: this[T]): this;
}