Originally, all generated TS types did not allow null / undefined values.
Later(see https://github.com/vaadin/vaadin-connect/issues/363), all null / undefined values were explicitly allowed in all generated types (the current state). That has raised a number of DX concerns.
The task of this ticket is to re-consider the approach and see if some aspects of the DX can be improved without hurting the type safety.
DX concerns with the current approach to null / undefined values:
Type 'Measurement | null' is not assignable to type 'Measurement | undefined'.
Type 'null' is not assignable to type 'Measurement | undefined'.ts(2322)
Originally, all generated TS types did not allow null / undefined values. Later(see https://github.com/vaadin/vaadin-connect/issues/363), all null / undefined values were explicitly allowed in all generated types (the current state). That has raised a number of DX concerns. The task of this ticket is to re-consider the approach and see if some aspects of the DX can be improved without hurting the type safety.
DX concerns with the current approach to null / undefined values:
confusion between
null
andundefined
in TS:complex type definitions in the generated TS code. Some details in the review comment to https://github.com/vaadin/vaadin-connect/pull/369
(this particular case is addressed by a separate ticket: https://github.com/vaadin/vaadin-connect/issues/388)