Reformat file

This commit is contained in:
Martin Karkowski 2020-08-24 13:34:48 +02:00
parent 34c4f774f7
commit 3743aeacf6
2 changed files with 5 additions and 9 deletions

View File

@ -274,16 +274,16 @@ declare const window;
* @param uuid The Unique Id of the Dispatcher
* @param communicator The provided communicator
*/
export function getDispatcher(uuid: string, communicator: ICommunicationInterface){
export function getDispatcher(uuid: string, communicator: ICommunicationInterface) {
// Get the global variable
const _global = typeof global !== "undefined" ? global : window;
const _accessor = '__singletons__'+uuid;
const _accessor = '__singletons__' + uuid;
const _hasDispatcher = _global[_accessor] !== undefined;
if (!_hasDispatcher){
if (!_hasDispatcher) {
_global[_accessor] = new nopeDispatcher(communicator);
}
return _global[_accessor] as nopeDispatcher
}

View File

@ -15,10 +15,6 @@ export interface IExportPropertyToDispatcherParameters {
readonly?: boolean
}
export const unicorn = {
test: []
}
/**
* Decorator used to export a Class API over openAPI
* @param options
@ -33,7 +29,7 @@ export function exportsElementsToDispatcher(options: IExportToDispatcherParamete
// extract the Registered Methods of the Class.
const registeredMethods = Base.prototype[_registeredDispatcherMethods_] as Map<string, IExportMethodToDispatcherParameters>;
const registeredParams = Base.prototype[_registeredDispatcherParams_] as Map<string, IExportPropertyToDispatcherParameters>;
const registeredParams = Base.prototype[_registeredDispatcherParams_] as Map<string, IExportPropertyToDispatcherParameters>;
// Online if they are present, iterate over them
if (registeredMethods) {