Abstract
Abstract singleton class
import { Singleton } from '@biorate/singleton';class Test extends Singleton { public static get() { return this.instance<Test>(); }}const instance1 = Test.get();const instance2 = Test.get();console.log(instance1 === instance2); // true Copy
import { Singleton } from '@biorate/singleton';class Test extends Singleton { public static get() { return this.instance<Test>(); }}const instance1 = Test.get();const instance2 = Test.get();console.log(instance1 === instance2); // true
Protected
Static
Generated using TypeDoc
Description
Abstract singleton class
Example