The VaadinForm and VaadinFormField API have TypeScript type definitions that inclcude a type parameter to define the types of the form fields. That allows build-time type checking of all form-handling code.
import {VaadinForm} from '@vaadin/vaadin-form';
import {Order} from './entities/order';
const form = new VaadinForm<Order>();
form.value = new Order(); // type-checked
// form properties are based on the form entity type
form.username.validator = [...];
The
VaadinForm
andVaadinFormField
API have TypeScript type definitions that inclcude a type parameter to define the types of the form fields. That allows build-time type checking of all form-handling code.