Y
Hacker News
new
|
ask
|
show
|
jobs
by
quink
265 days ago
Just make it a well-defined class.
Like option structs in Go. Simple.
1 comments
seivan
265 days ago
That would pollute the namespace. The type could be namespaced under the function signature, it's not its own type unless you extract it with FunctionParamater<typeof ..>[0] or along those lines.
link