method ScopeManager.prototype.setSingleton
ScopeManager.prototype.setSingleton(
token: string,
instance: unknown
): void

Stores a singleton instance (shared across all scopes).

Parameters

token: string

The capability token

instance: unknown

The instance to cache

Return Type

void

Usage

import { ScopeManager } from "di-plugin/src/index.ts";