Created
July 29, 2020 21:45
-
-
Save sudomaxime/051c957a8a935f17e3065ce85a998e1e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 AnimalCompare { | |
isDog (): boolean | |
} | |
class Cat implements AnimalCompare {...}; | |
class Dog implements AnimalCompare {...}; | |
const animals = [ | |
new Cat, | |
new Dog, | |
]; | |
animals.map(animal => animal.isDog()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment