MapComplete/UI/Input/InputElement.ts
2022-06-06 19:37:22 +02:00

13 lines
413 B
TypeScript

import {Store, UIEventSource} from "../../Logic/UIEventSource";
import BaseUIElement from "../BaseUIElement";
export interface ReadonlyInputElement<T> extends BaseUIElement{
GetValue(): Store<T>;
IsValid(t: T): boolean;
}
export abstract class InputElement<T> extends BaseUIElement implements ReadonlyInputElement<any>{
abstract GetValue(): UIEventSource<T>;
abstract IsValid(t: T): boolean;
}