Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created January 29, 2017 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/6570d28f9d0828bac72aa22b889ea121 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/6570d28f9d0828bac72aa22b889ea121 to your computer and use it in GitHub Desktop.
class User {
public firstName: string; // TypeScript only
public constructor(firstName: string) {
this.firstName = firstName;
}
public sayHello(): void {}
}
let myUser: User = new User(`Henri`);
myUser.firstName;
myUser.sayHello();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment