Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

extending an interface in typescript

interface Animal {
  name: string
}
interface Bear extends Animal {
  honey: boolean
}
const bear = getBear() 
bear.name
bear.honey
        
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #extending #interface #typescript
ADD COMMENT
Topic
Name
9+4 =