UNPKG

@raona/sp

Version:

Raona utilities to work with Sharepoint using pnp/sp

23 lines (15 loc) 488 B
/* import { Notifier } from './'; export function Singleton<T>() { abstract class Singleton { private static identifier; public constructor(id: string) { this.identifier = 'singleton_' + id; } public static initialize(id: string): void { window[id] = window[id] || new Notifier(id); } public static getInstance(): T { return window[this.identifier]; } } } */