function injectTextField<TClient extends ViewClient>(view: TextFieldView<TClient>, read: (state: TClient["snapshot"]) => string, write: (client: TClient, value: string) => Promise<unknown>, { injector: provided, ...options }?: InjectTextFieldOptions): TextFieldHandle; Binds a text input to one member of a View for the lifetime of the injection context, through createTextFieldController. Typing key by key never loses characters: while its writes are in flight the field shows what the user typed, at most one write is in flight (newer text is written next), nothing is written during IME composition, and once the last write settled it shows the View's value, including any normalization.
readonly person = injectView(this.page);
readonly name = injectTextField(this.person, state => state.name, (client, value) => client.setName(value));
// <input [value]="name.value()" (input)="name.input($event)"
// (compositionstart)="name.compositionStart()" (compositionend)="name.compositionEnd($event)">write may be a generated setter, a command or a checked write. Its failure sets error and keeps the draft.