|
|
|
|
|
by ljm
661 days ago
|
|
In TS you can have two types, say: type A = { a: string; b: string }
type B = { a: string; b: string; c: string }
If you created a new object like this: { a: “foo”, b: “bar”, c: “baz” }
It would satisfy both type A and type B.That won’t work quite so easily in go without messing around a bit. |
|
So far it hasn't bitten me in the behind, but I wouldn't advise anyone to use that logic for production code.