Skip to main content
Module

x/tstl/thread/Singleton.ts>Singleton

TypeScript-STL (Standard Template Library, migrated from C++)
Latest
class Singleton
import { Singleton } from "https://deno.land/x/tstl@v3.0.0/thread/Singleton.ts";

Singleton generator.

Constructors

new
Singleton(closure: (...args: Args) => T)

Type Parameters

T
optional
Args extends any[] = []

Properties

private
readonly
closure_: (...args: Args) => T
private
value_: T | object

Methods

get(...args: Args): T