SqInput.d.ts (993B)
1 import { Input } from "../../value/index.js"; 2 export declare const wrapInput: (value: Input) => SqInput; 3 declare abstract class SqAbstractInput<T extends Input["type"]> { 4 _value: Extract<Input, { 5 type: T; 6 }>; 7 abstract tag: T; 8 constructor(_value: Extract<Input, { 9 type: T; 10 }>); 11 toString(): string; 12 get name(): string; 13 get description(): string | undefined; 14 get default(): string | boolean | undefined; 15 } 16 export declare class SqTextInput extends SqAbstractInput<"text"> { 17 tag: "text"; 18 } 19 export declare class SqTextAreaInput extends SqAbstractInput<"textArea"> { 20 tag: "textArea"; 21 } 22 export declare class SqCheckboxInput extends SqAbstractInput<"checkbox"> { 23 tag: "checkbox"; 24 } 25 export declare class SqSelectInput extends SqAbstractInput<"select"> { 26 tag: "select"; 27 get options(): string[]; 28 } 29 export type SqInput = SqTextInput | SqTextAreaInput | SqSelectInput | SqCheckboxInput; 30 export {}; 31 //# sourceMappingURL=SqInput.d.ts.map