Improving typings
This PR solves a number of issues (but not all) found when enabling the rule ESLint rule "@typescript-eslint/no-unsafe-call" in the front.
This commit is contained in:
@@ -3,8 +3,7 @@ import { POSTHOG_API_KEY, POSTHOG_URL } from "../Enum/EnvironmentVariable";
|
||||
declare let window: any;
|
||||
|
||||
class AnalyticsClient {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private posthogPromise: Promise<any> | undefined;
|
||||
private posthogPromise: Promise<typeof import("posthog-js").default> | undefined;
|
||||
|
||||
constructor() {
|
||||
if (POSTHOG_API_KEY && POSTHOG_URL) {
|
||||
|
||||
@@ -30,7 +30,7 @@ interface JitsiApi {
|
||||
|
||||
addListener: (type: string, callback: Function) => void;
|
||||
removeListener: (type: string, callback: Function) => void;
|
||||
|
||||
getParticipantsInfo(): { displayName: string; participantId: string }[];
|
||||
dispose: () => void;
|
||||
}
|
||||
|
||||
@@ -275,10 +275,11 @@ class JitsiFactory {
|
||||
}
|
||||
|
||||
private onDominantSpeakerChanged(data: { id: string }): void {
|
||||
userIsJitsiDominantSpeakerStore.set(
|
||||
//@ts-ignore
|
||||
data.id === this.getCurrentParticipantId(this.jitsiApi?.getParticipantsInfo())
|
||||
);
|
||||
if (this.jitsiApi) {
|
||||
userIsJitsiDominantSpeakerStore.set(
|
||||
data.id === this.getCurrentParticipantId(this.jitsiApi.getParticipantsInfo())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private onParticipantsCountChange(): void {
|
||||
|
||||
Reference in New Issue
Block a user