Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Declaring multiple variables in single line + Angular 2 & TypeScript

Coming from Java background and taking toddler steps in Angular 2 with TypeScript, gives scope for so many comparisons. We can declare variables with types name : string inside a class in Angular 2 / TypeScript. How do i declare multiple variables of same type in single shot ? Is there a way to declare like name, designation, email : string in single line ?

like image 395
BeingSuman Avatar asked Jul 27 '16 10:07

BeingSuman


1 Answers

There is no syntax that would work as just writing the type for each variable individually.

like image 189
muetzerich Avatar answered Oct 02 '22 23:10

muetzerich