Skip to content

Instantly share code, notes, and snippets.

@robertcoopercode
Created January 9, 2019 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertcoopercode/4b58363f87dce352043ff342c4e0611e to your computer and use it in GitHub Desktop.
Save robertcoopercode/4b58363f87dce352043ff342c4e0611e to your computer and use it in GitHub Desktop.
type 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