Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created January 29, 2017 09:49
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