Skip to content

Instantly share code, notes, and snippets.

@robertcoopercode
Created January 9, 2019 00:30
Show Gist options
  • Save robertcoopercode/77e7b9bb28dc6e0e06c940d844d946ca to your computer and use it in GitHub Desktop.
Save robertcoopercode/77e7b9bb28dc6e0e06c940d844d946ca to your computer and use it in GitHub Desktop.
let list: [string, string, number];
list = ['apple', 'banana', 8.75]; // ✅
list = ['apple', true, 8.75]; // ❌ - the second argument should be of type string
list = ['apple', 'banana', 10.33, 3]; // ❌ - the tuple specifies a length of 3, not 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment