Skip to content

Instantly share code, notes, and snippets.

@ksummerlin
Last active December 16, 2015 20:50
Show Gist options
  • Select an option

  • Save ksummerlin/5495776 to your computer and use it in GitHub Desktop.

Select an option

Save ksummerlin/5495776 to your computer and use it in GitHub Desktop.
One option is to define a static function that automatically executes using the 'fat arrow syntax'.
class Foo {
static baseTime: Date;
private static Ctor = (() =>
{
Foo.baseTime = new Date();
Foo.baseTime.setMilliseconds(0);
return null;
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment