Remove member-ordering and complexity eslint-disable comments by reordering class members and applying targeted fixes. Add metoyou/no-maybe-in-naming, type-safe WebRTC e2e harness helpers, and resolve remaining lint errors so npm run lint exits cleanly. Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
924 B
TypeScript
29 lines
924 B
TypeScript
export interface RtcRemoteTrackSnapshot {
|
|
kind: string;
|
|
id: string;
|
|
readyState: string;
|
|
}
|
|
|
|
export interface RtcSyntheticMediaResource {
|
|
audioCtx: AudioContext;
|
|
source?: AudioScheduledSourceNode;
|
|
drawIntervalId?: number;
|
|
}
|
|
|
|
export interface WebRtcTestHarnessWindow extends Window {
|
|
__rtcConnections: RTCPeerConnection[];
|
|
__rtcDataChannels: RTCDataChannel[];
|
|
__rtcRemoteTracks: RtcRemoteTrackSnapshot[];
|
|
__rtcSyntheticMediaResources: RtcSyntheticMediaResource[];
|
|
__trackedAudioContexts?: AudioContext[];
|
|
__rtcStatsHWM?: Record<number, Record<string, number | boolean>>;
|
|
__rtcVideoStatsHWM?: Record<number, Record<string, number | boolean>>;
|
|
__lastRtcState?: RTCPeerConnectionState;
|
|
RTCPeerConnection: typeof RTCPeerConnection;
|
|
AudioContext: typeof AudioContext;
|
|
}
|
|
|
|
export function getWebRtcTestHarnessWindow(): WebRtcTestHarnessWindow {
|
|
return window as unknown as WebRtcTestHarnessWindow;
|
|
}
|