Closed Dominic-DallOsto closed 1 month ago
If a function sometimes returns a type and sometimes doesn't, it should be typed as T | undefined, not T | void.
T | undefined
T | void
Also, I think object is preferred over Object
object
Object
If a function sometimes returns a type and sometimes doesn't, it should be typed as
T | undefined
, notT | void
.Also, I think
object
is preferred overObject