Skip to content

Instantly share code, notes, and snippets.

@phoenix2307
Created June 26, 2022 17:20
Show Gist options
  • Save phoenix2307/c8955d5c5cfb96785d0771843c04dc6b to your computer and use it in GitHub Desktop.
Save phoenix2307/c8955d5c5cfb96785d0771843c04dc6b to your computer and use it in GitHub Desktop.
studentType
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