Feature: Optional field foo? should be translated to js.UndefOr
Opened this issue · 2 comments
exoego commented
TypeScript has foo?
notation to indicate optional (can be null/undefined) type
Currently, scalajs-ts-importer converts foo?: T;
into foo: T
which can not accept js.undefined
.
I think it should be converted to js.UndefOr[T]
sjrd commented
The link to the TypeScript documentation you gave is about optional parameters, but your issue talks about optional fields.
exoego commented
Sorry, updated the links.