Skip to content

Instantly share code, notes, and snippets.

@ZackDeRose
Created January 13, 2019 23:50
Show Gist options
  • Save ZackDeRose/5612bea6731af9d094467fa64c6b80ef to your computer and use it in GitHub Desktop.
Save ZackDeRose/5612bea6731af9d094467fa64c6b80ef to your computer and use it in GitHub Desktop.
foo.ts
export class Foo {
private static _count = 0;
id: number;
constructor() {
this.id = ++Foo._count; // starts with 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment