Last active
December 16, 2015 20:50
-
-
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'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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