=== tests/cases/compiler/typeParameterExtendingUnion2.ts === class Animal { run() { } } >Animal : Animal >run : () => void class Cat extends Animal { meow } >Cat : Cat >Animal : Animal >meow : any class Dog extends Animal { woof } >Dog : Dog >Animal : Animal >woof : any function run(a: Cat | Dog) { >run : (a: Cat | Dog) => void >a : Cat | Dog a.run(); >a.run() : void >a.run : (() => void) | (() => void) >a : Cat | Dog >run : (() => void) | (() => void) } function f(a: T) { >f : (a: T) => void >a : T a.run(); >a.run() : void >a.run : (() => void) | (() => void) >a : Cat | Dog >run : (() => void) | (() => void) run(a); >run(a) : void >run : (a: Cat | Dog) => void >a : Cat | Dog }