▲ | stirfish 3 hours ago | |
> should just work if it has the correct fields. Correct fields by...name? By structure? I'm trying to understand. | ||
▲ | b_e_n_t_o_n 2 hours ago | parent [-] | |
By name, type, and structure. In typescript for example:
Then you can use this function on any data type that satisfies that signature, regardless of if it's User, Dog, Manager etc. |