const CatDog = { bark(){}, meow(){} }
const TreeCat = { bark: "oak", meow(){} }
To make types discriminatable you need either
type A = { bark: fn, meow?: never } | { bark?: never, meow: fn } type B = { species: "dog", bark: fn } | { species: "cat", meow: fn } or use instanceof with a class
To make types discriminatable you need either