Last active
August 29, 2015 14:00
-
-
Save AJamesPhillips/11308972 to your computer and use it in GitHub Desktop.
Does not error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Animal { | |
size: number; | |
} | |
interface Cat extends Animal { | |
furry: boolean; | |
} | |
interface Human extends Animal { | |
name: string; | |
} | |
interface CatVeterinarian { | |
checkup(a: Cat, owner: Human): void; | |
} | |
interface HumanDoctor { | |
checkup(a: Human): void; | |
} | |
class UniversalDoctor implements CatVeterinarian, HumanDoctor { | |
// would expect this to error but it does not | |
checkup() { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment