Expose setLKLogLevel to window for debugging. (#3064)
* Expose setLKLogLevel to window for debugging. * fix es lint
This commit is contained in:
3
src/@types/global.d.ts
vendored
3
src/@types/global.d.ts
vendored
@@ -6,6 +6,8 @@ Please see LICENSE in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import "matrix-js-sdk/src/@types/global";
|
import "matrix-js-sdk/src/@types/global";
|
||||||
|
import { type setLogLevel as setLKLogLevel } from "livekit-client";
|
||||||
|
|
||||||
import type { DurationFormat as PolyfillDurationFormat } from "@formatjs/intl-durationformat";
|
import type { DurationFormat as PolyfillDurationFormat } from "@formatjs/intl-durationformat";
|
||||||
import { type Controls } from "../controls";
|
import { type Controls } from "../controls";
|
||||||
|
|
||||||
@@ -18,6 +20,7 @@ declare global {
|
|||||||
|
|
||||||
interface Window {
|
interface Window {
|
||||||
controls: Controls;
|
controls: Controls;
|
||||||
|
setLKLogLevel: typeof setLKLogLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface HTMLElement {
|
interface HTMLElement {
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import { App } from "./App";
|
|||||||
import { init as initRageshake } from "./settings/rageshake";
|
import { init as initRageshake } from "./settings/rageshake";
|
||||||
import { Initializer } from "./initializer";
|
import { Initializer } from "./initializer";
|
||||||
|
|
||||||
|
window.setLKLogLevel = setLKLogLevel;
|
||||||
|
|
||||||
initRageshake().catch((e) => {
|
initRageshake().catch((e) => {
|
||||||
logger.error("Failed to initialize rageshake", e);
|
logger.error("Failed to initialize rageshake", e);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user