Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
matt_kantor
on May 4, 2022
|
parent
|
context
|
favorite
| on:
You Are Doing JSON APIs Wrong (“foo”:{}, not “type...
That's not a union. Both `{}` and `{ contentA: a, contentB: b }` inhabit that type, so it doesn't represent "a value of type `Message` is either a value of `ContentAStructure` or a value of `ContentBStructure`".
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: