getOrCreateGlobalSingleton()
Home > @backstage/version-bridge
> getOrCreateGlobalSingleton
Serializes access to a global singleton value, with the first caller creating the value.
Signature:
function getOrCreateGlobalSingleton<T>(id: string, supplier: () => T): T;
Parameters
Parameter |
Type |
Description |
---|---|---|
id |
string | |
supplier |
() => T |
T