-
-
Save mredem96/b201a323d3e884d325860353cbba248f to your computer and use it in GitHub Desktop.
This file contains 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
// It is the worht mentioning that Putting I+your interface name is best practice | |
// we define our Date shape object | |
interface IDate { | |
year:number; | |
month:number; | |
day:number; | |
} | |
interface IPerson{ | |
name:string; | |
gender:string; | |
birthday:Date; // here we can easily use our defined interface | |
} | |
// now we have all the fields Person and Student | |
interface IStudent extends IPerson{ | |
department:string; | |
courseSection:number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment