Created
January 9, 2019 00:30
-
-
Save robertcoopercode/9e52a47a95121137fd6d1f502ca8f089 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type Student = { | |
id: string; | |
age: number; | |
}; | |
type Employee = { | |
companyId: string; | |
}; | |
let person: Student & Employee; | |
person.age = 21; // ✅ | |
person.companyId = 'SP302334'; // ✅ | |
person.id = '10033402'; // ✅ | |
person.name = 'Henry'; // ❌ - name does not exist in Student & Employee |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment