@@ -144,69 +144,14 @@ declare global {
144144 usageDetails ?: { [ key : string ] : number } ;
145145 }
146146
147- // https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
148- interface OffscreenCanvas {
149- convertToBlob ( opts ?: { type ?: string ; quality ?: number } ) : Promise < Blob > ;
150- }
151-
152- interface HTMLAudioElement {
153- type ?: string ;
154- }
155-
156- interface HTMLVideoElement {
157- type ?: string ;
158- }
159-
160- // Add Chrome-specific `instant` ScrollBehaviour
161- type _ScrollBehavior = ScrollBehavior | "instant" ;
162-
163- interface _ScrollOptions {
164- behavior ?: _ScrollBehavior ;
165- }
166-
167- interface _ScrollIntoViewOptions extends _ScrollOptions {
168- block ?: ScrollLogicalPosition ;
169- inline ?: ScrollLogicalPosition ;
170- }
171-
172147 interface Element {
173148 // Safari & IE11 only have this prefixed: we used prefixed versions
174149 // previously so let's continue to support them for now
175150 webkitRequestFullScreen ( options ?: FullscreenOptions ) : Promise < void > ;
176151 msRequestFullscreen ( options ?: FullscreenOptions ) : Promise < void > ;
177- scrollIntoView ( arg ?: boolean | _ScrollIntoViewOptions ) : void ;
178- }
179-
180- interface Error {
181- // Standard
182- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
183- cause ?: unknown ;
184-
185- // Non-standard
186- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName
187- fileName ?: string ;
188- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber
189- lineNumber ?: number ;
190- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/columnNumber
191- columnNumber ?: number ;
192- }
193-
194- // We can remove these pieces if we ever update to `target: "es2022"` in our
195- // TypeScript config which supports the new `cause` property, see
196- // https://github.com/vector-im/element-web/issues/24913
197- interface ErrorOptions {
198- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
199- cause ?: unknown ;
200- }
201-
202- interface ErrorConstructor {
203- new ( message ?: string , options ?: ErrorOptions ) : Error ;
204- ( message ?: string , options ?: ErrorOptions ) : Error ;
152+ // scrollIntoView(arg?: boolean | _ScrollIntoViewOptions): void;
205153 }
206154
207- // eslint-disable-next-line no-var
208- var Error : ErrorConstructor ;
209-
210155 // https://github.com/microsoft/TypeScript/issues/28308#issuecomment-650802278
211156 interface AudioWorkletProcessor {
212157 readonly port : MessagePort ;
0 commit comments