Getters/setters are required when their corresponding type permits undefined
, cannot be marked optional
#46448
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Bug Report
It requires filed which is a getter and setter for optional filed in return value
π Search Terms
getters setters existential type
π Version & Regression Information
typescript version: 4.3.5
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
error: a required field is missing, although it is optional
π Expected behavior
the returned object does not conflict with the declared type
The text was updated successfully, but these errors were encountered: