Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript dynamic interface

interface ISuperCar {
	name: string
	brand: string
}

interface IClassicCar {
	name: string
	brand: string
	release_date: Date
}

interface IShowRoom<T> {
	car: T
	address: string
	phone: number
}

const order: IShowRoom<ISuperCar> = {
	car: {
		name: 'galardo x21',
		brand: 'lamborgini'
	},
	address: 'Jl.sibuta gua hantu no.13',
	phone: 0832889911223
}
 
PREVIOUS NEXT
Tagged: #typescript #dynamic #interface
ADD COMMENT
Topic
Name
1+7 =