Answers for "extending an interface in typescript"

4

typescript extend interface

//declare interface to be extended
interface Vehicle {
  brand: string;
  plateNumber: number;
}

interface Car extends Vehicle {}
Posted by: Guest on December-07-2020
0

extending an interface in typescript

interface Animal {
  name: string
}
interface Bear extends Animal {
  honey: boolean
}
const bear = getBear() 
bear.name
bear.honey
Posted by: Guest on June-17-2021

Code answers related to "extending an interface in typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language