summaryrefslogtreecommitdiff
path: root/src/webex/notify.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex/notify.ts')
-rw-r--r--src/webex/notify.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/webex/notify.ts b/src/webex/notify.ts
index 887658ef9..9fb0529db 100644
--- a/src/webex/notify.ts
+++ b/src/webex/notify.ts
@@ -47,7 +47,7 @@ const handlers: Handler[] = [];
let sheet: CSSStyleSheet | null;
-function initStyle() {
+function initStyle(): void {
logVerbose && console.log("taking over styles");
const name = "taler-presence-stylesheet";
const content = "/* Taler stylesheet controlled by JS */";
@@ -78,7 +78,7 @@ function initStyle() {
}
}
-function setStyles(installed: boolean) {
+function setStyles(installed: boolean): void {
if (!sheet || !sheet.cssRules) {
return;
}
@@ -93,7 +93,7 @@ function setStyles(installed: boolean) {
}
}
-function onceOnComplete(cb: () => void) {
+function onceOnComplete(cb: () => void): void {
if (document.readyState === "complete") {
cb();
} else {
@@ -105,7 +105,7 @@ function onceOnComplete(cb: () => void) {
}
}
-function init() {
+function init(): void {
onceOnComplete(() => {
if (document.documentElement.getAttribute("data-taler-nojs")) {
initStyle();
@@ -129,13 +129,13 @@ function init() {
type HandlerFn = (detail: any, sendResponse: (msg: any) => void) => void;
-function registerHandlers() {
+function registerHandlers(): void {
/**
* Add a handler for a DOM event, which automatically
* handles adding sequence numbers to responses.
*/
- function addHandler(type: string, handler: HandlerFn) {
- const handlerWrap = (e: Event) => {
+ function addHandler(type: string, handler: HandlerFn): void {
+ const handlerWrap = (e: Event): void => {
if (!(e instanceof Event)) {
console.log("unexpected event", e);
throw Error(`invariant violated`);
@@ -154,7 +154,7 @@ function registerHandlers() {
callId = e.detail.callId;
detail = e.detail;
}
- const responder = (msg?: any) => {
+ const responder = (msg?: any): void => {
const fullMsg = Object.assign({}, msg, { callId });
let opts = { detail: fullMsg };
if ("function" === typeof cloneInto) {