import { FormControl } from "../controls/form-control.js"; import { FormField } from "./field.js"; // eslint-disable-next-line @typescript-eslint/no-explicit-any export class ProxyFormField extends FormField { constructor( required: boolean, public name: string, public empty_value: T, public parsed_value: T ) { super(required); } getEmptyValue() { return this.empty_value; } async parse() { return { parsable: true, error: null, parsed_value: this.parsed_value, }; } getControl(): FormControl { throw new Error("This field does not have a default control assigned"); } }