×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Nilesh Yadav
Added: Jul 17, 2017 7:39 AM
Views: 2
Tags: no tags
  1. interface Person{
  2.     fname: string;
  3.     lname: string;
  4.     age?: number; // (optional)
  5. }
  6.  
  7. let employee1: Person = {
  8.     fname:"Chandler",
  9.     lname:"Bing",
  10.     age:30
  11. }
  12.  
  13. let employee2: Person ={
  14.     fname:"Ross",
  15.     lname:"Geller"
  16. }