Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

class typescript constructor

class Point {
  x: number;
  y: number;
 
  // Normal signature with defaults
  constructor(x = 0, y = 0) {
    this.x = x;
    this.y = y;
  }
}
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #class #typescript #constructor
ADD COMMENT
Topic
Name
9+7 =