Update Typescript to 4.5 (#7344)
This commit is contained in:
parent
fcc4939075
commit
c96b9413e7
4 changed files with 33 additions and 24 deletions
43
src/@types/global.d.ts
vendored
43
src/@types/global.d.ts
vendored
|
@ -66,6 +66,16 @@ declare global {
|
|||
// Needed for Safari, unknown to TypeScript
|
||||
webkitAudioContext: typeof AudioContext;
|
||||
|
||||
// https://docs.microsoft.com/en-us/previous-versions/hh772328(v=vs.85)
|
||||
// we only ever check for its existence, so we can ignore its actual type
|
||||
MSStream?: unknown;
|
||||
|
||||
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029#issuecomment-869224737
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
|
||||
OffscreenCanvas?: {
|
||||
new(width: number, height: number): OffscreenCanvas;
|
||||
};
|
||||
|
||||
mxContentMessages: ContentMessages;
|
||||
mxToastStore: ToastStore;
|
||||
mxDeviceListener: DeviceListener;
|
||||
|
@ -123,11 +133,6 @@ declare global {
|
|||
}
|
||||
|
||||
interface Document {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/hasStorageAccess
|
||||
hasStorageAccess?: () => Promise<boolean>;
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/requestStorageAccess
|
||||
requestStorageAccess?: () => Promise<undefined>;
|
||||
|
||||
// Safari & IE11 only have this prefixed: we used prefixed versions
|
||||
// previously so let's continue to support them for now
|
||||
webkitExitFullscreen(): Promise<void>;
|
||||
|
@ -138,27 +143,26 @@ declare global {
|
|||
|
||||
interface Navigator {
|
||||
userLanguage?: string;
|
||||
// https://github.com/Microsoft/TypeScript/issues/19473
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/MediaSession
|
||||
mediaSession: any;
|
||||
}
|
||||
|
||||
interface StorageEstimate {
|
||||
usageDetails?: { [key: string]: number };
|
||||
}
|
||||
|
||||
interface HTMLAudioElement {
|
||||
type?: string;
|
||||
// sinkId & setSinkId are experimental and typescript doesn't know about them
|
||||
sinkId: string;
|
||||
setSinkId(outputId: string);
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
|
||||
interface OffscreenCanvas {
|
||||
height: number;
|
||||
width: number;
|
||||
getContext: HTMLCanvasElement["getContext"];
|
||||
convertToBlob(opts?: {
|
||||
type?: string;
|
||||
quality?: number;
|
||||
}): Promise<Blob>;
|
||||
transferToImageBitmap(): ImageBitmap;
|
||||
}
|
||||
|
||||
interface HTMLVideoElement {
|
||||
interface HTMLAudioElement {
|
||||
type?: string;
|
||||
// sinkId & setSinkId are experimental and typescript doesn't know about them
|
||||
sinkId: string;
|
||||
setSinkId(outputId: string);
|
||||
}
|
||||
|
||||
interface HTMLStyleElement {
|
||||
|
@ -210,6 +214,11 @@ declare global {
|
|||
new (options?: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
||||
};
|
||||
|
||||
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029#issuecomment-881509595
|
||||
interface AudioParamDescriptor {
|
||||
readonly port: MessagePort;
|
||||
}
|
||||
|
||||
// https://github.com/microsoft/TypeScript/issues/28308#issuecomment-650802278
|
||||
function registerProcessor(
|
||||
name: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue