Inferring output type based on `output` option
Closed this issue · 1 comments
4ntke commented
I suggest improving the return type inference. The main function returns a union of type but the return type can be narrowed to the type specified by the value of the output
option. By default, a string
value is returned, because the default value of the output
option is string
. Narrowing the return type based on output
option would be great.