Add return type too

This commit is contained in:
David Baker 2022-05-30 15:53:44 +01:00
parent 21c7bb979e
commit 1164e6f1e7

View file

@ -26,6 +26,30 @@ import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { usePageUnload } from "./usePageUnload"; import { usePageUnload } from "./usePageUnload";
export interface UseGroupCallType {
state: GroupCallState;
calls: MatrixCall[];
localCallFeed: CallFeed;
activeSpeaker: string;
userMediaFeeds: CallFeed[];
microphoneMuted: boolean;
localVideoMuted: boolean;
error: Error;
initLocalCallFeed: () => void;
enter: () => void;
leave: () => void;
toggleLocalVideoMuted: () => void;
toggleMicrophoneMuted: () => void;
toggleScreensharing: () => void;
requestingScreenshare: boolean;
isScreensharing: boolean;
screenshareFeeds: CallFeed[];
localScreenshareFeed: CallFeed;
localDesktopCapturerSourceId: string;
participants: RoomMember[];
hasLocalParticipant: boolean;
}
interface State { interface State {
state: GroupCallState; state: GroupCallState;
calls: MatrixCall[]; calls: MatrixCall[];
@ -44,7 +68,7 @@ interface State {
hasLocalParticipant: boolean; hasLocalParticipant: boolean;
} }
export function useGroupCall(groupCall: GroupCall) { export function useGroupCall(groupCall: GroupCall): UseGroupCallType {
const [ const [
{ {
state, state,