×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Nilesh Yadav
Added: Aug 2, 2017 1:42 PM
Views: 2
Tags: no tags
  1. type PartyZone = "pizza hut" | "waterpark" | "bowling alley" | "abandoned warehouse";
  2.  
  3. function goToParty (place: PartyZone): string {
  4.   return `lets go to the ${place}`;
  5. }
  6.  
  7. goToParty("pizza hut");
  8. goToParty("chuck e. cheese"); // Argument of type `"chuck e. cheese"' is not assignable to parameter of type 'PartyZone'