convert index.js to typescript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
20442413bf
commit
093b7bbf72
|
@ -32,7 +32,7 @@ if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register('sw.js');
|
navigator.serviceWorker.register('sw.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function settled(prom) {
|
async function settled(prom: Promise<any>) {
|
||||||
try {
|
try {
|
||||||
await prom;
|
await prom;
|
||||||
} catch (e) {
|
} catch (e) {
|
|
@ -31,7 +31,8 @@ import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||||
import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake";
|
import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake";
|
||||||
|
|
||||||
export function initRageshake() {
|
export function initRageshake() {
|
||||||
rageshake.init().then(() => {
|
const prom = rageshake.init();
|
||||||
|
prom.then(() => {
|
||||||
console.log("Initialised rageshake.");
|
console.log("Initialised rageshake.");
|
||||||
console.log("To fix line numbers in Chrome: " +
|
console.log("To fix line numbers in Chrome: " +
|
||||||
"Meatball menu → Settings → Blackboxing → Add /rageshake\\.js$");
|
"Meatball menu → Settings → Blackboxing → Add /rageshake\\.js$");
|
||||||
|
@ -46,6 +47,7 @@ export function initRageshake() {
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
console.error("Failed to initialise rageshake: " + err);
|
console.error("Failed to initialise rageshake: " + err);
|
||||||
});
|
});
|
||||||
|
return prom;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
|
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
|
||||||
|
|
Loading…
Reference in New Issue