import { ICommunicationInterface, nopeDispatcher } from "./nopeDispatcher"; import { getSingleton } from "../helpers/singletonMethod"; /** * Function to extract a Singleton Dispatcher * @param communicator The provided communicator */ export function getDispatcher(communicator: ICommunicationInterface) { const container = getSingleton('nopeBackendDispatcher.instance', () => { return new nopeDispatcher(communicator); }); return container.instance }