Last active
November 29, 2021 15:38
-
-
Save Steakeye/a0ff3f990729c3fdc5c15c489bbdceff to your computer and use it in GitHub Desktop.
TypeScript singleton pattern
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
export const singleton = new (class Singleton { | |
constructor(p: string) {} | |
})('param'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment