mapcomplete/UI/Input/InputElement.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
410 B
TypeScript
Raw Normal View History

2022-09-08 21:40:48 +02:00
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import BaseUIElement from "../BaseUIElement"
2022-09-08 21:40:48 +02:00
export interface ReadonlyInputElement<T> extends BaseUIElement {
GetValue(): Store<T>
IsValid(t: T): boolean
}
2022-09-08 21:40:48 +02:00
export abstract class InputElement<T> extends BaseUIElement implements ReadonlyInputElement<any> {
abstract GetValue(): UIEventSource<T>
abstract IsValid(t: T): boolean
2020-07-23 17:32:18 +02:00
}