本文整理匯總了TypeScript中socket.EventBus.createRoute方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript EventBus.createRoute方法的具體用法?TypeScript EventBus.createRoute怎麽用?TypeScript EventBus.createRoute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類socket.EventBus
的用法示例。
在下文中一共展示了EventBus.createRoute方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: registerConsole
export function registerConsole() {
EventBus.createRoute("BEGIN", createConsole, null);
EventBus.createRoute('PRINT_ERROR', updateConsole, null);
EventBus.createRoute('PRINT_OUTPUT', updateConsole, null);
EventBus.createRoute('TERMINATE', terminateConsole, null); // clear focus
EventBus.createRoute('EXIT', terminateConsole, null);
setInterval(showConsole, 200); // prevents reflow overload when console is busy
}
示例2: registerAlerts
export function registerAlerts() {
EventBus.createRoute('ALERT', createAlert);
}
示例3: startProfiler
export function startProfiler() {
EventBus.createRoute("PROFILE", updateProfiler, clearProfiler);
}
示例4: registerProblems
export function registerProblems() {
EventBus.createRoute('PROBLEM', updateProblems);
setInterval(refreshProblems, 1000); // refresh the problems systems every 1 second
}
示例5: showTree
export function showTree() {
reloadTreeAtRoot();
EventBus.createRoute("RELOAD_TREE", reloadTree);
}