1let userTestStatus: { id: number, name: string }[] = [
2 { "id": 0, "name": "Available" },
3 { "id": 1, "name": "Ready" },
4 { "id": 2, "name": "Started" }
5];
6
7userTestStatus[34978].nammme; // Error: Property 'nammme' does not exist on type [...]
8
1type submitionDataType = {
2 title: string,
3 desc: string,
4 decks: Array<{ front: string, back: string }>
5}
1// Create an interface that describes your object
2interface Car {
3 name: string;
4 brand: string;
5 price: number;
6}
7
8// The variable `cars` below has a type of an array of car objects.
9let cars: Car[];