-
-
Save ankitamasand/0579e6c612a4444b60baa2db171b5dba 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
interface TeslaModelSMap { | |
engineer: string, | |
model: TeslaModelS, | |
readonly rating: number | |
} | |
interface TeslaModelSReview { | |
[id: number]: TeslaModelSMap | |
} | |
const TeslaModelSReviewQueue: TeslaModelSReview = [ | |
{ | |
engineer: 'John', | |
model: modelByJohn1, // modelByJohn1 is of type `TeslaModelS` | |
rating: 2 | |
}, | |
{ | |
engineer: 'Ray', | |
model: modelByRay1, // modelByRay1 is of type `TeslaModelS` | |
rating: 3 | |
}, | |
{ | |
engineer: 'John', | |
model: modelByJohn2, // modelByJohn2 is of type `TeslaModelS` | |
rating: 4 | |
}, | |
// ... other 97 models | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment