Created
January 9, 2019 00:29
-
-
Save robertcoopercode/ae51ae35f3f59a04eea485f1f5eb0840 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 Animal { | |
kind: string; | |
weight: number; | |
} | |
let dog: Animal; | |
dog = { | |
kind: 'mammal', | |
weight: 10, | |
}; // ✅ | |
dog = { | |
kind: true, | |
weight: 10, | |
}; // ❌ - kind should be a string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment