Created
June 26, 2022 17:20
-
-
Save phoenix2307/c8955d5c5cfb96785d0771843c04dc6b to your computer and use it in GitHub Desktop.
studentType
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
type LocalCityType = { | |
cityTitle: string | |
countryTitle: string | |
} | |
type AddressType = { | |
streetTitle: string | |
city: LocalCityType | |
} | |
type TechType = { | |
id: number | |
title: string | |
} | |
export type StudentType = { | |
id: number | |
name: string | |
age: number | |
isActive: boolean | |
address: AddressType | |
technologies: Array<TechType> | |
} | |
export const student: StudentType = { | |
id: 1, | |
name: 'Alex', | |
age: 42, | |
isActive: false, | |
address: { | |
streetTitle: 'Yaremchuk street 6', | |
city: { | |
cityTitle: 'Chernivtsi', | |
countryTitle: 'Ukraine' | |
} | |
}, | |
technologies: [ | |
{ | |
id: 1, | |
title: 'HTML' | |
}, | |
{ | |
id: 2, | |
title: 'CSS' | |
}, | |
{ | |
id: 3, | |
title: 'React' | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment