mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Initial commit
This commit is contained in:
45
src/types/index.d.ts
vendored
Normal file
45
src/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// Get type of an array's element
|
||||
type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
||||
|
||||
interface Window {
|
||||
AppInterface: any;
|
||||
BX_FLAGS?: BxFlags;
|
||||
BX_CE: (elmName: string, props: {[index: string]: any}={}) => HTMLElement;
|
||||
BX_EXPOSED: any;
|
||||
}
|
||||
|
||||
interface NavigatorBattery extends Navigator {
|
||||
getBattery: () => Promise<{
|
||||
charging: boolean,
|
||||
level: float,
|
||||
}>,
|
||||
}
|
||||
|
||||
type RTCBasicStat = {
|
||||
address: string,
|
||||
bytesReceived: number,
|
||||
clockRate: number,
|
||||
codecId: string,
|
||||
framesDecoded: number,
|
||||
id: string,
|
||||
kind: string,
|
||||
mimeType: string,
|
||||
packetsReceived: number,
|
||||
profile: string,
|
||||
remoteCandidateId: string,
|
||||
sdpFmtpLine: string,
|
||||
state: string,
|
||||
timestamp: number,
|
||||
totalDecodeTime: number,
|
||||
type: string,
|
||||
}
|
||||
|
||||
type BxStates = {
|
||||
isPlaying: boolean;
|
||||
appContext: any | null;
|
||||
}
|
||||
|
||||
declare var window: Window & typeof globalThis;
|
||||
declare var AppInterface: any;
|
||||
declare var STREAM_WEBRTC: RTCPeerConnection;
|
||||
declare var States: BxStates;
|
Reference in New Issue
Block a user