convert index.js to typescript

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/13032/head
Michael Telatynski 2020-04-05 00:27:59 +01:00
parent 20442413bf
commit 093b7bbf72
2 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,7 @@ if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
}
async function settled(prom) {
async function settled(prom: Promise<any>) {
try {
await prom;
} catch (e) {

View File

@ -31,7 +31,8 @@ import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake";
export function initRageshake() {
rageshake.init().then(() => {
const prom = rageshake.init();
prom.then(() => {
console.log("Initialised rageshake.");
console.log("To fix line numbers in Chrome: " +
"Meatball menu → Settings → Blackboxing → Add /rageshake\\.js$");
@ -46,6 +47,7 @@ export function initRageshake() {
}, (err) => {
console.error("Failed to initialise rageshake: " + err);
});
return prom;
}
window.mxSendRageshake = function(text: string, withLogs?: boolean) {