HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by quink | Hacker News Reader
Full thread
quink
·
Just make it a well-defined class.
Like option structs in Go. Simple.
View on HN
seivan
·
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.
Reply on news.ycombinator.com