In TypeScript, generic functions are by default contravariant in the parameter types and covariant in the return type: ![](Contravariance%20and%20covariance.svg) Therefore, the following is acceptable: ```typescript class User { username: string; constructor(username: string) { this.username = username; } } class Admin extends User { isSuperAdmin: boolean; constructor(username: string, isSuperAdmin: boolean) { super(username); this.isSuperAdmin = isSuperAdmin; } } // Covariance function logUsername(user: User): void { console.log(user.username); } logUsername(new Admin('admin1', true)); // Contravariance const admins: Admin[] = [ new Admin('john.smith', false), new Admin('jane.doe', true), new Admin('joker', false) ]; const jokers = admins.filter((user: User): boolean => { return user.username.startsWith('joker'); }); ```