Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript constructor assignment shorthand

class User {
  constructor(
    private name: string,
    private surname: string,
    private age: number
  ) {}
}
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #typescript #constructor #assignment #shorthand
ADD COMMENT
Topic
Name
6+9 =