Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

extend typescript

interface Shape {
  color: string;
}
 
interface Square extends Shape {
  sideLength: number;
}
 
let square = {} as Square;
square.color = "blue";
square.sideLength = 10;
Try
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #extend #typescript
ADD COMMENT
Topic
Name
8+6 =