Reformat file
This commit is contained in:
parent
34c4f774f7
commit
3743aeacf6
@ -274,16 +274,16 @@ declare const window;
|
|||||||
* @param uuid The Unique Id of the Dispatcher
|
* @param uuid The Unique Id of the Dispatcher
|
||||||
* @param communicator The provided communicator
|
* @param communicator The provided communicator
|
||||||
*/
|
*/
|
||||||
export function getDispatcher(uuid: string, communicator: ICommunicationInterface){
|
export function getDispatcher(uuid: string, communicator: ICommunicationInterface) {
|
||||||
|
|
||||||
// Get the global variable
|
// Get the global variable
|
||||||
const _global = typeof global !== "undefined" ? global : window;
|
const _global = typeof global !== "undefined" ? global : window;
|
||||||
const _accessor = '__singletons__'+uuid;
|
const _accessor = '__singletons__' + uuid;
|
||||||
const _hasDispatcher = _global[_accessor] !== undefined;
|
const _hasDispatcher = _global[_accessor] !== undefined;
|
||||||
|
|
||||||
if (!_hasDispatcher){
|
if (!_hasDispatcher) {
|
||||||
_global[_accessor] = new nopeDispatcher(communicator);
|
_global[_accessor] = new nopeDispatcher(communicator);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _global[_accessor] as nopeDispatcher
|
return _global[_accessor] as nopeDispatcher
|
||||||
}
|
}
|
@ -15,10 +15,6 @@ export interface IExportPropertyToDispatcherParameters {
|
|||||||
readonly?: boolean
|
readonly?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const unicorn = {
|
|
||||||
test: []
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator used to export a Class API over openAPI
|
* Decorator used to export a Class API over openAPI
|
||||||
* @param options
|
* @param options
|
||||||
@ -33,7 +29,7 @@ export function exportsElementsToDispatcher(options: IExportToDispatcherParamete
|
|||||||
|
|
||||||
// extract the Registered Methods of the Class.
|
// extract the Registered Methods of the Class.
|
||||||
const registeredMethods = Base.prototype[_registeredDispatcherMethods_] as Map<string, IExportMethodToDispatcherParameters>;
|
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
|
// Online if they are present, iterate over them
|
||||||
if (registeredMethods) {
|
if (registeredMethods) {
|
||||||
|
Loading…
Reference in New Issue
Block a user