massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / node_modules / typescript / lib / lib.webworker.d.ts
1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
6
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
11
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
15
16
17
18 /// <reference no-default-lib="true"/>\r
19
20
21 /////////////////////////////
22 /// Worker APIs
23 /////////////////////////////
24
25 interface AddEventListenerOptions extends EventListenerOptions {
26     once?: boolean;
27     passive?: boolean;
28     signal?: AbortSignal;
29 }
30
31 interface AesCbcParams extends Algorithm {
32     iv: BufferSource;
33 }
34
35 interface AesCtrParams extends Algorithm {
36     counter: BufferSource;
37     length: number;
38 }
39
40 interface AesDerivedKeyParams extends Algorithm {
41     length: number;
42 }
43
44 interface AesGcmParams extends Algorithm {
45     additionalData?: BufferSource;
46     iv: BufferSource;
47     tagLength?: number;
48 }
49
50 interface AesKeyAlgorithm extends KeyAlgorithm {
51     length: number;
52 }
53
54 interface AesKeyGenParams extends Algorithm {
55     length: number;
56 }
57
58 interface Algorithm {
59     name: string;
60 }
61
62 interface AudioConfiguration {
63     bitrate?: number;
64     channels?: string;
65     contentType: string;
66     samplerate?: number;
67     spatialRendering?: boolean;
68 }
69
70 interface BlobPropertyBag {
71     endings?: EndingType;
72     type?: string;
73 }
74
75 interface CacheQueryOptions {
76     ignoreMethod?: boolean;
77     ignoreSearch?: boolean;
78     ignoreVary?: boolean;
79 }
80
81 interface ClientQueryOptions {
82     includeUncontrolled?: boolean;
83     type?: ClientTypes;
84 }
85
86 interface CloseEventInit extends EventInit {
87     code?: number;
88     reason?: string;
89     wasClean?: boolean;
90 }
91
92 interface CryptoKeyPair {
93     privateKey?: CryptoKey;
94     publicKey?: CryptoKey;
95 }
96
97 interface CustomEventInit<T = any> extends EventInit {
98     detail?: T;
99 }
100
101 interface DOMMatrix2DInit {
102     a?: number;
103     b?: number;
104     c?: number;
105     d?: number;
106     e?: number;
107     f?: number;
108     m11?: number;
109     m12?: number;
110     m21?: number;
111     m22?: number;
112     m41?: number;
113     m42?: number;
114 }
115
116 interface DOMMatrixInit extends DOMMatrix2DInit {
117     is2D?: boolean;
118     m13?: number;
119     m14?: number;
120     m23?: number;
121     m24?: number;
122     m31?: number;
123     m32?: number;
124     m33?: number;
125     m34?: number;
126     m43?: number;
127     m44?: number;
128 }
129
130 interface DOMPointInit {
131     w?: number;
132     x?: number;
133     y?: number;
134     z?: number;
135 }
136
137 interface DOMQuadInit {
138     p1?: DOMPointInit;
139     p2?: DOMPointInit;
140     p3?: DOMPointInit;
141     p4?: DOMPointInit;
142 }
143
144 interface DOMRectInit {
145     height?: number;
146     width?: number;
147     x?: number;
148     y?: number;
149 }
150
151 interface EcKeyGenParams extends Algorithm {
152     namedCurve: NamedCurve;
153 }
154
155 interface EcKeyImportParams extends Algorithm {
156     namedCurve: NamedCurve;
157 }
158
159 interface EcdhKeyDeriveParams extends Algorithm {
160     public: CryptoKey;
161 }
162
163 interface EcdsaParams extends Algorithm {
164     hash: HashAlgorithmIdentifier;
165 }
166
167 interface ErrorEventInit extends EventInit {
168     colno?: number;
169     error?: any;
170     filename?: string;
171     lineno?: number;
172     message?: string;
173 }
174
175 interface EventInit {
176     bubbles?: boolean;
177     cancelable?: boolean;
178     composed?: boolean;
179 }
180
181 interface EventListenerOptions {
182     capture?: boolean;
183 }
184
185 interface EventSourceInit {
186     withCredentials?: boolean;
187 }
188
189 interface ExtendableEventInit extends EventInit {
190 }
191
192 interface ExtendableMessageEventInit extends ExtendableEventInit {
193     data?: any;
194     lastEventId?: string;
195     origin?: string;
196     ports?: MessagePort[];
197     source?: Client | ServiceWorker | MessagePort | null;
198 }
199
200 interface FetchEventInit extends ExtendableEventInit {
201     clientId?: string;
202     handled?: Promise<undefined>;
203     preloadResponse?: Promise<any>;
204     replacesClientId?: string;
205     request: Request;
206     resultingClientId?: string;
207 }
208
209 interface FilePropertyBag extends BlobPropertyBag {
210     lastModified?: number;
211 }
212
213 interface FontFaceDescriptors {
214     display?: string;
215     featureSettings?: string;
216     stretch?: string;
217     style?: string;
218     unicodeRange?: string;
219     variant?: string;
220     weight?: string;
221 }
222
223 interface FontFaceSetLoadEventInit extends EventInit {
224     fontfaces?: FontFace[];
225 }
226
227 interface GetNotificationOptions {
228     tag?: string;
229 }
230
231 interface HkdfParams extends Algorithm {
232     hash: HashAlgorithmIdentifier;
233     info: BufferSource;
234     salt: BufferSource;
235 }
236
237 interface HmacImportParams extends Algorithm {
238     hash: HashAlgorithmIdentifier;
239     length?: number;
240 }
241
242 interface HmacKeyGenParams extends Algorithm {
243     hash: HashAlgorithmIdentifier;
244     length?: number;
245 }
246
247 interface IDBDatabaseInfo {
248     name?: string;
249     version?: number;
250 }
251
252 interface IDBIndexParameters {
253     multiEntry?: boolean;
254     unique?: boolean;
255 }
256
257 interface IDBObjectStoreParameters {
258     autoIncrement?: boolean;
259     keyPath?: string | string[] | null;
260 }
261
262 interface IDBVersionChangeEventInit extends EventInit {
263     newVersion?: number | null;
264     oldVersion?: number;
265 }
266
267 interface ImageBitmapOptions {
268     colorSpaceConversion?: ColorSpaceConversion;
269     imageOrientation?: ImageOrientation;
270     premultiplyAlpha?: PremultiplyAlpha;
271     resizeHeight?: number;
272     resizeQuality?: ResizeQuality;
273     resizeWidth?: number;
274 }
275
276 interface ImageBitmapRenderingContextSettings {
277     alpha?: boolean;
278 }
279
280 interface ImageDataSettings {
281     colorSpace?: PredefinedColorSpace;
282 }
283
284 interface ImportMeta {
285     url: string;
286 }
287
288 interface JsonWebKey {
289     alg?: string;
290     crv?: string;
291     d?: string;
292     dp?: string;
293     dq?: string;
294     e?: string;
295     ext?: boolean;
296     k?: string;
297     key_ops?: string[];
298     kty?: string;
299     n?: string;
300     oth?: RsaOtherPrimesInfo[];
301     p?: string;
302     q?: string;
303     qi?: string;
304     use?: string;
305     x?: string;
306     y?: string;
307 }
308
309 interface KeyAlgorithm {
310     name: string;
311 }
312
313 interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
314     configuration?: MediaDecodingConfiguration;
315 }
316
317 interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo {
318     configuration?: MediaEncodingConfiguration;
319 }
320
321 interface MediaCapabilitiesInfo {
322     powerEfficient: boolean;
323     smooth: boolean;
324     supported: boolean;
325 }
326
327 interface MediaConfiguration {
328     audio?: AudioConfiguration;
329     video?: VideoConfiguration;
330 }
331
332 interface MediaDecodingConfiguration extends MediaConfiguration {
333     type: MediaDecodingType;
334 }
335
336 interface MediaEncodingConfiguration extends MediaConfiguration {
337     type: MediaEncodingType;
338 }
339
340 interface MessageEventInit<T = any> extends EventInit {
341     data?: T;
342     lastEventId?: string;
343     origin?: string;
344     ports?: MessagePort[];
345     source?: MessageEventSource | null;
346 }
347
348 interface MultiCacheQueryOptions extends CacheQueryOptions {
349     cacheName?: string;
350 }
351
352 interface NotificationAction {
353     action: string;
354     icon?: string;
355     title: string;
356 }
357
358 interface NotificationEventInit extends ExtendableEventInit {
359     action?: string;
360     notification: Notification;
361 }
362
363 interface NotificationOptions {
364     actions?: NotificationAction[];
365     badge?: string;
366     body?: string;
367     data?: any;
368     dir?: NotificationDirection;
369     icon?: string;
370     image?: string;
371     lang?: string;
372     renotify?: boolean;
373     requireInteraction?: boolean;
374     silent?: boolean;
375     tag?: string;
376     timestamp?: DOMTimeStamp;
377     vibrate?: VibratePattern;
378 }
379
380 interface Pbkdf2Params extends Algorithm {
381     hash: HashAlgorithmIdentifier;
382     iterations: number;
383     salt: BufferSource;
384 }
385
386 interface PerformanceMarkOptions {
387     detail?: any;
388     startTime?: DOMHighResTimeStamp;
389 }
390
391 interface PerformanceMeasureOptions {
392     detail?: any;
393     duration?: DOMHighResTimeStamp;
394     end?: string | DOMHighResTimeStamp;
395     start?: string | DOMHighResTimeStamp;
396 }
397
398 interface PerformanceObserverInit {
399     buffered?: boolean;
400     entryTypes?: string[];
401     type?: string;
402 }
403
404 interface PermissionDescriptor {
405     name: PermissionName;
406 }
407
408 interface ProgressEventInit extends EventInit {
409     lengthComputable?: boolean;
410     loaded?: number;
411     total?: number;
412 }
413
414 interface PromiseRejectionEventInit extends EventInit {
415     promise: Promise<any>;
416     reason?: any;
417 }
418
419 interface PushEventInit extends ExtendableEventInit {
420     data?: PushMessageDataInit;
421 }
422
423 interface PushSubscriptionJSON {
424     endpoint?: string;
425     expirationTime?: DOMTimeStamp | null;
426     keys?: Record<string, string>;
427 }
428
429 interface PushSubscriptionOptionsInit {
430     applicationServerKey?: BufferSource | string | null;
431     userVisibleOnly?: boolean;
432 }
433
434 interface QueuingStrategy<T = any> {
435     highWaterMark?: number;
436     size?: QueuingStrategySize<T>;
437 }
438
439 interface QueuingStrategyInit {
440     /**
441      * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
442      *
443      * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
444      */
445     highWaterMark: number;
446 }
447
448 interface ReadableStreamDefaultReadDoneResult {
449     done: true;
450     value?: undefined;
451 }
452
453 interface ReadableStreamDefaultReadValueResult<T> {
454     done: false;
455     value: T;
456 }
457
458 interface ReadableWritablePair<R = any, W = any> {
459     readable: ReadableStream<R>;
460     /**
461      * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
462      *
463      * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
464      */
465     writable: WritableStream<W>;
466 }
467
468 interface RegistrationOptions {
469     scope?: string;
470     type?: WorkerType;
471     updateViaCache?: ServiceWorkerUpdateViaCache;
472 }
473
474 interface RequestInit {
475     /** A BodyInit object or null to set request's body. */
476     body?: BodyInit | null;
477     /** A string indicating how the request will interact with the browser's cache to set request's cache. */
478     cache?: RequestCache;
479     /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */
480     credentials?: RequestCredentials;
481     /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
482     headers?: HeadersInit;
483     /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
484     integrity?: string;
485     /** A boolean to set request's keepalive. */
486     keepalive?: boolean;
487     /** A string to set request's method. */
488     method?: string;
489     /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
490     mode?: RequestMode;
491     /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */
492     redirect?: RequestRedirect;
493     /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
494     referrer?: string;
495     /** A referrer policy to set request's referrerPolicy. */
496     referrerPolicy?: ReferrerPolicy;
497     /** An AbortSignal to set request's signal. */
498     signal?: AbortSignal | null;
499     /** Can only be null. Used to disassociate request from any Window. */
500     window?: null;
501 }
502
503 interface ResponseInit {
504     headers?: HeadersInit;
505     status?: number;
506     statusText?: string;
507 }
508
509 interface RsaHashedImportParams extends Algorithm {
510     hash: HashAlgorithmIdentifier;
511 }
512
513 interface RsaHashedKeyGenParams extends RsaKeyGenParams {
514     hash: HashAlgorithmIdentifier;
515 }
516
517 interface RsaKeyGenParams extends Algorithm {
518     modulusLength: number;
519     publicExponent: BigInteger;
520 }
521
522 interface RsaOaepParams extends Algorithm {
523     label?: BufferSource;
524 }
525
526 interface RsaOtherPrimesInfo {
527     d?: string;
528     r?: string;
529     t?: string;
530 }
531
532 interface RsaPssParams extends Algorithm {
533     saltLength: number;
534 }
535
536 interface SecurityPolicyViolationEventInit extends EventInit {
537     blockedURI?: string;
538     columnNumber?: number;
539     disposition: SecurityPolicyViolationEventDisposition;
540     documentURI: string;
541     effectiveDirective: string;
542     lineNumber?: number;
543     originalPolicy: string;
544     referrer?: string;
545     sample?: string;
546     sourceFile?: string;
547     statusCode: number;
548     violatedDirective: string;
549 }
550
551 interface StorageEstimate {
552     quota?: number;
553     usage?: number;
554 }
555
556 interface StreamPipeOptions {
557     preventAbort?: boolean;
558     preventCancel?: boolean;
559     /**
560      * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
561      *
562      * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
563      *
564      * Errors and closures of the source and destination streams propagate as follows:
565      *
566      * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
567      *
568      * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
569      *
570      * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
571      *
572      * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
573      *
574      * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
575      */
576     preventClose?: boolean;
577     signal?: AbortSignal;
578 }
579
580 interface StructuredSerializeOptions {
581     transfer?: any[];
582 }
583
584 interface TextDecodeOptions {
585     stream?: boolean;
586 }
587
588 interface TextDecoderOptions {
589     fatal?: boolean;
590     ignoreBOM?: boolean;
591 }
592
593 interface TextEncoderEncodeIntoResult {
594     read?: number;
595     written?: number;
596 }
597
598 interface Transformer<I = any, O = any> {
599     flush?: TransformerFlushCallback<O>;
600     readableType?: undefined;
601     start?: TransformerStartCallback<O>;
602     transform?: TransformerTransformCallback<I, O>;
603     writableType?: undefined;
604 }
605
606 interface UnderlyingSink<W = any> {
607     abort?: UnderlyingSinkAbortCallback;
608     close?: UnderlyingSinkCloseCallback;
609     start?: UnderlyingSinkStartCallback;
610     type?: undefined;
611     write?: UnderlyingSinkWriteCallback<W>;
612 }
613
614 interface UnderlyingSource<R = any> {
615     cancel?: UnderlyingSourceCancelCallback;
616     pull?: UnderlyingSourcePullCallback<R>;
617     start?: UnderlyingSourceStartCallback<R>;
618     type?: undefined;
619 }
620
621 interface VideoConfiguration {
622     bitrate: number;
623     colorGamut?: ColorGamut;
624     contentType: string;
625     framerate: number;
626     hdrMetadataType?: HdrMetadataType;
627     height: number;
628     scalabilityMode?: string;
629     transferFunction?: TransferFunction;
630     width: number;
631 }
632
633 interface WebGLContextAttributes {
634     alpha?: boolean;
635     antialias?: boolean;
636     depth?: boolean;
637     desynchronized?: boolean;
638     failIfMajorPerformanceCaveat?: boolean;
639     powerPreference?: WebGLPowerPreference;
640     premultipliedAlpha?: boolean;
641     preserveDrawingBuffer?: boolean;
642     stencil?: boolean;
643 }
644
645 interface WebGLContextEventInit extends EventInit {
646     statusMessage?: string;
647 }
648
649 interface WorkerOptions {
650     credentials?: RequestCredentials;
651     name?: string;
652     type?: WorkerType;
653 }
654
655 /** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
656 interface ANGLE_instanced_arrays {
657     drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
658     drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
659     vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
660     readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
661 }
662
663 /** A controller object that allows you to abort one or more DOM requests as and when desired. */
664 interface AbortController {
665     /** Returns the AbortSignal object associated with this object. */
666     readonly signal: AbortSignal;
667     /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
668     abort(): void;
669 }
670
671 declare var AbortController: {
672     prototype: AbortController;
673     new(): AbortController;
674 };
675
676 interface AbortSignalEventMap {
677     "abort": Event;
678 }
679
680 /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
681 interface AbortSignal extends EventTarget {
682     /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
683     readonly aborted: boolean;
684     onabort: ((this: AbortSignal, ev: Event) => any) | null;
685     addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
686     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
687     removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
688     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
689 }
690
691 declare var AbortSignal: {
692     prototype: AbortSignal;
693     new(): AbortSignal;
694     // abort(): AbortSignal; - To be re-added in the future
695 };
696
697 interface AbstractWorkerEventMap {
698     "error": ErrorEvent;
699 }
700
701 interface AbstractWorker {
702     onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
703     addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
704     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
705     removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
706     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
707 }
708
709 interface AnimationFrameProvider {
710     cancelAnimationFrame(handle: number): void;
711     requestAnimationFrame(callback: FrameRequestCallback): number;
712 }
713
714 /** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
715 interface Blob {
716     readonly size: number;
717     readonly type: string;
718     arrayBuffer(): Promise<ArrayBuffer>;
719     slice(start?: number, end?: number, contentType?: string): Blob;
720     stream(): ReadableStream;
721     text(): Promise<string>;
722 }
723
724 declare var Blob: {
725     prototype: Blob;
726     new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
727 };
728
729 interface Body {
730     readonly body: ReadableStream<Uint8Array> | null;
731     readonly bodyUsed: boolean;
732     arrayBuffer(): Promise<ArrayBuffer>;
733     blob(): Promise<Blob>;
734     formData(): Promise<FormData>;
735     json(): Promise<any>;
736     text(): Promise<string>;
737 }
738
739 interface BroadcastChannelEventMap {
740     "message": MessageEvent;
741     "messageerror": MessageEvent;
742 }
743
744 interface BroadcastChannel extends EventTarget {
745     /** Returns the channel name (as passed to the constructor). */
746     readonly name: string;
747     onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
748     onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
749     /** Closes the BroadcastChannel object, opening it up to garbage collection. */
750     close(): void;
751     /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */
752     postMessage(message: any): void;
753     addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
754     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
755     removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
756     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
757 }
758
759 declare var BroadcastChannel: {
760     prototype: BroadcastChannel;
761     new(name: string): BroadcastChannel;
762 };
763
764 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
765 interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
766     readonly highWaterMark: number;
767     readonly size: QueuingStrategySize<ArrayBufferView>;
768 }
769
770 declare var ByteLengthQueuingStrategy: {
771     prototype: ByteLengthQueuingStrategy;
772     new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
773 };
774
775 /**
776  * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.
777  * Available only in secure contexts.
778  */
779 interface Cache {
780     add(request: RequestInfo): Promise<void>;
781     addAll(requests: RequestInfo[]): Promise<void>;
782     delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
783     keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
784     match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
785     matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
786     put(request: RequestInfo, response: Response): Promise<void>;
787 }
788
789 declare var Cache: {
790     prototype: Cache;
791     new(): Cache;
792 };
793
794 /**
795  * The storage for Cache objects.
796  * Available only in secure contexts.
797  */
798 interface CacheStorage {
799     delete(cacheName: string): Promise<boolean>;
800     has(cacheName: string): Promise<boolean>;
801     keys(): Promise<string[]>;
802     match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
803     open(cacheName: string): Promise<Cache>;
804 }
805
806 declare var CacheStorage: {
807     prototype: CacheStorage;
808     new(): CacheStorage;
809 };
810
811 /** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
812 interface CanvasGradient {
813     /**
814      * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
815      *
816      * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
817      */
818     addColorStop(offset: number, color: string): void;
819 }
820
821 declare var CanvasGradient: {
822     prototype: CanvasGradient;
823     new(): CanvasGradient;
824 };
825
826 interface CanvasPath {
827     arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
828     arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
829     bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
830     closePath(): void;
831     ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
832     lineTo(x: number, y: number): void;
833     moveTo(x: number, y: number): void;
834     quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
835     rect(x: number, y: number, w: number, h: number): void;
836 }
837
838 /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
839 interface CanvasPattern {
840     /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */
841     setTransform(transform?: DOMMatrix2DInit): void;
842 }
843
844 declare var CanvasPattern: {
845     prototype: CanvasPattern;
846     new(): CanvasPattern;
847 };
848
849 /** The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get(). */
850 interface Client {
851     readonly frameType: FrameType;
852     readonly id: string;
853     readonly type: ClientTypes;
854     readonly url: string;
855     postMessage(message: any, transfer: Transferable[]): void;
856     postMessage(message: any, options?: StructuredSerializeOptions): void;
857 }
858
859 declare var Client: {
860     prototype: Client;
861     new(): Client;
862 };
863
864 /** Provides access to Client objects. Access it via self.clients within a service worker. */
865 interface Clients {
866     claim(): Promise<void>;
867     get(id: string): Promise<Client | undefined>;
868     matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>;
869     openWindow(url: string | URL): Promise<WindowClient | null>;
870 }
871
872 declare var Clients: {
873     prototype: Clients;
874     new(): Clients;
875 };
876
877 /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
878 interface CloseEvent extends Event {
879     /** Returns the WebSocket connection close code provided by the server. */
880     readonly code: number;
881     /** Returns the WebSocket connection close reason provided by the server. */
882     readonly reason: string;
883     /** Returns true if the connection closed cleanly; false otherwise. */
884     readonly wasClean: boolean;
885 }
886
887 declare var CloseEvent: {
888     prototype: CloseEvent;
889     new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
890 };
891
892 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
893 interface CountQueuingStrategy extends QueuingStrategy {
894     readonly highWaterMark: number;
895     readonly size: QueuingStrategySize;
896 }
897
898 declare var CountQueuingStrategy: {
899     prototype: CountQueuingStrategy;
900     new(init: QueuingStrategyInit): CountQueuingStrategy;
901 };
902
903 /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
904 interface Crypto {
905     /** Available only in secure contexts. */
906     readonly subtle: SubtleCrypto;
907     getRandomValues<T extends ArrayBufferView | null>(array: T): T;
908 }
909
910 declare var Crypto: {
911     prototype: Crypto;
912     new(): Crypto;
913 };
914
915 /**
916  * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
917  * Available only in secure contexts.
918  */
919 interface CryptoKey {
920     readonly algorithm: KeyAlgorithm;
921     readonly extractable: boolean;
922     readonly type: KeyType;
923     readonly usages: KeyUsage[];
924 }
925
926 declare var CryptoKey: {
927     prototype: CryptoKey;
928     new(): CryptoKey;
929 };
930
931 interface CustomEvent<T = any> extends Event {
932     /** Returns any custom data event was created with. Typically used for synthetic events. */
933     readonly detail: T;
934     /** @deprecated */
935     initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
936 }
937
938 declare var CustomEvent: {
939     prototype: CustomEvent;
940     new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
941 };
942
943 /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
944 interface DOMException extends Error {
945     readonly code: number;
946     readonly message: string;
947     readonly name: string;
948     readonly ABORT_ERR: number;
949     readonly DATA_CLONE_ERR: number;
950     readonly DOMSTRING_SIZE_ERR: number;
951     readonly HIERARCHY_REQUEST_ERR: number;
952     readonly INDEX_SIZE_ERR: number;
953     readonly INUSE_ATTRIBUTE_ERR: number;
954     readonly INVALID_ACCESS_ERR: number;
955     readonly INVALID_CHARACTER_ERR: number;
956     readonly INVALID_MODIFICATION_ERR: number;
957     readonly INVALID_NODE_TYPE_ERR: number;
958     readonly INVALID_STATE_ERR: number;
959     readonly NAMESPACE_ERR: number;
960     readonly NETWORK_ERR: number;
961     readonly NOT_FOUND_ERR: number;
962     readonly NOT_SUPPORTED_ERR: number;
963     readonly NO_DATA_ALLOWED_ERR: number;
964     readonly NO_MODIFICATION_ALLOWED_ERR: number;
965     readonly QUOTA_EXCEEDED_ERR: number;
966     readonly SECURITY_ERR: number;
967     readonly SYNTAX_ERR: number;
968     readonly TIMEOUT_ERR: number;
969     readonly TYPE_MISMATCH_ERR: number;
970     readonly URL_MISMATCH_ERR: number;
971     readonly VALIDATION_ERR: number;
972     readonly WRONG_DOCUMENT_ERR: number;
973 }
974
975 declare var DOMException: {
976     prototype: DOMException;
977     new(message?: string, name?: string): DOMException;
978     readonly ABORT_ERR: number;
979     readonly DATA_CLONE_ERR: number;
980     readonly DOMSTRING_SIZE_ERR: number;
981     readonly HIERARCHY_REQUEST_ERR: number;
982     readonly INDEX_SIZE_ERR: number;
983     readonly INUSE_ATTRIBUTE_ERR: number;
984     readonly INVALID_ACCESS_ERR: number;
985     readonly INVALID_CHARACTER_ERR: number;
986     readonly INVALID_MODIFICATION_ERR: number;
987     readonly INVALID_NODE_TYPE_ERR: number;
988     readonly INVALID_STATE_ERR: number;
989     readonly NAMESPACE_ERR: number;
990     readonly NETWORK_ERR: number;
991     readonly NOT_FOUND_ERR: number;
992     readonly NOT_SUPPORTED_ERR: number;
993     readonly NO_DATA_ALLOWED_ERR: number;
994     readonly NO_MODIFICATION_ALLOWED_ERR: number;
995     readonly QUOTA_EXCEEDED_ERR: number;
996     readonly SECURITY_ERR: number;
997     readonly SYNTAX_ERR: number;
998     readonly TIMEOUT_ERR: number;
999     readonly TYPE_MISMATCH_ERR: number;
1000     readonly URL_MISMATCH_ERR: number;
1001     readonly VALIDATION_ERR: number;
1002     readonly WRONG_DOCUMENT_ERR: number;
1003 };
1004
1005 interface DOMMatrix extends DOMMatrixReadOnly {
1006     a: number;
1007     b: number;
1008     c: number;
1009     d: number;
1010     e: number;
1011     f: number;
1012     m11: number;
1013     m12: number;
1014     m13: number;
1015     m14: number;
1016     m21: number;
1017     m22: number;
1018     m23: number;
1019     m24: number;
1020     m31: number;
1021     m32: number;
1022     m33: number;
1023     m34: number;
1024     m41: number;
1025     m42: number;
1026     m43: number;
1027     m44: number;
1028     invertSelf(): DOMMatrix;
1029     multiplySelf(other?: DOMMatrixInit): DOMMatrix;
1030     preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
1031     rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1032     rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
1033     rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1034     scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1035     scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1036     skewXSelf(sx?: number): DOMMatrix;
1037     skewYSelf(sy?: number): DOMMatrix;
1038     translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
1039 }
1040
1041 declare var DOMMatrix: {
1042     prototype: DOMMatrix;
1043     new(init?: string | number[]): DOMMatrix;
1044     fromFloat32Array(array32: Float32Array): DOMMatrix;
1045     fromFloat64Array(array64: Float64Array): DOMMatrix;
1046     fromMatrix(other?: DOMMatrixInit): DOMMatrix;
1047 };
1048
1049 interface DOMMatrixReadOnly {
1050     readonly a: number;
1051     readonly b: number;
1052     readonly c: number;
1053     readonly d: number;
1054     readonly e: number;
1055     readonly f: number;
1056     readonly is2D: boolean;
1057     readonly isIdentity: boolean;
1058     readonly m11: number;
1059     readonly m12: number;
1060     readonly m13: number;
1061     readonly m14: number;
1062     readonly m21: number;
1063     readonly m22: number;
1064     readonly m23: number;
1065     readonly m24: number;
1066     readonly m31: number;
1067     readonly m32: number;
1068     readonly m33: number;
1069     readonly m34: number;
1070     readonly m41: number;
1071     readonly m42: number;
1072     readonly m43: number;
1073     readonly m44: number;
1074     flipX(): DOMMatrix;
1075     flipY(): DOMMatrix;
1076     inverse(): DOMMatrix;
1077     multiply(other?: DOMMatrixInit): DOMMatrix;
1078     rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1079     rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1080     rotateFromVector(x?: number, y?: number): DOMMatrix;
1081     scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1082     scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1083     /** @deprecated */
1084     scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
1085     skewX(sx?: number): DOMMatrix;
1086     skewY(sy?: number): DOMMatrix;
1087     toFloat32Array(): Float32Array;
1088     toFloat64Array(): Float64Array;
1089     toJSON(): any;
1090     transformPoint(point?: DOMPointInit): DOMPoint;
1091     translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
1092 }
1093
1094 declare var DOMMatrixReadOnly: {
1095     prototype: DOMMatrixReadOnly;
1096     new(init?: string | number[]): DOMMatrixReadOnly;
1097     fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
1098     fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
1099     fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
1100 };
1101
1102 interface DOMPoint extends DOMPointReadOnly {
1103     w: number;
1104     x: number;
1105     y: number;
1106     z: number;
1107 }
1108
1109 declare var DOMPoint: {
1110     prototype: DOMPoint;
1111     new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
1112     fromPoint(other?: DOMPointInit): DOMPoint;
1113 };
1114
1115 interface DOMPointReadOnly {
1116     readonly w: number;
1117     readonly x: number;
1118     readonly y: number;
1119     readonly z: number;
1120     matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
1121     toJSON(): any;
1122 }
1123
1124 declare var DOMPointReadOnly: {
1125     prototype: DOMPointReadOnly;
1126     new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
1127     fromPoint(other?: DOMPointInit): DOMPointReadOnly;
1128 };
1129
1130 interface DOMQuad {
1131     readonly p1: DOMPoint;
1132     readonly p2: DOMPoint;
1133     readonly p3: DOMPoint;
1134     readonly p4: DOMPoint;
1135     getBounds(): DOMRect;
1136     toJSON(): any;
1137 }
1138
1139 declare var DOMQuad: {
1140     prototype: DOMQuad;
1141     new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
1142     fromQuad(other?: DOMQuadInit): DOMQuad;
1143     fromRect(other?: DOMRectInit): DOMQuad;
1144 };
1145
1146 interface DOMRect extends DOMRectReadOnly {
1147     height: number;
1148     width: number;
1149     x: number;
1150     y: number;
1151 }
1152
1153 declare var DOMRect: {
1154     prototype: DOMRect;
1155     new(x?: number, y?: number, width?: number, height?: number): DOMRect;
1156     fromRect(other?: DOMRectInit): DOMRect;
1157 };
1158
1159 interface DOMRectReadOnly {
1160     readonly bottom: number;
1161     readonly height: number;
1162     readonly left: number;
1163     readonly right: number;
1164     readonly top: number;
1165     readonly width: number;
1166     readonly x: number;
1167     readonly y: number;
1168     toJSON(): any;
1169 }
1170
1171 declare var DOMRectReadOnly: {
1172     prototype: DOMRectReadOnly;
1173     new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
1174     fromRect(other?: DOMRectInit): DOMRectReadOnly;
1175 };
1176
1177 /** A type returned by some APIs which contains a list of DOMString (strings). */
1178 interface DOMStringList {
1179     /** Returns the number of strings in strings. */
1180     readonly length: number;
1181     /** Returns true if strings contains string, and false otherwise. */
1182     contains(string: string): boolean;
1183     /** Returns the string with index index from strings. */
1184     item(index: number): string | null;
1185     [index: number]: string;
1186 }
1187
1188 declare var DOMStringList: {
1189     prototype: DOMStringList;
1190     new(): DOMStringList;
1191 };
1192
1193 interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
1194     "message": MessageEvent;
1195     "messageerror": MessageEvent;
1196 }
1197
1198 /** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */
1199 interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
1200     /** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
1201     readonly name: string;
1202     onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1203     onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1204     /** Aborts dedicatedWorkerGlobal. */
1205     close(): void;
1206     /** Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
1207     postMessage(message: any, transfer: Transferable[]): void;
1208     postMessage(message: any, options?: StructuredSerializeOptions): void;
1209     addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1210     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1211     removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1212     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1213 }
1214
1215 declare var DedicatedWorkerGlobalScope: {
1216     prototype: DedicatedWorkerGlobalScope;
1217     new(): DedicatedWorkerGlobalScope;
1218 };
1219
1220 interface EXT_blend_minmax {
1221     readonly MAX_EXT: GLenum;
1222     readonly MIN_EXT: GLenum;
1223 }
1224
1225 interface EXT_color_buffer_float {
1226 }
1227
1228 interface EXT_color_buffer_half_float {
1229     readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
1230     readonly RGB16F_EXT: GLenum;
1231     readonly RGBA16F_EXT: GLenum;
1232     readonly UNSIGNED_NORMALIZED_EXT: GLenum;
1233 }
1234
1235 interface EXT_float_blend {
1236 }
1237
1238 /** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
1239 interface EXT_frag_depth {
1240 }
1241
1242 interface EXT_sRGB {
1243     readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
1244     readonly SRGB8_ALPHA8_EXT: GLenum;
1245     readonly SRGB_ALPHA_EXT: GLenum;
1246     readonly SRGB_EXT: GLenum;
1247 }
1248
1249 interface EXT_shader_texture_lod {
1250 }
1251
1252 interface EXT_texture_compression_rgtc {
1253     readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum;
1254     readonly COMPRESSED_RED_RGTC1_EXT: GLenum;
1255     readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum;
1256     readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum;
1257 }
1258
1259 /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
1260 interface EXT_texture_filter_anisotropic {
1261     readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1262     readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1263 }
1264
1265 /** Events providing information related to errors in scripts or in files. */
1266 interface ErrorEvent extends Event {
1267     readonly colno: number;
1268     readonly error: any;
1269     readonly filename: string;
1270     readonly lineno: number;
1271     readonly message: string;
1272 }
1273
1274 declare var ErrorEvent: {
1275     prototype: ErrorEvent;
1276     new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
1277 };
1278
1279 /** An event which takes place in the DOM. */
1280 interface Event {
1281     /** Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. */
1282     readonly bubbles: boolean;
1283     cancelBubble: boolean;
1284     /** Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. */
1285     readonly cancelable: boolean;
1286     /** Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. */
1287     readonly composed: boolean;
1288     /** Returns the object whose event listener's callback is currently being invoked. */
1289     readonly currentTarget: EventTarget | null;
1290     /** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */
1291     readonly defaultPrevented: boolean;
1292     /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */
1293     readonly eventPhase: number;
1294     /** Returns true if event was dispatched by the user agent, and false otherwise. */
1295     readonly isTrusted: boolean;
1296     /** @deprecated */
1297     returnValue: boolean;
1298     /** @deprecated */
1299     readonly srcElement: EventTarget | null;
1300     /** Returns the object to which event is dispatched (its target). */
1301     readonly target: EventTarget | null;
1302     /** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */
1303     readonly timeStamp: DOMHighResTimeStamp;
1304     /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
1305     readonly type: string;
1306     /** Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. */
1307     composedPath(): EventTarget[];
1308     /** @deprecated */
1309     initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
1310     /** If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. */
1311     preventDefault(): void;
1312     /** Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. */
1313     stopImmediatePropagation(): void;
1314     /** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */
1315     stopPropagation(): void;
1316     readonly AT_TARGET: number;
1317     readonly BUBBLING_PHASE: number;
1318     readonly CAPTURING_PHASE: number;
1319     readonly NONE: number;
1320 }
1321
1322 declare var Event: {
1323     prototype: Event;
1324     new(type: string, eventInitDict?: EventInit): Event;
1325     readonly AT_TARGET: number;
1326     readonly BUBBLING_PHASE: number;
1327     readonly CAPTURING_PHASE: number;
1328     readonly NONE: number;
1329 };
1330
1331 interface EventListener {
1332     (evt: Event): void;
1333 }
1334
1335 interface EventListenerObject {
1336     handleEvent(object: Event): void;
1337 }
1338
1339 interface EventSourceEventMap {
1340     "error": Event;
1341     "message": MessageEvent;
1342     "open": Event;
1343 }
1344
1345 interface EventSource extends EventTarget {
1346     onerror: ((this: EventSource, ev: Event) => any) | null;
1347     onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
1348     onopen: ((this: EventSource, ev: Event) => any) | null;
1349     /** Returns the state of this EventSource object's connection. It can have the values described below. */
1350     readonly readyState: number;
1351     /** Returns the URL providing the event stream. */
1352     readonly url: string;
1353     /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. */
1354     readonly withCredentials: boolean;
1355     /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */
1356     close(): void;
1357     readonly CLOSED: number;
1358     readonly CONNECTING: number;
1359     readonly OPEN: number;
1360     addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1361     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1362     removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1363     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1364 }
1365
1366 declare var EventSource: {
1367     prototype: EventSource;
1368     new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
1369     readonly CLOSED: number;
1370     readonly CONNECTING: number;
1371     readonly OPEN: number;
1372 };
1373
1374 /** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
1375 interface EventTarget {
1376     /**
1377      * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
1378      *
1379      * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
1380      *
1381      * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
1382      *
1383      * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in Â§ 2.8 Observing event listeners.
1384      *
1385      * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
1386      *
1387      * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
1388      *
1389      * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
1390      */
1391     addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
1392     /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
1393     dispatchEvent(event: Event): boolean;
1394     /** Removes the event listener in target's event listener list with the same type, callback, and options. */
1395     removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
1396 }
1397
1398 declare var EventTarget: {
1399     prototype: EventTarget;
1400     new(): EventTarget;
1401 };
1402
1403 /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */
1404 interface ExtendableEvent extends Event {
1405     waitUntil(f: any): void;
1406 }
1407
1408 declare var ExtendableEvent: {
1409     prototype: ExtendableEvent;
1410     new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
1411 };
1412
1413 /** This ServiceWorker API interface represents the event object of a message event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope from another context) â€” extends the lifetime of such events. */
1414 interface ExtendableMessageEvent extends ExtendableEvent {
1415     readonly data: any;
1416     readonly lastEventId: string;
1417     readonly origin: string;
1418     readonly ports: ReadonlyArray<MessagePort>;
1419     readonly source: Client | ServiceWorker | MessagePort | null;
1420 }
1421
1422 declare var ExtendableMessageEvent: {
1423     prototype: ExtendableMessageEvent;
1424     new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
1425 };
1426
1427 /** This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch. */
1428 interface FetchEvent extends ExtendableEvent {
1429     readonly clientId: string;
1430     readonly handled: Promise<undefined>;
1431     readonly request: Request;
1432     readonly resultingClientId: string;
1433     respondWith(r: Response | PromiseLike<Response>): void;
1434 }
1435
1436 declare var FetchEvent: {
1437     prototype: FetchEvent;
1438     new(type: string, eventInitDict: FetchEventInit): FetchEvent;
1439 };
1440
1441 /** Provides information about files and allows JavaScript in a web page to access their content. */
1442 interface File extends Blob {
1443     readonly lastModified: number;
1444     readonly name: string;
1445     readonly webkitRelativePath: string;
1446 }
1447
1448 declare var File: {
1449     prototype: File;
1450     new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
1451 };
1452
1453 /** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
1454 interface FileList {
1455     readonly length: number;
1456     item(index: number): File | null;
1457     [index: number]: File;
1458 }
1459
1460 declare var FileList: {
1461     prototype: FileList;
1462     new(): FileList;
1463 };
1464
1465 interface FileReaderEventMap {
1466     "abort": ProgressEvent<FileReader>;
1467     "error": ProgressEvent<FileReader>;
1468     "load": ProgressEvent<FileReader>;
1469     "loadend": ProgressEvent<FileReader>;
1470     "loadstart": ProgressEvent<FileReader>;
1471     "progress": ProgressEvent<FileReader>;
1472 }
1473
1474 /** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
1475 interface FileReader extends EventTarget {
1476     readonly error: DOMException | null;
1477     onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1478     onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1479     onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1480     onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1481     onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1482     onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1483     readonly readyState: number;
1484     readonly result: string | ArrayBuffer | null;
1485     abort(): void;
1486     readAsArrayBuffer(blob: Blob): void;
1487     readAsBinaryString(blob: Blob): void;
1488     readAsDataURL(blob: Blob): void;
1489     readAsText(blob: Blob, encoding?: string): void;
1490     readonly DONE: number;
1491     readonly EMPTY: number;
1492     readonly LOADING: number;
1493     addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1494     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1495     removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1496     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1497 }
1498
1499 declare var FileReader: {
1500     prototype: FileReader;
1501     new(): FileReader;
1502     readonly DONE: number;
1503     readonly EMPTY: number;
1504     readonly LOADING: number;
1505 };
1506
1507 /** Allows to read File or Blob objects in a synchronous way. */
1508 interface FileReaderSync {
1509     readAsArrayBuffer(blob: Blob): ArrayBuffer;
1510     /** @deprecated */
1511     readAsBinaryString(blob: Blob): string;
1512     readAsDataURL(blob: Blob): string;
1513     readAsText(blob: Blob, encoding?: string): string;
1514 }
1515
1516 declare var FileReaderSync: {
1517     prototype: FileReaderSync;
1518     new(): FileReaderSync;
1519 };
1520
1521 interface FontFace {
1522     ascentOverride: string;
1523     descentOverride: string;
1524     display: string;
1525     family: string;
1526     featureSettings: string;
1527     lineGapOverride: string;
1528     readonly loaded: Promise<FontFace>;
1529     readonly status: FontFaceLoadStatus;
1530     stretch: string;
1531     style: string;
1532     unicodeRange: string;
1533     variant: string;
1534     variationSettings: string;
1535     weight: string;
1536     load(): Promise<FontFace>;
1537 }
1538
1539 declare var FontFace: {
1540     prototype: FontFace;
1541     new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace;
1542 };
1543
1544 interface FontFaceSetEventMap {
1545     "loading": Event;
1546     "loadingdone": Event;
1547     "loadingerror": Event;
1548 }
1549
1550 interface FontFaceSet extends EventTarget {
1551     onloading: ((this: FontFaceSet, ev: Event) => any) | null;
1552     onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
1553     onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
1554     readonly ready: Promise<FontFaceSet>;
1555     readonly status: FontFaceSetLoadStatus;
1556     check(font: string, text?: string): boolean;
1557     load(font: string, text?: string): Promise<FontFace[]>;
1558     forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void;
1559     addEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1560     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1561     removeEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1562     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1563 }
1564
1565 declare var FontFaceSet: {
1566     prototype: FontFaceSet;
1567     new(initialFaces: FontFace[]): FontFaceSet;
1568 };
1569
1570 interface FontFaceSetLoadEvent extends Event {
1571     readonly fontfaces: ReadonlyArray<FontFace>;
1572 }
1573
1574 declare var FontFaceSetLoadEvent: {
1575     prototype: FontFaceSetLoadEvent;
1576     new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent;
1577 };
1578
1579 interface FontFaceSource {
1580     readonly fonts: FontFaceSet;
1581 }
1582
1583 /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
1584 interface FormData {
1585     append(name: string, value: string | Blob, fileName?: string): void;
1586     delete(name: string): void;
1587     get(name: string): FormDataEntryValue | null;
1588     getAll(name: string): FormDataEntryValue[];
1589     has(name: string): boolean;
1590     set(name: string, value: string | Blob, fileName?: string): void;
1591     forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
1592 }
1593
1594 declare var FormData: {
1595     prototype: FormData;
1596     new(): FormData;
1597 };
1598
1599 interface GenericTransformStream {
1600     readonly readable: ReadableStream;
1601     readonly writable: WritableStream;
1602 }
1603
1604 /** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. Â You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
1605 interface Headers {
1606     append(name: string, value: string): void;
1607     delete(name: string): void;
1608     get(name: string): string | null;
1609     has(name: string): boolean;
1610     set(name: string, value: string): void;
1611     forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
1612 }
1613
1614 declare var Headers: {
1615     prototype: Headers;
1616     new(init?: HeadersInit): Headers;
1617 };
1618
1619 /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
1620 interface IDBCursor {
1621     /** Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor. */
1622     readonly direction: IDBCursorDirection;
1623     /** Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
1624     readonly key: IDBValidKey;
1625     /** Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
1626     readonly primaryKey: IDBValidKey;
1627     readonly request: IDBRequest;
1628     /** Returns the IDBObjectStore or IDBIndex the cursor was opened from. */
1629     readonly source: IDBObjectStore | IDBIndex;
1630     /** Advances the cursor through the next count records in range. */
1631     advance(count: number): void;
1632     /** Advances the cursor to the next record in range. */
1633     continue(key?: IDBValidKey): void;
1634     /** Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index. */
1635     continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
1636     /**
1637      * Delete the record pointed at by the cursor with a new value.
1638      *
1639      * If successful, request's result will be undefined.
1640      */
1641     delete(): IDBRequest<undefined>;
1642     /**
1643      * Updated the record pointed at by the cursor with a new value.
1644      *
1645      * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
1646      *
1647      * If successful, request's result will be the record's key.
1648      */
1649     update(value: any): IDBRequest<IDBValidKey>;
1650 }
1651
1652 declare var IDBCursor: {
1653     prototype: IDBCursor;
1654     new(): IDBCursor;
1655 };
1656
1657 /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
1658 interface IDBCursorWithValue extends IDBCursor {
1659     /** Returns the cursor's current value. */
1660     readonly value: any;
1661 }
1662
1663 declare var IDBCursorWithValue: {
1664     prototype: IDBCursorWithValue;
1665     new(): IDBCursorWithValue;
1666 };
1667
1668 interface IDBDatabaseEventMap {
1669     "abort": Event;
1670     "close": Event;
1671     "error": Event;
1672     "versionchange": IDBVersionChangeEvent;
1673 }
1674
1675 /** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
1676 interface IDBDatabase extends EventTarget {
1677     /** Returns the name of the database. */
1678     readonly name: string;
1679     /** Returns a list of the names of object stores in the database. */
1680     readonly objectStoreNames: DOMStringList;
1681     onabort: ((this: IDBDatabase, ev: Event) => any) | null;
1682     onclose: ((this: IDBDatabase, ev: Event) => any) | null;
1683     onerror: ((this: IDBDatabase, ev: Event) => any) | null;
1684     onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
1685     /** Returns the version of the database. */
1686     readonly version: number;
1687     /** Closes the connection once all running transactions have finished. */
1688     close(): void;
1689     /**
1690      * Creates a new object store with the given name and options and returns a new IDBObjectStore.
1691      *
1692      * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1693      */
1694     createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
1695     /**
1696      * Deletes the object store with the given name.
1697      *
1698      * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1699      */
1700     deleteObjectStore(name: string): void;
1701     /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
1702     transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
1703     addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1704     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1705     removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1706     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1707 }
1708
1709 declare var IDBDatabase: {
1710     prototype: IDBDatabase;
1711     new(): IDBDatabase;
1712 };
1713
1714 /** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
1715 interface IDBFactory {
1716     /**
1717      * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
1718      *
1719      * Throws a "DataError" DOMException if either input is not a valid key.
1720      */
1721     cmp(first: any, second: any): number;
1722     databases(): Promise<IDBDatabaseInfo[]>;
1723     /** Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null. */
1724     deleteDatabase(name: string): IDBOpenDBRequest;
1725     /** Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. */
1726     open(name: string, version?: number): IDBOpenDBRequest;
1727 }
1728
1729 declare var IDBFactory: {
1730     prototype: IDBFactory;
1731     new(): IDBFactory;
1732 };
1733
1734 /** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
1735 interface IDBIndex {
1736     readonly keyPath: string | string[];
1737     readonly multiEntry: boolean;
1738     /** Returns the name of the index. */
1739     name: string;
1740     /** Returns the IDBObjectStore the index belongs to. */
1741     readonly objectStore: IDBObjectStore;
1742     readonly unique: boolean;
1743     /**
1744      * Retrieves the number of records matching the given key or key range in query.
1745      *
1746      * If successful, request's result will be the count.
1747      */
1748     count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1749     /**
1750      * Retrieves the value of the first record matching the given key or key range in query.
1751      *
1752      * If successful, request's result will be the value, or undefined if there was no matching record.
1753      */
1754     get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
1755     /**
1756      * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1757      *
1758      * If successful, request's result will be an Array of the values.
1759      */
1760     getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1761     /**
1762      * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1763      *
1764      * If successful, request's result will be an Array of the keys.
1765      */
1766     getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1767     /**
1768      * Retrieves the key of the first record matching the given key or key range in query.
1769      *
1770      * If successful, request's result will be the key, or undefined if there was no matching record.
1771      */
1772     getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
1773     /**
1774      * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
1775      *
1776      * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
1777      */
1778     openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
1779     /**
1780      * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
1781      *
1782      * If successful, request's result will be an IDBCursor, or null if there were no matching records.
1783      */
1784     openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1785 }
1786
1787 declare var IDBIndex: {
1788     prototype: IDBIndex;
1789     new(): IDBIndex;
1790 };
1791
1792 /** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
1793 interface IDBKeyRange {
1794     /** Returns lower bound, or undefined if none. */
1795     readonly lower: any;
1796     /** Returns true if the lower open flag is set, and false otherwise. */
1797     readonly lowerOpen: boolean;
1798     /** Returns upper bound, or undefined if none. */
1799     readonly upper: any;
1800     /** Returns true if the upper open flag is set, and false otherwise. */
1801     readonly upperOpen: boolean;
1802     /** Returns true if key is included in the range, and false otherwise. */
1803     includes(key: any): boolean;
1804 }
1805
1806 declare var IDBKeyRange: {
1807     prototype: IDBKeyRange;
1808     new(): IDBKeyRange;
1809     /** Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. */
1810     bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
1811     /** Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. */
1812     lowerBound(lower: any, open?: boolean): IDBKeyRange;
1813     /** Returns a new IDBKeyRange spanning only key. */
1814     only(value: any): IDBKeyRange;
1815     /** Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. */
1816     upperBound(upper: any, open?: boolean): IDBKeyRange;
1817 };
1818
1819 /** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
1820 interface IDBObjectStore {
1821     /** Returns true if the store has a key generator, and false otherwise. */
1822     readonly autoIncrement: boolean;
1823     /** Returns a list of the names of indexes in the store. */
1824     readonly indexNames: DOMStringList;
1825     /** Returns the key path of the store, or null if none. */
1826     readonly keyPath: string | string[];
1827     /** Returns the name of the store. */
1828     name: string;
1829     /** Returns the associated transaction. */
1830     readonly transaction: IDBTransaction;
1831     /**
1832      * Adds or updates a record in store with the given value and key.
1833      *
1834      * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
1835      *
1836      * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
1837      *
1838      * If successful, request's result will be the record's key.
1839      */
1840     add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
1841     /**
1842      * Deletes all records in store.
1843      *
1844      * If successful, request's result will be undefined.
1845      */
1846     clear(): IDBRequest<undefined>;
1847     /**
1848      * Retrieves the number of records matching the given key or key range in query.
1849      *
1850      * If successful, request's result will be the count.
1851      */
1852     count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1853     /**
1854      * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
1855      *
1856      * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1857      */
1858     createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
1859     /**
1860      * Deletes records in store with the given key or in the given key range in query.
1861      *
1862      * If successful, request's result will be undefined.
1863      */
1864     delete(query: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
1865     /**
1866      * Deletes the index in store with the given name.
1867      *
1868      * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1869      */
1870     deleteIndex(name: string): void;
1871     /**
1872      * Retrieves the value of the first record matching the given key or key range in query.
1873      *
1874      * If successful, request's result will be the value, or undefined if there was no matching record.
1875      */
1876     get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
1877     /**
1878      * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1879      *
1880      * If successful, request's result will be an Array of the values.
1881      */
1882     getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1883     /**
1884      * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1885      *
1886      * If successful, request's result will be an Array of the keys.
1887      */
1888     getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1889     /**
1890      * Retrieves the key of the first record matching the given key or key range in query.
1891      *
1892      * If successful, request's result will be the key, or undefined if there was no matching record.
1893      */
1894     getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
1895     index(name: string): IDBIndex;
1896     /**
1897      * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
1898      *
1899      * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
1900      */
1901     openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
1902     /**
1903      * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
1904      *
1905      * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
1906      */
1907     openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1908     /**
1909      * Adds or updates a record in store with the given value and key.
1910      *
1911      * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
1912      *
1913      * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
1914      *
1915      * If successful, request's result will be the record's key.
1916      */
1917     put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
1918 }
1919
1920 declare var IDBObjectStore: {
1921     prototype: IDBObjectStore;
1922     new(): IDBObjectStore;
1923 };
1924
1925 interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
1926     "blocked": Event;
1927     "upgradeneeded": IDBVersionChangeEvent;
1928 }
1929
1930 /** Also inherits methods from its parents IDBRequest and EventTarget. */
1931 interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
1932     onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
1933     onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
1934     addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1935     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1936     removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1937     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1938 }
1939
1940 declare var IDBOpenDBRequest: {
1941     prototype: IDBOpenDBRequest;
1942     new(): IDBOpenDBRequest;
1943 };
1944
1945 interface IDBRequestEventMap {
1946     "error": Event;
1947     "success": Event;
1948 }
1949
1950 /** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
1951 interface IDBRequest<T = any> extends EventTarget {
1952     /** When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending. */
1953     readonly error: DOMException | null;
1954     onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
1955     onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
1956     /** Returns "pending" until a request is complete, then returns "done". */
1957     readonly readyState: IDBRequestReadyState;
1958     /** When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. */
1959     readonly result: T;
1960     /** Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. */
1961     readonly source: IDBObjectStore | IDBIndex | IDBCursor;
1962     /** Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise. */
1963     readonly transaction: IDBTransaction | null;
1964     addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1965     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1966     removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1967     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1968 }
1969
1970 declare var IDBRequest: {
1971     prototype: IDBRequest;
1972     new(): IDBRequest;
1973 };
1974
1975 interface IDBTransactionEventMap {
1976     "abort": Event;
1977     "complete": Event;
1978     "error": Event;
1979 }
1980
1981 interface IDBTransaction extends EventTarget {
1982     /** Returns the transaction's connection. */
1983     readonly db: IDBDatabase;
1984     /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
1985     readonly error: DOMException | null;
1986     /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
1987     readonly mode: IDBTransactionMode;
1988     /** Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. */
1989     readonly objectStoreNames: DOMStringList;
1990     onabort: ((this: IDBTransaction, ev: Event) => any) | null;
1991     oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
1992     onerror: ((this: IDBTransaction, ev: Event) => any) | null;
1993     /** Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */
1994     abort(): void;
1995     commit(): void;
1996     /** Returns an IDBObjectStore in the transaction's scope. */
1997     objectStore(name: string): IDBObjectStore;
1998     addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1999     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2000     removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2001     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2002 }
2003
2004 declare var IDBTransaction: {
2005     prototype: IDBTransaction;
2006     new(): IDBTransaction;
2007 };
2008
2009 /** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
2010 interface IDBVersionChangeEvent extends Event {
2011     readonly newVersion: number | null;
2012     readonly oldVersion: number;
2013 }
2014
2015 declare var IDBVersionChangeEvent: {
2016     prototype: IDBVersionChangeEvent;
2017     new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
2018 };
2019
2020 interface ImageBitmap {
2021     /** Returns the intrinsic height of the image, in CSS pixels. */
2022     readonly height: number;
2023     /** Returns the intrinsic width of the image, in CSS pixels. */
2024     readonly width: number;
2025     /** Releases imageBitmap's underlying bitmap data. */
2026     close(): void;
2027 }
2028
2029 declare var ImageBitmap: {
2030     prototype: ImageBitmap;
2031     new(): ImageBitmap;
2032 };
2033
2034 interface ImageBitmapRenderingContext {
2035     /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. */
2036     transferFromImageBitmap(bitmap: ImageBitmap | null): void;
2037 }
2038
2039 declare var ImageBitmapRenderingContext: {
2040     prototype: ImageBitmapRenderingContext;
2041     new(): ImageBitmapRenderingContext;
2042 };
2043
2044 /** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
2045 interface ImageData {
2046     /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
2047     readonly data: Uint8ClampedArray;
2048     /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
2049     readonly height: number;
2050     /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
2051     readonly width: number;
2052 }
2053
2054 declare var ImageData: {
2055     prototype: ImageData;
2056     new(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
2057     new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
2058 };
2059
2060 interface KHR_parallel_shader_compile {
2061     readonly COMPLETION_STATUS_KHR: GLenum;
2062 }
2063
2064 interface MediaCapabilities {
2065     decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
2066     encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
2067 }
2068
2069 declare var MediaCapabilities: {
2070     prototype: MediaCapabilities;
2071     new(): MediaCapabilities;
2072 };
2073
2074 /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
2075 interface MessageChannel {
2076     /** Returns the first MessagePort object. */
2077     readonly port1: MessagePort;
2078     /** Returns the second MessagePort object. */
2079     readonly port2: MessagePort;
2080 }
2081
2082 declare var MessageChannel: {
2083     prototype: MessageChannel;
2084     new(): MessageChannel;
2085 };
2086
2087 /** A message received by a target object. */
2088 interface MessageEvent<T = any> extends Event {
2089     /** Returns the data of the message. */
2090     readonly data: T;
2091     /** Returns the last event ID string, for server-sent events. */
2092     readonly lastEventId: string;
2093     /** Returns the origin of the message, for server-sent events and cross-document messaging. */
2094     readonly origin: string;
2095     /** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */
2096     readonly ports: ReadonlyArray<MessagePort>;
2097     /** Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */
2098     readonly source: MessageEventSource | null;
2099     /** @deprecated */
2100     initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
2101 }
2102
2103 declare var MessageEvent: {
2104     prototype: MessageEvent;
2105     new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
2106 };
2107
2108 interface MessagePortEventMap {
2109     "message": MessageEvent;
2110     "messageerror": MessageEvent;
2111 }
2112
2113 /** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
2114 interface MessagePort extends EventTarget {
2115     onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
2116     onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
2117     /** Disconnects the port, so that it is no longer active. */
2118     close(): void;
2119     /**
2120      * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
2121      *
2122      * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
2123      */
2124     postMessage(message: any, transfer: Transferable[]): void;
2125     postMessage(message: any, options?: StructuredSerializeOptions): void;
2126     /** Begins dispatching messages received on the port. */
2127     start(): void;
2128     addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2129     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2130     removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2131     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2132 }
2133
2134 declare var MessagePort: {
2135     prototype: MessagePort;
2136     new(): MessagePort;
2137 };
2138
2139 interface NavigatorConcurrentHardware {
2140     readonly hardwareConcurrency: number;
2141 }
2142
2143 interface NavigatorID {
2144     /** @deprecated */
2145     readonly appCodeName: string;
2146     /** @deprecated */
2147     readonly appName: string;
2148     /** @deprecated */
2149     readonly appVersion: string;
2150     /** @deprecated */
2151     readonly platform: string;
2152     /** @deprecated */
2153     readonly product: string;
2154     readonly userAgent: string;
2155 }
2156
2157 interface NavigatorLanguage {
2158     readonly language: string;
2159     readonly languages: ReadonlyArray<string>;
2160 }
2161
2162 interface NavigatorNetworkInformation {
2163     readonly connection: NetworkInformation;
2164 }
2165
2166 interface NavigatorOnLine {
2167     readonly onLine: boolean;
2168 }
2169
2170 /** Available only in secure contexts. */
2171 interface NavigatorStorage {
2172     readonly storage: StorageManager;
2173 }
2174
2175 interface NetworkInformation extends EventTarget {
2176     readonly type: ConnectionType;
2177 }
2178
2179 declare var NetworkInformation: {
2180     prototype: NetworkInformation;
2181     new(): NetworkInformation;
2182 };
2183
2184 interface NotificationEventMap {
2185     "click": Event;
2186     "close": Event;
2187     "error": Event;
2188     "show": Event;
2189 }
2190
2191 /** This Notifications API interface is used to configure and display desktop notifications to the user. */
2192 interface Notification extends EventTarget {
2193     readonly body: string;
2194     readonly data: any;
2195     readonly dir: NotificationDirection;
2196     readonly icon: string;
2197     readonly lang: string;
2198     onclick: ((this: Notification, ev: Event) => any) | null;
2199     onclose: ((this: Notification, ev: Event) => any) | null;
2200     onerror: ((this: Notification, ev: Event) => any) | null;
2201     onshow: ((this: Notification, ev: Event) => any) | null;
2202     readonly tag: string;
2203     readonly title: string;
2204     close(): void;
2205     addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2206     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2207     removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2208     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2209 }
2210
2211 declare var Notification: {
2212     prototype: Notification;
2213     new(title: string, options?: NotificationOptions): Notification;
2214     readonly permission: NotificationPermission;
2215 };
2216
2217 /** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
2218 interface NotificationEvent extends ExtendableEvent {
2219     readonly action: string;
2220     readonly notification: Notification;
2221 }
2222
2223 declare var NotificationEvent: {
2224     prototype: NotificationEvent;
2225     new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
2226 };
2227
2228 /** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
2229 interface OES_element_index_uint {
2230 }
2231
2232 interface OES_fbo_render_mipmap {
2233 }
2234
2235 /** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
2236 interface OES_standard_derivatives {
2237     readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
2238 }
2239
2240 /** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
2241 interface OES_texture_float {
2242 }
2243
2244 /** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
2245 interface OES_texture_float_linear {
2246 }
2247
2248 /** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
2249 interface OES_texture_half_float {
2250     readonly HALF_FLOAT_OES: GLenum;
2251 }
2252
2253 /** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
2254 interface OES_texture_half_float_linear {
2255 }
2256
2257 interface OES_vertex_array_object {
2258     bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2259     createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
2260     deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2261     isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
2262     readonly VERTEX_ARRAY_BINDING_OES: GLenum;
2263 }
2264
2265 interface OVR_multiview2 {
2266     framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
2267     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
2268     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
2269     readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
2270     readonly MAX_VIEWS_OVR: GLenum;
2271 }
2272
2273 /** @deprecated this is not available in most browsers */
2274 interface OffscreenCanvas extends EventTarget {
2275 }
2276
2277 /** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
2278 interface Path2D extends CanvasPath {
2279     /** Adds to the path the path given by the argument. */
2280     addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
2281 }
2282
2283 declare var Path2D: {
2284     prototype: Path2D;
2285     new(path?: Path2D | string): Path2D;
2286 };
2287
2288 interface PerformanceEventMap {
2289     "resourcetimingbufferfull": Event;
2290 }
2291
2292 /** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
2293 interface Performance extends EventTarget {
2294     onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
2295     readonly timeOrigin: DOMHighResTimeStamp;
2296     clearMarks(markName?: string): void;
2297     clearMeasures(measureName?: string): void;
2298     clearResourceTimings(): void;
2299     getEntries(): PerformanceEntryList;
2300     getEntriesByName(name: string, type?: string): PerformanceEntryList;
2301     getEntriesByType(type: string): PerformanceEntryList;
2302     mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
2303     measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
2304     now(): DOMHighResTimeStamp;
2305     setResourceTimingBufferSize(maxSize: number): void;
2306     toJSON(): any;
2307     addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2308     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2309     removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2310     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2311 }
2312
2313 declare var Performance: {
2314     prototype: Performance;
2315     new(): Performance;
2316 };
2317
2318 /** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */
2319 interface PerformanceEntry {
2320     readonly duration: DOMHighResTimeStamp;
2321     readonly entryType: string;
2322     readonly name: string;
2323     readonly startTime: DOMHighResTimeStamp;
2324     toJSON(): any;
2325 }
2326
2327 declare var PerformanceEntry: {
2328     prototype: PerformanceEntry;
2329     new(): PerformanceEntry;
2330 };
2331
2332 /** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */
2333 interface PerformanceMark extends PerformanceEntry {
2334     readonly detail: any;
2335 }
2336
2337 declare var PerformanceMark: {
2338     prototype: PerformanceMark;
2339     new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
2340 };
2341
2342 /** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */
2343 interface PerformanceMeasure extends PerformanceEntry {
2344     readonly detail: any;
2345 }
2346
2347 declare var PerformanceMeasure: {
2348     prototype: PerformanceMeasure;
2349     new(): PerformanceMeasure;
2350 };
2351
2352 interface PerformanceObserver {
2353     disconnect(): void;
2354     observe(options?: PerformanceObserverInit): void;
2355     takeRecords(): PerformanceEntryList;
2356 }
2357
2358 declare var PerformanceObserver: {
2359     prototype: PerformanceObserver;
2360     new(callback: PerformanceObserverCallback): PerformanceObserver;
2361     readonly supportedEntryTypes: ReadonlyArray<string>;
2362 };
2363
2364 interface PerformanceObserverEntryList {
2365     getEntries(): PerformanceEntryList;
2366     getEntriesByName(name: string, type?: string): PerformanceEntryList;
2367     getEntriesByType(type: string): PerformanceEntryList;
2368 }
2369
2370 declare var PerformanceObserverEntryList: {
2371     prototype: PerformanceObserverEntryList;
2372     new(): PerformanceObserverEntryList;
2373 };
2374
2375 /** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */
2376 interface PerformanceResourceTiming extends PerformanceEntry {
2377     readonly connectEnd: DOMHighResTimeStamp;
2378     readonly connectStart: DOMHighResTimeStamp;
2379     readonly decodedBodySize: number;
2380     readonly domainLookupEnd: DOMHighResTimeStamp;
2381     readonly domainLookupStart: DOMHighResTimeStamp;
2382     readonly encodedBodySize: number;
2383     readonly fetchStart: DOMHighResTimeStamp;
2384     readonly initiatorType: string;
2385     readonly nextHopProtocol: string;
2386     readonly redirectEnd: DOMHighResTimeStamp;
2387     readonly redirectStart: DOMHighResTimeStamp;
2388     readonly requestStart: DOMHighResTimeStamp;
2389     readonly responseEnd: DOMHighResTimeStamp;
2390     readonly responseStart: DOMHighResTimeStamp;
2391     readonly secureConnectionStart: DOMHighResTimeStamp;
2392     readonly serverTiming: ReadonlyArray<PerformanceServerTiming>;
2393     readonly transferSize: number;
2394     readonly workerStart: DOMHighResTimeStamp;
2395     toJSON(): any;
2396 }
2397
2398 declare var PerformanceResourceTiming: {
2399     prototype: PerformanceResourceTiming;
2400     new(): PerformanceResourceTiming;
2401 };
2402
2403 interface PerformanceServerTiming {
2404     readonly description: string;
2405     readonly duration: DOMHighResTimeStamp;
2406     readonly name: string;
2407     toJSON(): any;
2408 }
2409
2410 declare var PerformanceServerTiming: {
2411     prototype: PerformanceServerTiming;
2412     new(): PerformanceServerTiming;
2413 };
2414
2415 interface PermissionStatusEventMap {
2416     "change": Event;
2417 }
2418
2419 interface PermissionStatus extends EventTarget {
2420     onchange: ((this: PermissionStatus, ev: Event) => any) | null;
2421     readonly state: PermissionState;
2422     addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2423     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2424     removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2425     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2426 }
2427
2428 declare var PermissionStatus: {
2429     prototype: PermissionStatus;
2430     new(): PermissionStatus;
2431 };
2432
2433 interface Permissions {
2434     query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>;
2435 }
2436
2437 declare var Permissions: {
2438     prototype: Permissions;
2439     new(): Permissions;
2440 };
2441
2442 /** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
2443 interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
2444     readonly lengthComputable: boolean;
2445     readonly loaded: number;
2446     readonly target: T | null;
2447     readonly total: number;
2448 }
2449
2450 declare var ProgressEvent: {
2451     prototype: ProgressEvent;
2452     new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
2453 };
2454
2455 interface PromiseRejectionEvent extends Event {
2456     readonly promise: Promise<any>;
2457     readonly reason: any;
2458 }
2459
2460 declare var PromiseRejectionEvent: {
2461     prototype: PromiseRejectionEvent;
2462     new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
2463 };
2464
2465 /**
2466  * This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.
2467  * Available only in secure contexts.
2468  */
2469 interface PushEvent extends ExtendableEvent {
2470     readonly data: PushMessageData | null;
2471 }
2472
2473 declare var PushEvent: {
2474     prototype: PushEvent;
2475     new(type: string, eventInitDict?: PushEventInit): PushEvent;
2476 };
2477
2478 /**
2479  * This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
2480  * Available only in secure contexts.
2481  */
2482 interface PushManager {
2483     getSubscription(): Promise<PushSubscription | null>;
2484     permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
2485     subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
2486 }
2487
2488 declare var PushManager: {
2489     prototype: PushManager;
2490     new(): PushManager;
2491     readonly supportedContentEncodings: ReadonlyArray<string>;
2492 };
2493
2494 /**
2495  * This Push API interface provides methods which let you retrieve the push data sent by a server in various formats.
2496  * Available only in secure contexts.
2497  */
2498 interface PushMessageData {
2499     arrayBuffer(): ArrayBuffer;
2500     blob(): Blob;
2501     json(): any;
2502     text(): string;
2503 }
2504
2505 declare var PushMessageData: {
2506     prototype: PushMessageData;
2507     new(): PushMessageData;
2508 };
2509
2510 /**
2511  * This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
2512  * Available only in secure contexts.
2513  */
2514 interface PushSubscription {
2515     readonly endpoint: string;
2516     readonly options: PushSubscriptionOptions;
2517     getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2518     toJSON(): PushSubscriptionJSON;
2519     unsubscribe(): Promise<boolean>;
2520 }
2521
2522 declare var PushSubscription: {
2523     prototype: PushSubscription;
2524     new(): PushSubscription;
2525 };
2526
2527 /** Available only in secure contexts. */
2528 interface PushSubscriptionOptions {
2529     readonly applicationServerKey: ArrayBuffer | null;
2530 }
2531
2532 declare var PushSubscriptionOptions: {
2533     prototype: PushSubscriptionOptions;
2534     new(): PushSubscriptionOptions;
2535 };
2536
2537 /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
2538 interface ReadableStream<R = any> {
2539     readonly locked: boolean;
2540     cancel(reason?: any): Promise<void>;
2541     getReader(): ReadableStreamDefaultReader<R>;
2542     pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
2543     pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
2544     tee(): [ReadableStream<R>, ReadableStream<R>];
2545 }
2546
2547 declare var ReadableStream: {
2548     prototype: ReadableStream;
2549     new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
2550 };
2551
2552 interface ReadableStreamDefaultController<R = any> {
2553     readonly desiredSize: number | null;
2554     close(): void;
2555     enqueue(chunk?: R): void;
2556     error(e?: any): void;
2557 }
2558
2559 declare var ReadableStreamDefaultController: {
2560     prototype: ReadableStreamDefaultController;
2561     new(): ReadableStreamDefaultController;
2562 };
2563
2564 interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
2565     read(): Promise<ReadableStreamDefaultReadResult<R>>;
2566     releaseLock(): void;
2567 }
2568
2569 declare var ReadableStreamDefaultReader: {
2570     prototype: ReadableStreamDefaultReader;
2571     new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
2572 };
2573
2574 interface ReadableStreamGenericReader {
2575     readonly closed: Promise<undefined>;
2576     cancel(reason?: any): Promise<void>;
2577 }
2578
2579 /** This Fetch API interface represents a resource request. */
2580 interface Request extends Body {
2581     /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
2582     readonly cache: RequestCache;
2583     /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
2584     readonly credentials: RequestCredentials;
2585     /** Returns the kind of resource requested by request, e.g., "document" or "script". */
2586     readonly destination: RequestDestination;
2587     /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
2588     readonly headers: Headers;
2589     /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
2590     readonly integrity: string;
2591     /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
2592     readonly keepalive: boolean;
2593     /** Returns request's HTTP method, which is "GET" by default. */
2594     readonly method: string;
2595     /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
2596     readonly mode: RequestMode;
2597     /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
2598     readonly redirect: RequestRedirect;
2599     /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
2600     readonly referrer: string;
2601     /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
2602     readonly referrerPolicy: ReferrerPolicy;
2603     /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
2604     readonly signal: AbortSignal;
2605     /** Returns the URL of request as a string. */
2606     readonly url: string;
2607     clone(): Request;
2608 }
2609
2610 declare var Request: {
2611     prototype: Request;
2612     new(input: RequestInfo, init?: RequestInit): Request;
2613 };
2614
2615 /** This Fetch API interface represents the response to a request. */
2616 interface Response extends Body {
2617     readonly headers: Headers;
2618     readonly ok: boolean;
2619     readonly redirected: boolean;
2620     readonly status: number;
2621     readonly statusText: string;
2622     readonly type: ResponseType;
2623     readonly url: string;
2624     clone(): Response;
2625 }
2626
2627 declare var Response: {
2628     prototype: Response;
2629     new(body?: BodyInit | null, init?: ResponseInit): Response;
2630     error(): Response;
2631     redirect(url: string | URL, status?: number): Response;
2632 };
2633
2634 /** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */
2635 interface SecurityPolicyViolationEvent extends Event {
2636     readonly blockedURI: string;
2637     readonly columnNumber: number;
2638     readonly disposition: SecurityPolicyViolationEventDisposition;
2639     readonly documentURI: string;
2640     readonly effectiveDirective: string;
2641     readonly lineNumber: number;
2642     readonly originalPolicy: string;
2643     readonly referrer: string;
2644     readonly sample: string;
2645     readonly sourceFile: string;
2646     readonly statusCode: number;
2647     readonly violatedDirective: string;
2648 }
2649
2650 declare var SecurityPolicyViolationEvent: {
2651     prototype: SecurityPolicyViolationEvent;
2652     new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
2653 };
2654
2655 interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
2656     "statechange": Event;
2657 }
2658
2659 /**
2660  * This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
2661  * Available only in secure contexts.
2662  */
2663 interface ServiceWorker extends EventTarget, AbstractWorker {
2664     onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
2665     readonly scriptURL: string;
2666     readonly state: ServiceWorkerState;
2667     postMessage(message: any, transfer: Transferable[]): void;
2668     postMessage(message: any, options?: StructuredSerializeOptions): void;
2669     addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2670     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2671     removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2672     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2673 }
2674
2675 declare var ServiceWorker: {
2676     prototype: ServiceWorker;
2677     new(): ServiceWorker;
2678 };
2679
2680 interface ServiceWorkerContainerEventMap {
2681     "controllerchange": Event;
2682     "message": MessageEvent;
2683     "messageerror": MessageEvent;
2684 }
2685
2686 /**
2687  * The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
2688  * Available only in secure contexts.
2689  */
2690 interface ServiceWorkerContainer extends EventTarget {
2691     readonly controller: ServiceWorker | null;
2692     oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
2693     onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2694     onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2695     readonly ready: Promise<ServiceWorkerRegistration>;
2696     getRegistration(clientURL?: string | URL): Promise<ServiceWorkerRegistration | undefined>;
2697     getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
2698     register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
2699     startMessages(): void;
2700     addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2701     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2702     removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2703     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2704 }
2705
2706 declare var ServiceWorkerContainer: {
2707     prototype: ServiceWorkerContainer;
2708     new(): ServiceWorkerContainer;
2709 };
2710
2711 interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2712     "activate": ExtendableEvent;
2713     "fetch": FetchEvent;
2714     "install": ExtendableEvent;
2715     "message": ExtendableMessageEvent;
2716     "messageerror": MessageEvent;
2717     "notificationclick": NotificationEvent;
2718     "notificationclose": NotificationEvent;
2719     "push": PushEvent;
2720 }
2721
2722 /** This ServiceWorker API interface represents the global execution context of a service worker. */
2723 interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2724     readonly clients: Clients;
2725     onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2726     onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
2727     oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2728     onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
2729     onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
2730     onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2731     onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2732     onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2733     readonly registration: ServiceWorkerRegistration;
2734     skipWaiting(): Promise<void>;
2735     addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2736     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2737     removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2738     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2739 }
2740
2741 declare var ServiceWorkerGlobalScope: {
2742     prototype: ServiceWorkerGlobalScope;
2743     new(): ServiceWorkerGlobalScope;
2744 };
2745
2746 interface ServiceWorkerRegistrationEventMap {
2747     "updatefound": Event;
2748 }
2749
2750 /**
2751  * This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
2752  * Available only in secure contexts.
2753  */
2754 interface ServiceWorkerRegistration extends EventTarget {
2755     readonly active: ServiceWorker | null;
2756     readonly installing: ServiceWorker | null;
2757     onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
2758     readonly pushManager: PushManager;
2759     readonly scope: string;
2760     readonly updateViaCache: ServiceWorkerUpdateViaCache;
2761     readonly waiting: ServiceWorker | null;
2762     getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
2763     showNotification(title: string, options?: NotificationOptions): Promise<void>;
2764     unregister(): Promise<boolean>;
2765     update(): Promise<void>;
2766     addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2767     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2768     removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2769     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2770 }
2771
2772 declare var ServiceWorkerRegistration: {
2773     prototype: ServiceWorkerRegistration;
2774     new(): ServiceWorkerRegistration;
2775 };
2776
2777 interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2778     "connect": MessageEvent;
2779 }
2780
2781 interface SharedWorkerGlobalScope extends WorkerGlobalScope {
2782     /** Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name. */
2783     readonly name: string;
2784     onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
2785     /** Aborts sharedWorkerGlobal. */
2786     close(): void;
2787     addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2788     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2789     removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2790     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2791 }
2792
2793 declare var SharedWorkerGlobalScope: {
2794     prototype: SharedWorkerGlobalScope;
2795     new(): SharedWorkerGlobalScope;
2796 };
2797
2798 /** Available only in secure contexts. */
2799 interface StorageManager {
2800     estimate(): Promise<StorageEstimate>;
2801     persisted(): Promise<boolean>;
2802 }
2803
2804 declare var StorageManager: {
2805     prototype: StorageManager;
2806     new(): StorageManager;
2807 };
2808
2809 /**
2810  * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
2811  * Available only in secure contexts.
2812  */
2813 interface SubtleCrypto {
2814     decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
2815     deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
2816     deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2817     digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
2818     encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
2819     exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
2820     exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
2821     generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
2822     generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2823     generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
2824     importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2825     importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2826     sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
2827     unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
2828     verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
2829     wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
2830 }
2831
2832 declare var SubtleCrypto: {
2833     prototype: SubtleCrypto;
2834     new(): SubtleCrypto;
2835 };
2836
2837 /** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView â€“ a C-like representation of strings based on typed arrays. */
2838 interface TextDecoder extends TextDecoderCommon {
2839     /**
2840      * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
2841      *
2842      * ```
2843      * var string = "", decoder = new TextDecoder(encoding), buffer;
2844      * while(buffer = next_chunk()) {
2845      *   string += decoder.decode(buffer, {stream:true});
2846      * }
2847      * string += decoder.decode(); // end-of-queue
2848      * ```
2849      *
2850      * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
2851      */
2852     decode(input?: BufferSource, options?: TextDecodeOptions): string;
2853 }
2854
2855 declare var TextDecoder: {
2856     prototype: TextDecoder;
2857     new(label?: string, options?: TextDecoderOptions): TextDecoder;
2858 };
2859
2860 interface TextDecoderCommon {
2861     /** Returns encoding's name, lowercased. */
2862     readonly encoding: string;
2863     /** Returns true if error mode is "fatal", otherwise false. */
2864     readonly fatal: boolean;
2865     /** Returns the value of ignore BOM. */
2866     readonly ignoreBOM: boolean;
2867 }
2868
2869 interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
2870     readonly readable: ReadableStream<string>;
2871     readonly writable: WritableStream<BufferSource>;
2872 }
2873
2874 declare var TextDecoderStream: {
2875     prototype: TextDecoderStream;
2876     new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
2877 };
2878
2879 /** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView â€“ a C-like representation of strings based on typed arrays. */
2880 interface TextEncoder extends TextEncoderCommon {
2881     /** Returns the result of running UTF-8's encoder. */
2882     encode(input?: string): Uint8Array;
2883     /** Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination. */
2884     encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
2885 }
2886
2887 declare var TextEncoder: {
2888     prototype: TextEncoder;
2889     new(): TextEncoder;
2890 };
2891
2892 interface TextEncoderCommon {
2893     /** Returns "utf-8". */
2894     readonly encoding: string;
2895 }
2896
2897 interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
2898     readonly readable: ReadableStream<Uint8Array>;
2899     readonly writable: WritableStream<string>;
2900 }
2901
2902 declare var TextEncoderStream: {
2903     prototype: TextEncoderStream;
2904     new(): TextEncoderStream;
2905 };
2906
2907 /** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
2908 interface TextMetrics {
2909     /** Returns the measurement described below. */
2910     readonly actualBoundingBoxAscent: number;
2911     /** Returns the measurement described below. */
2912     readonly actualBoundingBoxDescent: number;
2913     /** Returns the measurement described below. */
2914     readonly actualBoundingBoxLeft: number;
2915     /** Returns the measurement described below. */
2916     readonly actualBoundingBoxRight: number;
2917     /** Returns the measurement described below. */
2918     readonly fontBoundingBoxAscent: number;
2919     /** Returns the measurement described below. */
2920     readonly fontBoundingBoxDescent: number;
2921     /** Returns the measurement described below. */
2922     readonly width: number;
2923 }
2924
2925 declare var TextMetrics: {
2926     prototype: TextMetrics;
2927     new(): TextMetrics;
2928 };
2929
2930 interface TransformStream<I = any, O = any> {
2931     readonly readable: ReadableStream<O>;
2932     readonly writable: WritableStream<I>;
2933 }
2934
2935 declare var TransformStream: {
2936     prototype: TransformStream;
2937     new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
2938 };
2939
2940 interface TransformStreamDefaultController<O = any> {
2941     readonly desiredSize: number | null;
2942     enqueue(chunk?: O): void;
2943     error(reason?: any): void;
2944     terminate(): void;
2945 }
2946
2947 declare var TransformStreamDefaultController: {
2948     prototype: TransformStreamDefaultController;
2949     new(): TransformStreamDefaultController;
2950 };
2951
2952 /** The URL interface represents an object providing static methods used for creating object URLs. */
2953 interface URL {
2954     hash: string;
2955     host: string;
2956     hostname: string;
2957     href: string;
2958     toString(): string;
2959     readonly origin: string;
2960     password: string;
2961     pathname: string;
2962     port: string;
2963     protocol: string;
2964     search: string;
2965     readonly searchParams: URLSearchParams;
2966     username: string;
2967     toJSON(): string;
2968 }
2969
2970 declare var URL: {
2971     prototype: URL;
2972     new(url: string | URL, base?: string | URL): URL;
2973     createObjectURL(obj: Blob): string;
2974     revokeObjectURL(url: string): void;
2975 };
2976
2977 interface URLSearchParams {
2978     /** Appends a specified key/value pair as a new search parameter. */
2979     append(name: string, value: string): void;
2980     /** Deletes the given search parameter, and its associated value, from the list of all search parameters. */
2981     delete(name: string): void;
2982     /** Returns the first value associated to the given search parameter. */
2983     get(name: string): string | null;
2984     /** Returns all the values association with a given search parameter. */
2985     getAll(name: string): string[];
2986     /** Returns a Boolean indicating if such a search parameter exists. */
2987     has(name: string): boolean;
2988     /** Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. */
2989     set(name: string, value: string): void;
2990     sort(): void;
2991     /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
2992     toString(): string;
2993     forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
2994 }
2995
2996 declare var URLSearchParams: {
2997     prototype: URLSearchParams;
2998     new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
2999     toString(): string;
3000 };
3001
3002 interface WEBGL_color_buffer_float {
3003     readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
3004     readonly RGBA32F_EXT: GLenum;
3005     readonly UNSIGNED_NORMALIZED_EXT: GLenum;
3006 }
3007
3008 interface WEBGL_compressed_texture_astc {
3009     getSupportedProfiles(): string[];
3010     readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
3011     readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
3012     readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
3013     readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
3014     readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
3015     readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
3016     readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
3017     readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
3018     readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
3019     readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
3020     readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
3021     readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
3022     readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
3023     readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
3024     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
3025     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
3026     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
3027     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
3028     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
3029     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
3030     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
3031     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
3032     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
3033     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
3034     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
3035     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
3036     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
3037     readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
3038 }
3039
3040 interface WEBGL_compressed_texture_etc {
3041     readonly COMPRESSED_R11_EAC: GLenum;
3042     readonly COMPRESSED_RG11_EAC: GLenum;
3043     readonly COMPRESSED_RGB8_ETC2: GLenum;
3044     readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
3045     readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum;
3046     readonly COMPRESSED_SIGNED_R11_EAC: GLenum;
3047     readonly COMPRESSED_SIGNED_RG11_EAC: GLenum;
3048     readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum;
3049     readonly COMPRESSED_SRGB8_ETC2: GLenum;
3050     readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
3051 }
3052
3053 interface WEBGL_compressed_texture_etc1 {
3054     readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
3055 }
3056
3057 interface WEBGL_compressed_texture_pvrtc {
3058     readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum;
3059     readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum;
3060     readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum;
3061     readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum;
3062 }
3063
3064 /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
3065 interface WEBGL_compressed_texture_s3tc {
3066     readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
3067     readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
3068     readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
3069     readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
3070 }
3071
3072 interface WEBGL_compressed_texture_s3tc_srgb {
3073     readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
3074     readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
3075     readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
3076     readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
3077 }
3078
3079 /** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
3080 interface WEBGL_debug_renderer_info {
3081     readonly UNMASKED_RENDERER_WEBGL: GLenum;
3082     readonly UNMASKED_VENDOR_WEBGL: GLenum;
3083 }
3084
3085 interface WEBGL_debug_shaders {
3086     getTranslatedShaderSource(shader: WebGLShader): string;
3087 }
3088
3089 /** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
3090 interface WEBGL_depth_texture {
3091     readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
3092 }
3093
3094 interface WEBGL_draw_buffers {
3095     drawBuffersWEBGL(buffers: GLenum[]): void;
3096     readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
3097     readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
3098     readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
3099     readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
3100     readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
3101     readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
3102     readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
3103     readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
3104     readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
3105     readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
3106     readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
3107     readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
3108     readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
3109     readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
3110     readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
3111     readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
3112     readonly DRAW_BUFFER0_WEBGL: GLenum;
3113     readonly DRAW_BUFFER10_WEBGL: GLenum;
3114     readonly DRAW_BUFFER11_WEBGL: GLenum;
3115     readonly DRAW_BUFFER12_WEBGL: GLenum;
3116     readonly DRAW_BUFFER13_WEBGL: GLenum;
3117     readonly DRAW_BUFFER14_WEBGL: GLenum;
3118     readonly DRAW_BUFFER15_WEBGL: GLenum;
3119     readonly DRAW_BUFFER1_WEBGL: GLenum;
3120     readonly DRAW_BUFFER2_WEBGL: GLenum;
3121     readonly DRAW_BUFFER3_WEBGL: GLenum;
3122     readonly DRAW_BUFFER4_WEBGL: GLenum;
3123     readonly DRAW_BUFFER5_WEBGL: GLenum;
3124     readonly DRAW_BUFFER6_WEBGL: GLenum;
3125     readonly DRAW_BUFFER7_WEBGL: GLenum;
3126     readonly DRAW_BUFFER8_WEBGL: GLenum;
3127     readonly DRAW_BUFFER9_WEBGL: GLenum;
3128     readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
3129     readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
3130 }
3131
3132 interface WEBGL_lose_context {
3133     loseContext(): void;
3134     restoreContext(): void;
3135 }
3136
3137 interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
3138 }
3139
3140 declare var WebGL2RenderingContext: {
3141     prototype: WebGL2RenderingContext;
3142     new(): WebGL2RenderingContext;
3143     readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
3144     readonly ALREADY_SIGNALED: GLenum;
3145     readonly ANY_SAMPLES_PASSED: GLenum;
3146     readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
3147     readonly COLOR: GLenum;
3148     readonly COLOR_ATTACHMENT1: GLenum;
3149     readonly COLOR_ATTACHMENT10: GLenum;
3150     readonly COLOR_ATTACHMENT11: GLenum;
3151     readonly COLOR_ATTACHMENT12: GLenum;
3152     readonly COLOR_ATTACHMENT13: GLenum;
3153     readonly COLOR_ATTACHMENT14: GLenum;
3154     readonly COLOR_ATTACHMENT15: GLenum;
3155     readonly COLOR_ATTACHMENT2: GLenum;
3156     readonly COLOR_ATTACHMENT3: GLenum;
3157     readonly COLOR_ATTACHMENT4: GLenum;
3158     readonly COLOR_ATTACHMENT5: GLenum;
3159     readonly COLOR_ATTACHMENT6: GLenum;
3160     readonly COLOR_ATTACHMENT7: GLenum;
3161     readonly COLOR_ATTACHMENT8: GLenum;
3162     readonly COLOR_ATTACHMENT9: GLenum;
3163     readonly COMPARE_REF_TO_TEXTURE: GLenum;
3164     readonly CONDITION_SATISFIED: GLenum;
3165     readonly COPY_READ_BUFFER: GLenum;
3166     readonly COPY_READ_BUFFER_BINDING: GLenum;
3167     readonly COPY_WRITE_BUFFER: GLenum;
3168     readonly COPY_WRITE_BUFFER_BINDING: GLenum;
3169     readonly CURRENT_QUERY: GLenum;
3170     readonly DEPTH: GLenum;
3171     readonly DEPTH24_STENCIL8: GLenum;
3172     readonly DEPTH32F_STENCIL8: GLenum;
3173     readonly DEPTH_COMPONENT24: GLenum;
3174     readonly DEPTH_COMPONENT32F: GLenum;
3175     readonly DRAW_BUFFER0: GLenum;
3176     readonly DRAW_BUFFER1: GLenum;
3177     readonly DRAW_BUFFER10: GLenum;
3178     readonly DRAW_BUFFER11: GLenum;
3179     readonly DRAW_BUFFER12: GLenum;
3180     readonly DRAW_BUFFER13: GLenum;
3181     readonly DRAW_BUFFER14: GLenum;
3182     readonly DRAW_BUFFER15: GLenum;
3183     readonly DRAW_BUFFER2: GLenum;
3184     readonly DRAW_BUFFER3: GLenum;
3185     readonly DRAW_BUFFER4: GLenum;
3186     readonly DRAW_BUFFER5: GLenum;
3187     readonly DRAW_BUFFER6: GLenum;
3188     readonly DRAW_BUFFER7: GLenum;
3189     readonly DRAW_BUFFER8: GLenum;
3190     readonly DRAW_BUFFER9: GLenum;
3191     readonly DRAW_FRAMEBUFFER: GLenum;
3192     readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
3193     readonly DYNAMIC_COPY: GLenum;
3194     readonly DYNAMIC_READ: GLenum;
3195     readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
3196     readonly FLOAT_MAT2x3: GLenum;
3197     readonly FLOAT_MAT2x4: GLenum;
3198     readonly FLOAT_MAT3x2: GLenum;
3199     readonly FLOAT_MAT3x4: GLenum;
3200     readonly FLOAT_MAT4x2: GLenum;
3201     readonly FLOAT_MAT4x3: GLenum;
3202     readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
3203     readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
3204     readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
3205     readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
3206     readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
3207     readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
3208     readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
3209     readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
3210     readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
3211     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
3212     readonly FRAMEBUFFER_DEFAULT: GLenum;
3213     readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
3214     readonly HALF_FLOAT: GLenum;
3215     readonly INTERLEAVED_ATTRIBS: GLenum;
3216     readonly INT_2_10_10_10_REV: GLenum;
3217     readonly INT_SAMPLER_2D: GLenum;
3218     readonly INT_SAMPLER_2D_ARRAY: GLenum;
3219     readonly INT_SAMPLER_3D: GLenum;
3220     readonly INT_SAMPLER_CUBE: GLenum;
3221     readonly INVALID_INDEX: GLenum;
3222     readonly MAX: GLenum;
3223     readonly MAX_3D_TEXTURE_SIZE: GLenum;
3224     readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
3225     readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
3226     readonly MAX_COLOR_ATTACHMENTS: GLenum;
3227     readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3228     readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
3229     readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
3230     readonly MAX_DRAW_BUFFERS: GLenum;
3231     readonly MAX_ELEMENTS_INDICES: GLenum;
3232     readonly MAX_ELEMENTS_VERTICES: GLenum;
3233     readonly MAX_ELEMENT_INDEX: GLenum;
3234     readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
3235     readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
3236     readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3237     readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
3238     readonly MAX_SAMPLES: GLenum;
3239     readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
3240     readonly MAX_TEXTURE_LOD_BIAS: GLenum;
3241     readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
3242     readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
3243     readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
3244     readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
3245     readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
3246     readonly MAX_VARYING_COMPONENTS: GLenum;
3247     readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
3248     readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
3249     readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
3250     readonly MIN: GLenum;
3251     readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
3252     readonly OBJECT_TYPE: GLenum;
3253     readonly PACK_ROW_LENGTH: GLenum;
3254     readonly PACK_SKIP_PIXELS: GLenum;
3255     readonly PACK_SKIP_ROWS: GLenum;
3256     readonly PIXEL_PACK_BUFFER: GLenum;
3257     readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
3258     readonly PIXEL_UNPACK_BUFFER: GLenum;
3259     readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
3260     readonly QUERY_RESULT: GLenum;
3261     readonly QUERY_RESULT_AVAILABLE: GLenum;
3262     readonly R11F_G11F_B10F: GLenum;
3263     readonly R16F: GLenum;
3264     readonly R16I: GLenum;
3265     readonly R16UI: GLenum;
3266     readonly R32F: GLenum;
3267     readonly R32I: GLenum;
3268     readonly R32UI: GLenum;
3269     readonly R8: GLenum;
3270     readonly R8I: GLenum;
3271     readonly R8UI: GLenum;
3272     readonly R8_SNORM: GLenum;
3273     readonly RASTERIZER_DISCARD: GLenum;
3274     readonly READ_BUFFER: GLenum;
3275     readonly READ_FRAMEBUFFER: GLenum;
3276     readonly READ_FRAMEBUFFER_BINDING: GLenum;
3277     readonly RED: GLenum;
3278     readonly RED_INTEGER: GLenum;
3279     readonly RENDERBUFFER_SAMPLES: GLenum;
3280     readonly RG: GLenum;
3281     readonly RG16F: GLenum;
3282     readonly RG16I: GLenum;
3283     readonly RG16UI: GLenum;
3284     readonly RG32F: GLenum;
3285     readonly RG32I: GLenum;
3286     readonly RG32UI: GLenum;
3287     readonly RG8: GLenum;
3288     readonly RG8I: GLenum;
3289     readonly RG8UI: GLenum;
3290     readonly RG8_SNORM: GLenum;
3291     readonly RGB10_A2: GLenum;
3292     readonly RGB10_A2UI: GLenum;
3293     readonly RGB16F: GLenum;
3294     readonly RGB16I: GLenum;
3295     readonly RGB16UI: GLenum;
3296     readonly RGB32F: GLenum;
3297     readonly RGB32I: GLenum;
3298     readonly RGB32UI: GLenum;
3299     readonly RGB8: GLenum;
3300     readonly RGB8I: GLenum;
3301     readonly RGB8UI: GLenum;
3302     readonly RGB8_SNORM: GLenum;
3303     readonly RGB9_E5: GLenum;
3304     readonly RGBA16F: GLenum;
3305     readonly RGBA16I: GLenum;
3306     readonly RGBA16UI: GLenum;
3307     readonly RGBA32F: GLenum;
3308     readonly RGBA32I: GLenum;
3309     readonly RGBA32UI: GLenum;
3310     readonly RGBA8: GLenum;
3311     readonly RGBA8I: GLenum;
3312     readonly RGBA8UI: GLenum;
3313     readonly RGBA8_SNORM: GLenum;
3314     readonly RGBA_INTEGER: GLenum;
3315     readonly RGB_INTEGER: GLenum;
3316     readonly RG_INTEGER: GLenum;
3317     readonly SAMPLER_2D_ARRAY: GLenum;
3318     readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
3319     readonly SAMPLER_2D_SHADOW: GLenum;
3320     readonly SAMPLER_3D: GLenum;
3321     readonly SAMPLER_BINDING: GLenum;
3322     readonly SAMPLER_CUBE_SHADOW: GLenum;
3323     readonly SEPARATE_ATTRIBS: GLenum;
3324     readonly SIGNALED: GLenum;
3325     readonly SIGNED_NORMALIZED: GLenum;
3326     readonly SRGB: GLenum;
3327     readonly SRGB8: GLenum;
3328     readonly SRGB8_ALPHA8: GLenum;
3329     readonly STATIC_COPY: GLenum;
3330     readonly STATIC_READ: GLenum;
3331     readonly STENCIL: GLenum;
3332     readonly STREAM_COPY: GLenum;
3333     readonly STREAM_READ: GLenum;
3334     readonly SYNC_CONDITION: GLenum;
3335     readonly SYNC_FENCE: GLenum;
3336     readonly SYNC_FLAGS: GLenum;
3337     readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
3338     readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
3339     readonly SYNC_STATUS: GLenum;
3340     readonly TEXTURE_2D_ARRAY: GLenum;
3341     readonly TEXTURE_3D: GLenum;
3342     readonly TEXTURE_BASE_LEVEL: GLenum;
3343     readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
3344     readonly TEXTURE_BINDING_3D: GLenum;
3345     readonly TEXTURE_COMPARE_FUNC: GLenum;
3346     readonly TEXTURE_COMPARE_MODE: GLenum;
3347     readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
3348     readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
3349     readonly TEXTURE_MAX_LEVEL: GLenum;
3350     readonly TEXTURE_MAX_LOD: GLenum;
3351     readonly TEXTURE_MIN_LOD: GLenum;
3352     readonly TEXTURE_WRAP_R: GLenum;
3353     readonly TIMEOUT_EXPIRED: GLenum;
3354     readonly TIMEOUT_IGNORED: GLint64;
3355     readonly TRANSFORM_FEEDBACK: GLenum;
3356     readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
3357     readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
3358     readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
3359     readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
3360     readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
3361     readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
3362     readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
3363     readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
3364     readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
3365     readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
3366     readonly UNIFORM_ARRAY_STRIDE: GLenum;
3367     readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
3368     readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
3369     readonly UNIFORM_BLOCK_BINDING: GLenum;
3370     readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
3371     readonly UNIFORM_BLOCK_INDEX: GLenum;
3372     readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
3373     readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
3374     readonly UNIFORM_BUFFER: GLenum;
3375     readonly UNIFORM_BUFFER_BINDING: GLenum;
3376     readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
3377     readonly UNIFORM_BUFFER_SIZE: GLenum;
3378     readonly UNIFORM_BUFFER_START: GLenum;
3379     readonly UNIFORM_IS_ROW_MAJOR: GLenum;
3380     readonly UNIFORM_MATRIX_STRIDE: GLenum;
3381     readonly UNIFORM_OFFSET: GLenum;
3382     readonly UNIFORM_SIZE: GLenum;
3383     readonly UNIFORM_TYPE: GLenum;
3384     readonly UNPACK_IMAGE_HEIGHT: GLenum;
3385     readonly UNPACK_ROW_LENGTH: GLenum;
3386     readonly UNPACK_SKIP_IMAGES: GLenum;
3387     readonly UNPACK_SKIP_PIXELS: GLenum;
3388     readonly UNPACK_SKIP_ROWS: GLenum;
3389     readonly UNSIGNALED: GLenum;
3390     readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
3391     readonly UNSIGNED_INT_24_8: GLenum;
3392     readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
3393     readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
3394     readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
3395     readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
3396     readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
3397     readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
3398     readonly UNSIGNED_INT_VEC2: GLenum;
3399     readonly UNSIGNED_INT_VEC3: GLenum;
3400     readonly UNSIGNED_INT_VEC4: GLenum;
3401     readonly UNSIGNED_NORMALIZED: GLenum;
3402     readonly VERTEX_ARRAY_BINDING: GLenum;
3403     readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
3404     readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
3405     readonly WAIT_FAILED: GLenum;
3406     readonly ACTIVE_ATTRIBUTES: GLenum;
3407     readonly ACTIVE_TEXTURE: GLenum;
3408     readonly ACTIVE_UNIFORMS: GLenum;
3409     readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
3410     readonly ALIASED_POINT_SIZE_RANGE: GLenum;
3411     readonly ALPHA: GLenum;
3412     readonly ALPHA_BITS: GLenum;
3413     readonly ALWAYS: GLenum;
3414     readonly ARRAY_BUFFER: GLenum;
3415     readonly ARRAY_BUFFER_BINDING: GLenum;
3416     readonly ATTACHED_SHADERS: GLenum;
3417     readonly BACK: GLenum;
3418     readonly BLEND: GLenum;
3419     readonly BLEND_COLOR: GLenum;
3420     readonly BLEND_DST_ALPHA: GLenum;
3421     readonly BLEND_DST_RGB: GLenum;
3422     readonly BLEND_EQUATION: GLenum;
3423     readonly BLEND_EQUATION_ALPHA: GLenum;
3424     readonly BLEND_EQUATION_RGB: GLenum;
3425     readonly BLEND_SRC_ALPHA: GLenum;
3426     readonly BLEND_SRC_RGB: GLenum;
3427     readonly BLUE_BITS: GLenum;
3428     readonly BOOL: GLenum;
3429     readonly BOOL_VEC2: GLenum;
3430     readonly BOOL_VEC3: GLenum;
3431     readonly BOOL_VEC4: GLenum;
3432     readonly BROWSER_DEFAULT_WEBGL: GLenum;
3433     readonly BUFFER_SIZE: GLenum;
3434     readonly BUFFER_USAGE: GLenum;
3435     readonly BYTE: GLenum;
3436     readonly CCW: GLenum;
3437     readonly CLAMP_TO_EDGE: GLenum;
3438     readonly COLOR_ATTACHMENT0: GLenum;
3439     readonly COLOR_BUFFER_BIT: GLenum;
3440     readonly COLOR_CLEAR_VALUE: GLenum;
3441     readonly COLOR_WRITEMASK: GLenum;
3442     readonly COMPILE_STATUS: GLenum;
3443     readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
3444     readonly CONSTANT_ALPHA: GLenum;
3445     readonly CONSTANT_COLOR: GLenum;
3446     readonly CONTEXT_LOST_WEBGL: GLenum;
3447     readonly CULL_FACE: GLenum;
3448     readonly CULL_FACE_MODE: GLenum;
3449     readonly CURRENT_PROGRAM: GLenum;
3450     readonly CURRENT_VERTEX_ATTRIB: GLenum;
3451     readonly CW: GLenum;
3452     readonly DECR: GLenum;
3453     readonly DECR_WRAP: GLenum;
3454     readonly DELETE_STATUS: GLenum;
3455     readonly DEPTH_ATTACHMENT: GLenum;
3456     readonly DEPTH_BITS: GLenum;
3457     readonly DEPTH_BUFFER_BIT: GLenum;
3458     readonly DEPTH_CLEAR_VALUE: GLenum;
3459     readonly DEPTH_COMPONENT: GLenum;
3460     readonly DEPTH_COMPONENT16: GLenum;
3461     readonly DEPTH_FUNC: GLenum;
3462     readonly DEPTH_RANGE: GLenum;
3463     readonly DEPTH_STENCIL: GLenum;
3464     readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
3465     readonly DEPTH_TEST: GLenum;
3466     readonly DEPTH_WRITEMASK: GLenum;
3467     readonly DITHER: GLenum;
3468     readonly DONT_CARE: GLenum;
3469     readonly DST_ALPHA: GLenum;
3470     readonly DST_COLOR: GLenum;
3471     readonly DYNAMIC_DRAW: GLenum;
3472     readonly ELEMENT_ARRAY_BUFFER: GLenum;
3473     readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
3474     readonly EQUAL: GLenum;
3475     readonly FASTEST: GLenum;
3476     readonly FLOAT: GLenum;
3477     readonly FLOAT_MAT2: GLenum;
3478     readonly FLOAT_MAT3: GLenum;
3479     readonly FLOAT_MAT4: GLenum;
3480     readonly FLOAT_VEC2: GLenum;
3481     readonly FLOAT_VEC3: GLenum;
3482     readonly FLOAT_VEC4: GLenum;
3483     readonly FRAGMENT_SHADER: GLenum;
3484     readonly FRAMEBUFFER: GLenum;
3485     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
3486     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
3487     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
3488     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
3489     readonly FRAMEBUFFER_BINDING: GLenum;
3490     readonly FRAMEBUFFER_COMPLETE: GLenum;
3491     readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
3492     readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
3493     readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
3494     readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
3495     readonly FRONT: GLenum;
3496     readonly FRONT_AND_BACK: GLenum;
3497     readonly FRONT_FACE: GLenum;
3498     readonly FUNC_ADD: GLenum;
3499     readonly FUNC_REVERSE_SUBTRACT: GLenum;
3500     readonly FUNC_SUBTRACT: GLenum;
3501     readonly GENERATE_MIPMAP_HINT: GLenum;
3502     readonly GEQUAL: GLenum;
3503     readonly GREATER: GLenum;
3504     readonly GREEN_BITS: GLenum;
3505     readonly HIGH_FLOAT: GLenum;
3506     readonly HIGH_INT: GLenum;
3507     readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
3508     readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
3509     readonly INCR: GLenum;
3510     readonly INCR_WRAP: GLenum;
3511     readonly INT: GLenum;
3512     readonly INT_VEC2: GLenum;
3513     readonly INT_VEC3: GLenum;
3514     readonly INT_VEC4: GLenum;
3515     readonly INVALID_ENUM: GLenum;
3516     readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
3517     readonly INVALID_OPERATION: GLenum;
3518     readonly INVALID_VALUE: GLenum;
3519     readonly INVERT: GLenum;
3520     readonly KEEP: GLenum;
3521     readonly LEQUAL: GLenum;
3522     readonly LESS: GLenum;
3523     readonly LINEAR: GLenum;
3524     readonly LINEAR_MIPMAP_LINEAR: GLenum;
3525     readonly LINEAR_MIPMAP_NEAREST: GLenum;
3526     readonly LINES: GLenum;
3527     readonly LINE_LOOP: GLenum;
3528     readonly LINE_STRIP: GLenum;
3529     readonly LINE_WIDTH: GLenum;
3530     readonly LINK_STATUS: GLenum;
3531     readonly LOW_FLOAT: GLenum;
3532     readonly LOW_INT: GLenum;
3533     readonly LUMINANCE: GLenum;
3534     readonly LUMINANCE_ALPHA: GLenum;
3535     readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
3536     readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
3537     readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
3538     readonly MAX_RENDERBUFFER_SIZE: GLenum;
3539     readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
3540     readonly MAX_TEXTURE_SIZE: GLenum;
3541     readonly MAX_VARYING_VECTORS: GLenum;
3542     readonly MAX_VERTEX_ATTRIBS: GLenum;
3543     readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
3544     readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
3545     readonly MAX_VIEWPORT_DIMS: GLenum;
3546     readonly MEDIUM_FLOAT: GLenum;
3547     readonly MEDIUM_INT: GLenum;
3548     readonly MIRRORED_REPEAT: GLenum;
3549     readonly NEAREST: GLenum;
3550     readonly NEAREST_MIPMAP_LINEAR: GLenum;
3551     readonly NEAREST_MIPMAP_NEAREST: GLenum;
3552     readonly NEVER: GLenum;
3553     readonly NICEST: GLenum;
3554     readonly NONE: GLenum;
3555     readonly NOTEQUAL: GLenum;
3556     readonly NO_ERROR: GLenum;
3557     readonly ONE: GLenum;
3558     readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
3559     readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
3560     readonly ONE_MINUS_DST_ALPHA: GLenum;
3561     readonly ONE_MINUS_DST_COLOR: GLenum;
3562     readonly ONE_MINUS_SRC_ALPHA: GLenum;
3563     readonly ONE_MINUS_SRC_COLOR: GLenum;
3564     readonly OUT_OF_MEMORY: GLenum;
3565     readonly PACK_ALIGNMENT: GLenum;
3566     readonly POINTS: GLenum;
3567     readonly POLYGON_OFFSET_FACTOR: GLenum;
3568     readonly POLYGON_OFFSET_FILL: GLenum;
3569     readonly POLYGON_OFFSET_UNITS: GLenum;
3570     readonly RED_BITS: GLenum;
3571     readonly RENDERBUFFER: GLenum;
3572     readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
3573     readonly RENDERBUFFER_BINDING: GLenum;
3574     readonly RENDERBUFFER_BLUE_SIZE: GLenum;
3575     readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
3576     readonly RENDERBUFFER_GREEN_SIZE: GLenum;
3577     readonly RENDERBUFFER_HEIGHT: GLenum;
3578     readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
3579     readonly RENDERBUFFER_RED_SIZE: GLenum;
3580     readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
3581     readonly RENDERBUFFER_WIDTH: GLenum;
3582     readonly RENDERER: GLenum;
3583     readonly REPEAT: GLenum;
3584     readonly REPLACE: GLenum;
3585     readonly RGB: GLenum;
3586     readonly RGB565: GLenum;
3587     readonly RGB5_A1: GLenum;
3588     readonly RGBA: GLenum;
3589     readonly RGBA4: GLenum;
3590     readonly SAMPLER_2D: GLenum;
3591     readonly SAMPLER_CUBE: GLenum;
3592     readonly SAMPLES: GLenum;
3593     readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
3594     readonly SAMPLE_BUFFERS: GLenum;
3595     readonly SAMPLE_COVERAGE: GLenum;
3596     readonly SAMPLE_COVERAGE_INVERT: GLenum;
3597     readonly SAMPLE_COVERAGE_VALUE: GLenum;
3598     readonly SCISSOR_BOX: GLenum;
3599     readonly SCISSOR_TEST: GLenum;
3600     readonly SHADER_TYPE: GLenum;
3601     readonly SHADING_LANGUAGE_VERSION: GLenum;
3602     readonly SHORT: GLenum;
3603     readonly SRC_ALPHA: GLenum;
3604     readonly SRC_ALPHA_SATURATE: GLenum;
3605     readonly SRC_COLOR: GLenum;
3606     readonly STATIC_DRAW: GLenum;
3607     readonly STENCIL_ATTACHMENT: GLenum;
3608     readonly STENCIL_BACK_FAIL: GLenum;
3609     readonly STENCIL_BACK_FUNC: GLenum;
3610     readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
3611     readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
3612     readonly STENCIL_BACK_REF: GLenum;
3613     readonly STENCIL_BACK_VALUE_MASK: GLenum;
3614     readonly STENCIL_BACK_WRITEMASK: GLenum;
3615     readonly STENCIL_BITS: GLenum;
3616     readonly STENCIL_BUFFER_BIT: GLenum;
3617     readonly STENCIL_CLEAR_VALUE: GLenum;
3618     readonly STENCIL_FAIL: GLenum;
3619     readonly STENCIL_FUNC: GLenum;
3620     readonly STENCIL_INDEX8: GLenum;
3621     readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
3622     readonly STENCIL_PASS_DEPTH_PASS: GLenum;
3623     readonly STENCIL_REF: GLenum;
3624     readonly STENCIL_TEST: GLenum;
3625     readonly STENCIL_VALUE_MASK: GLenum;
3626     readonly STENCIL_WRITEMASK: GLenum;
3627     readonly STREAM_DRAW: GLenum;
3628     readonly SUBPIXEL_BITS: GLenum;
3629     readonly TEXTURE: GLenum;
3630     readonly TEXTURE0: GLenum;
3631     readonly TEXTURE1: GLenum;
3632     readonly TEXTURE10: GLenum;
3633     readonly TEXTURE11: GLenum;
3634     readonly TEXTURE12: GLenum;
3635     readonly TEXTURE13: GLenum;
3636     readonly TEXTURE14: GLenum;
3637     readonly TEXTURE15: GLenum;
3638     readonly TEXTURE16: GLenum;
3639     readonly TEXTURE17: GLenum;
3640     readonly TEXTURE18: GLenum;
3641     readonly TEXTURE19: GLenum;
3642     readonly TEXTURE2: GLenum;
3643     readonly TEXTURE20: GLenum;
3644     readonly TEXTURE21: GLenum;
3645     readonly TEXTURE22: GLenum;
3646     readonly TEXTURE23: GLenum;
3647     readonly TEXTURE24: GLenum;
3648     readonly TEXTURE25: GLenum;
3649     readonly TEXTURE26: GLenum;
3650     readonly TEXTURE27: GLenum;
3651     readonly TEXTURE28: GLenum;
3652     readonly TEXTURE29: GLenum;
3653     readonly TEXTURE3: GLenum;
3654     readonly TEXTURE30: GLenum;
3655     readonly TEXTURE31: GLenum;
3656     readonly TEXTURE4: GLenum;
3657     readonly TEXTURE5: GLenum;
3658     readonly TEXTURE6: GLenum;
3659     readonly TEXTURE7: GLenum;
3660     readonly TEXTURE8: GLenum;
3661     readonly TEXTURE9: GLenum;
3662     readonly TEXTURE_2D: GLenum;
3663     readonly TEXTURE_BINDING_2D: GLenum;
3664     readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
3665     readonly TEXTURE_CUBE_MAP: GLenum;
3666     readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
3667     readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
3668     readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
3669     readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
3670     readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
3671     readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
3672     readonly TEXTURE_MAG_FILTER: GLenum;
3673     readonly TEXTURE_MIN_FILTER: GLenum;
3674     readonly TEXTURE_WRAP_S: GLenum;
3675     readonly TEXTURE_WRAP_T: GLenum;
3676     readonly TRIANGLES: GLenum;
3677     readonly TRIANGLE_FAN: GLenum;
3678     readonly TRIANGLE_STRIP: GLenum;
3679     readonly UNPACK_ALIGNMENT: GLenum;
3680     readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
3681     readonly UNPACK_FLIP_Y_WEBGL: GLenum;
3682     readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
3683     readonly UNSIGNED_BYTE: GLenum;
3684     readonly UNSIGNED_INT: GLenum;
3685     readonly UNSIGNED_SHORT: GLenum;
3686     readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
3687     readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
3688     readonly UNSIGNED_SHORT_5_6_5: GLenum;
3689     readonly VALIDATE_STATUS: GLenum;
3690     readonly VENDOR: GLenum;
3691     readonly VERSION: GLenum;
3692     readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
3693     readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
3694     readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
3695     readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
3696     readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
3697     readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
3698     readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
3699     readonly VERTEX_SHADER: GLenum;
3700     readonly VIEWPORT: GLenum;
3701     readonly ZERO: GLenum;
3702 };
3703
3704 interface WebGL2RenderingContextBase {
3705     beginQuery(target: GLenum, query: WebGLQuery): void;
3706     beginTransformFeedback(primitiveMode: GLenum): void;
3707     bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
3708     bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
3709     bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
3710     bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
3711     bindVertexArray(array: WebGLVertexArrayObject | null): void;
3712     blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
3713     clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
3714     clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
3715     clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
3716     clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
3717     clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
3718     compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
3719     compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
3720     compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
3721     compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
3722     copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
3723     copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
3724     createQuery(): WebGLQuery | null;
3725     createSampler(): WebGLSampler | null;
3726     createTransformFeedback(): WebGLTransformFeedback | null;
3727     createVertexArray(): WebGLVertexArrayObject | null;
3728     deleteQuery(query: WebGLQuery | null): void;
3729     deleteSampler(sampler: WebGLSampler | null): void;
3730     deleteSync(sync: WebGLSync | null): void;
3731     deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
3732     deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
3733     drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
3734     drawBuffers(buffers: GLenum[]): void;
3735     drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
3736     drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
3737     endQuery(target: GLenum): void;
3738     endTransformFeedback(): void;
3739     fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
3740     framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
3741     getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
3742     getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
3743     getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
3744     getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
3745     getFragDataLocation(program: WebGLProgram, name: string): GLint;
3746     getIndexedParameter(target: GLenum, index: GLuint): any;
3747     getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
3748     getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
3749     getQueryParameter(query: WebGLQuery, pname: GLenum): any;
3750     getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
3751     getSyncParameter(sync: WebGLSync, pname: GLenum): any;
3752     getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
3753     getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
3754     getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
3755     invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
3756     invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
3757     isQuery(query: WebGLQuery | null): GLboolean;
3758     isSampler(sampler: WebGLSampler | null): GLboolean;
3759     isSync(sync: WebGLSync | null): GLboolean;
3760     isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
3761     isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
3762     pauseTransformFeedback(): void;
3763     readBuffer(src: GLenum): void;
3764     renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
3765     resumeTransformFeedback(): void;
3766     samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
3767     samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
3768     texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
3769     texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
3770     texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
3771     texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
3772     texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
3773     texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
3774     texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
3775     texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
3776     texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
3777     transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
3778     uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
3779     uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3780     uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
3781     uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3782     uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
3783     uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3784     uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
3785     uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3786     uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
3787     uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3788     uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3789     uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3790     uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3791     uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3792     uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3793     vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
3794     vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
3795     vertexAttribI4iv(index: GLuint, values: Int32List): void;
3796     vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
3797     vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
3798     vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
3799     waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
3800     readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
3801     readonly ALREADY_SIGNALED: GLenum;
3802     readonly ANY_SAMPLES_PASSED: GLenum;
3803     readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
3804     readonly COLOR: GLenum;
3805     readonly COLOR_ATTACHMENT1: GLenum;
3806     readonly COLOR_ATTACHMENT10: GLenum;
3807     readonly COLOR_ATTACHMENT11: GLenum;
3808     readonly COLOR_ATTACHMENT12: GLenum;
3809     readonly COLOR_ATTACHMENT13: GLenum;
3810     readonly COLOR_ATTACHMENT14: GLenum;
3811     readonly COLOR_ATTACHMENT15: GLenum;
3812     readonly COLOR_ATTACHMENT2: GLenum;
3813     readonly COLOR_ATTACHMENT3: GLenum;
3814     readonly COLOR_ATTACHMENT4: GLenum;
3815     readonly COLOR_ATTACHMENT5: GLenum;
3816     readonly COLOR_ATTACHMENT6: GLenum;
3817     readonly COLOR_ATTACHMENT7: GLenum;
3818     readonly COLOR_ATTACHMENT8: GLenum;
3819     readonly COLOR_ATTACHMENT9: GLenum;
3820     readonly COMPARE_REF_TO_TEXTURE: GLenum;
3821     readonly CONDITION_SATISFIED: GLenum;
3822     readonly COPY_READ_BUFFER: GLenum;
3823     readonly COPY_READ_BUFFER_BINDING: GLenum;
3824     readonly COPY_WRITE_BUFFER: GLenum;
3825     readonly COPY_WRITE_BUFFER_BINDING: GLenum;
3826     readonly CURRENT_QUERY: GLenum;
3827     readonly DEPTH: GLenum;
3828     readonly DEPTH24_STENCIL8: GLenum;
3829     readonly DEPTH32F_STENCIL8: GLenum;
3830     readonly DEPTH_COMPONENT24: GLenum;
3831     readonly DEPTH_COMPONENT32F: GLenum;
3832     readonly DRAW_BUFFER0: GLenum;
3833     readonly DRAW_BUFFER1: GLenum;
3834     readonly DRAW_BUFFER10: GLenum;
3835     readonly DRAW_BUFFER11: GLenum;
3836     readonly DRAW_BUFFER12: GLenum;
3837     readonly DRAW_BUFFER13: GLenum;
3838     readonly DRAW_BUFFER14: GLenum;
3839     readonly DRAW_BUFFER15: GLenum;
3840     readonly DRAW_BUFFER2: GLenum;
3841     readonly DRAW_BUFFER3: GLenum;
3842     readonly DRAW_BUFFER4: GLenum;
3843     readonly DRAW_BUFFER5: GLenum;
3844     readonly DRAW_BUFFER6: GLenum;
3845     readonly DRAW_BUFFER7: GLenum;
3846     readonly DRAW_BUFFER8: GLenum;
3847     readonly DRAW_BUFFER9: GLenum;
3848     readonly DRAW_FRAMEBUFFER: GLenum;
3849     readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
3850     readonly DYNAMIC_COPY: GLenum;
3851     readonly DYNAMIC_READ: GLenum;
3852     readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
3853     readonly FLOAT_MAT2x3: GLenum;
3854     readonly FLOAT_MAT2x4: GLenum;
3855     readonly FLOAT_MAT3x2: GLenum;
3856     readonly FLOAT_MAT3x4: GLenum;
3857     readonly FLOAT_MAT4x2: GLenum;
3858     readonly FLOAT_MAT4x3: GLenum;
3859     readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
3860     readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
3861     readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
3862     readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
3863     readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
3864     readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
3865     readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
3866     readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
3867     readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
3868     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
3869     readonly FRAMEBUFFER_DEFAULT: GLenum;
3870     readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
3871     readonly HALF_FLOAT: GLenum;
3872     readonly INTERLEAVED_ATTRIBS: GLenum;
3873     readonly INT_2_10_10_10_REV: GLenum;
3874     readonly INT_SAMPLER_2D: GLenum;
3875     readonly INT_SAMPLER_2D_ARRAY: GLenum;
3876     readonly INT_SAMPLER_3D: GLenum;
3877     readonly INT_SAMPLER_CUBE: GLenum;
3878     readonly INVALID_INDEX: GLenum;
3879     readonly MAX: GLenum;
3880     readonly MAX_3D_TEXTURE_SIZE: GLenum;
3881     readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
3882     readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
3883     readonly MAX_COLOR_ATTACHMENTS: GLenum;
3884     readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3885     readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
3886     readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
3887     readonly MAX_DRAW_BUFFERS: GLenum;
3888     readonly MAX_ELEMENTS_INDICES: GLenum;
3889     readonly MAX_ELEMENTS_VERTICES: GLenum;
3890     readonly MAX_ELEMENT_INDEX: GLenum;
3891     readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
3892     readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
3893     readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3894     readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
3895     readonly MAX_SAMPLES: GLenum;
3896     readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
3897     readonly MAX_TEXTURE_LOD_BIAS: GLenum;
3898     readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
3899     readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
3900     readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
3901     readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
3902     readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
3903     readonly MAX_VARYING_COMPONENTS: GLenum;
3904     readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
3905     readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
3906     readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
3907     readonly MIN: GLenum;
3908     readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
3909     readonly OBJECT_TYPE: GLenum;
3910     readonly PACK_ROW_LENGTH: GLenum;
3911     readonly PACK_SKIP_PIXELS: GLenum;
3912     readonly PACK_SKIP_ROWS: GLenum;
3913     readonly PIXEL_PACK_BUFFER: GLenum;
3914     readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
3915     readonly PIXEL_UNPACK_BUFFER: GLenum;
3916     readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
3917     readonly QUERY_RESULT: GLenum;
3918     readonly QUERY_RESULT_AVAILABLE: GLenum;
3919     readonly R11F_G11F_B10F: GLenum;
3920     readonly R16F: GLenum;
3921     readonly R16I: GLenum;
3922     readonly R16UI: GLenum;
3923     readonly R32F: GLenum;
3924     readonly R32I: GLenum;
3925     readonly R32UI: GLenum;
3926     readonly R8: GLenum;
3927     readonly R8I: GLenum;
3928     readonly R8UI: GLenum;
3929     readonly R8_SNORM: GLenum;
3930     readonly RASTERIZER_DISCARD: GLenum;
3931     readonly READ_BUFFER: GLenum;
3932     readonly READ_FRAMEBUFFER: GLenum;
3933     readonly READ_FRAMEBUFFER_BINDING: GLenum;
3934     readonly RED: GLenum;
3935     readonly RED_INTEGER: GLenum;
3936     readonly RENDERBUFFER_SAMPLES: GLenum;
3937     readonly RG: GLenum;
3938     readonly RG16F: GLenum;
3939     readonly RG16I: GLenum;
3940     readonly RG16UI: GLenum;
3941     readonly RG32F: GLenum;
3942     readonly RG32I: GLenum;
3943     readonly RG32UI: GLenum;
3944     readonly RG8: GLenum;
3945     readonly RG8I: GLenum;
3946     readonly RG8UI: GLenum;
3947     readonly RG8_SNORM: GLenum;
3948     readonly RGB10_A2: GLenum;
3949     readonly RGB10_A2UI: GLenum;
3950     readonly RGB16F: GLenum;
3951     readonly RGB16I: GLenum;
3952     readonly RGB16UI: GLenum;
3953     readonly RGB32F: GLenum;
3954     readonly RGB32I: GLenum;
3955     readonly RGB32UI: GLenum;
3956     readonly RGB8: GLenum;
3957     readonly RGB8I: GLenum;
3958     readonly RGB8UI: GLenum;
3959     readonly RGB8_SNORM: GLenum;
3960     readonly RGB9_E5: GLenum;
3961     readonly RGBA16F: GLenum;
3962     readonly RGBA16I: GLenum;
3963     readonly RGBA16UI: GLenum;
3964     readonly RGBA32F: GLenum;
3965     readonly RGBA32I: GLenum;
3966     readonly RGBA32UI: GLenum;
3967     readonly RGBA8: GLenum;
3968     readonly RGBA8I: GLenum;
3969     readonly RGBA8UI: GLenum;
3970     readonly RGBA8_SNORM: GLenum;
3971     readonly RGBA_INTEGER: GLenum;
3972     readonly RGB_INTEGER: GLenum;
3973     readonly RG_INTEGER: GLenum;
3974     readonly SAMPLER_2D_ARRAY: GLenum;
3975     readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
3976     readonly SAMPLER_2D_SHADOW: GLenum;
3977     readonly SAMPLER_3D: GLenum;
3978     readonly SAMPLER_BINDING: GLenum;
3979     readonly SAMPLER_CUBE_SHADOW: GLenum;
3980     readonly SEPARATE_ATTRIBS: GLenum;
3981     readonly SIGNALED: GLenum;
3982     readonly SIGNED_NORMALIZED: GLenum;
3983     readonly SRGB: GLenum;
3984     readonly SRGB8: GLenum;
3985     readonly SRGB8_ALPHA8: GLenum;
3986     readonly STATIC_COPY: GLenum;
3987     readonly STATIC_READ: GLenum;
3988     readonly STENCIL: GLenum;
3989     readonly STREAM_COPY: GLenum;
3990     readonly STREAM_READ: GLenum;
3991     readonly SYNC_CONDITION: GLenum;
3992     readonly SYNC_FENCE: GLenum;
3993     readonly SYNC_FLAGS: GLenum;
3994     readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
3995     readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
3996     readonly SYNC_STATUS: GLenum;
3997     readonly TEXTURE_2D_ARRAY: GLenum;
3998     readonly TEXTURE_3D: GLenum;
3999     readonly TEXTURE_BASE_LEVEL: GLenum;
4000     readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
4001     readonly TEXTURE_BINDING_3D: GLenum;
4002     readonly TEXTURE_COMPARE_FUNC: GLenum;
4003     readonly TEXTURE_COMPARE_MODE: GLenum;
4004     readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
4005     readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
4006     readonly TEXTURE_MAX_LEVEL: GLenum;
4007     readonly TEXTURE_MAX_LOD: GLenum;
4008     readonly TEXTURE_MIN_LOD: GLenum;
4009     readonly TEXTURE_WRAP_R: GLenum;
4010     readonly TIMEOUT_EXPIRED: GLenum;
4011     readonly TIMEOUT_IGNORED: GLint64;
4012     readonly TRANSFORM_FEEDBACK: GLenum;
4013     readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
4014     readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
4015     readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
4016     readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
4017     readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
4018     readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
4019     readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
4020     readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
4021     readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
4022     readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
4023     readonly UNIFORM_ARRAY_STRIDE: GLenum;
4024     readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
4025     readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
4026     readonly UNIFORM_BLOCK_BINDING: GLenum;
4027     readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
4028     readonly UNIFORM_BLOCK_INDEX: GLenum;
4029     readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
4030     readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
4031     readonly UNIFORM_BUFFER: GLenum;
4032     readonly UNIFORM_BUFFER_BINDING: GLenum;
4033     readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
4034     readonly UNIFORM_BUFFER_SIZE: GLenum;
4035     readonly UNIFORM_BUFFER_START: GLenum;
4036     readonly UNIFORM_IS_ROW_MAJOR: GLenum;
4037     readonly UNIFORM_MATRIX_STRIDE: GLenum;
4038     readonly UNIFORM_OFFSET: GLenum;
4039     readonly UNIFORM_SIZE: GLenum;
4040     readonly UNIFORM_TYPE: GLenum;
4041     readonly UNPACK_IMAGE_HEIGHT: GLenum;
4042     readonly UNPACK_ROW_LENGTH: GLenum;
4043     readonly UNPACK_SKIP_IMAGES: GLenum;
4044     readonly UNPACK_SKIP_PIXELS: GLenum;
4045     readonly UNPACK_SKIP_ROWS: GLenum;
4046     readonly UNSIGNALED: GLenum;
4047     readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
4048     readonly UNSIGNED_INT_24_8: GLenum;
4049     readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
4050     readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
4051     readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
4052     readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
4053     readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
4054     readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
4055     readonly UNSIGNED_INT_VEC2: GLenum;
4056     readonly UNSIGNED_INT_VEC3: GLenum;
4057     readonly UNSIGNED_INT_VEC4: GLenum;
4058     readonly UNSIGNED_NORMALIZED: GLenum;
4059     readonly VERTEX_ARRAY_BINDING: GLenum;
4060     readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
4061     readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
4062     readonly WAIT_FAILED: GLenum;
4063 }
4064
4065 interface WebGL2RenderingContextOverloads {
4066     bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
4067     bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
4068     bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
4069     bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
4070     bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
4071     compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4072     compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4073     compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4074     compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4075     readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
4076     readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
4077     readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
4078     texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4079     texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4080     texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4081     texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4082     texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4083     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4084     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4085     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4086     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4087     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4088     uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4089     uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4090     uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4091     uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4092     uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4093     uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4094     uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4095     uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4096     uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4097     uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4098     uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4099 }
4100
4101 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
4102 interface WebGLActiveInfo {
4103     readonly name: string;
4104     readonly size: GLint;
4105     readonly type: GLenum;
4106 }
4107
4108 declare var WebGLActiveInfo: {
4109     prototype: WebGLActiveInfo;
4110     new(): WebGLActiveInfo;
4111 };
4112
4113 /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
4114 interface WebGLBuffer {
4115 }
4116
4117 declare var WebGLBuffer: {
4118     prototype: WebGLBuffer;
4119     new(): WebGLBuffer;
4120 };
4121
4122 /** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
4123 interface WebGLContextEvent extends Event {
4124     readonly statusMessage: string;
4125 }
4126
4127 declare var WebGLContextEvent: {
4128     prototype: WebGLContextEvent;
4129     new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
4130 };
4131
4132 /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
4133 interface WebGLFramebuffer {
4134 }
4135
4136 declare var WebGLFramebuffer: {
4137     prototype: WebGLFramebuffer;
4138     new(): WebGLFramebuffer;
4139 };
4140
4141 /** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
4142 interface WebGLProgram {
4143 }
4144
4145 declare var WebGLProgram: {
4146     prototype: WebGLProgram;
4147     new(): WebGLProgram;
4148 };
4149
4150 interface WebGLQuery {
4151 }
4152
4153 declare var WebGLQuery: {
4154     prototype: WebGLQuery;
4155     new(): WebGLQuery;
4156 };
4157
4158 /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
4159 interface WebGLRenderbuffer {
4160 }
4161
4162 declare var WebGLRenderbuffer: {
4163     prototype: WebGLRenderbuffer;
4164     new(): WebGLRenderbuffer;
4165 };
4166
4167 /** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
4168 interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
4169 }
4170
4171 declare var WebGLRenderingContext: {
4172     prototype: WebGLRenderingContext;
4173     new(): WebGLRenderingContext;
4174     readonly ACTIVE_ATTRIBUTES: GLenum;
4175     readonly ACTIVE_TEXTURE: GLenum;
4176     readonly ACTIVE_UNIFORMS: GLenum;
4177     readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4178     readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4179     readonly ALPHA: GLenum;
4180     readonly ALPHA_BITS: GLenum;
4181     readonly ALWAYS: GLenum;
4182     readonly ARRAY_BUFFER: GLenum;
4183     readonly ARRAY_BUFFER_BINDING: GLenum;
4184     readonly ATTACHED_SHADERS: GLenum;
4185     readonly BACK: GLenum;
4186     readonly BLEND: GLenum;
4187     readonly BLEND_COLOR: GLenum;
4188     readonly BLEND_DST_ALPHA: GLenum;
4189     readonly BLEND_DST_RGB: GLenum;
4190     readonly BLEND_EQUATION: GLenum;
4191     readonly BLEND_EQUATION_ALPHA: GLenum;
4192     readonly BLEND_EQUATION_RGB: GLenum;
4193     readonly BLEND_SRC_ALPHA: GLenum;
4194     readonly BLEND_SRC_RGB: GLenum;
4195     readonly BLUE_BITS: GLenum;
4196     readonly BOOL: GLenum;
4197     readonly BOOL_VEC2: GLenum;
4198     readonly BOOL_VEC3: GLenum;
4199     readonly BOOL_VEC4: GLenum;
4200     readonly BROWSER_DEFAULT_WEBGL: GLenum;
4201     readonly BUFFER_SIZE: GLenum;
4202     readonly BUFFER_USAGE: GLenum;
4203     readonly BYTE: GLenum;
4204     readonly CCW: GLenum;
4205     readonly CLAMP_TO_EDGE: GLenum;
4206     readonly COLOR_ATTACHMENT0: GLenum;
4207     readonly COLOR_BUFFER_BIT: GLenum;
4208     readonly COLOR_CLEAR_VALUE: GLenum;
4209     readonly COLOR_WRITEMASK: GLenum;
4210     readonly COMPILE_STATUS: GLenum;
4211     readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4212     readonly CONSTANT_ALPHA: GLenum;
4213     readonly CONSTANT_COLOR: GLenum;
4214     readonly CONTEXT_LOST_WEBGL: GLenum;
4215     readonly CULL_FACE: GLenum;
4216     readonly CULL_FACE_MODE: GLenum;
4217     readonly CURRENT_PROGRAM: GLenum;
4218     readonly CURRENT_VERTEX_ATTRIB: GLenum;
4219     readonly CW: GLenum;
4220     readonly DECR: GLenum;
4221     readonly DECR_WRAP: GLenum;
4222     readonly DELETE_STATUS: GLenum;
4223     readonly DEPTH_ATTACHMENT: GLenum;
4224     readonly DEPTH_BITS: GLenum;
4225     readonly DEPTH_BUFFER_BIT: GLenum;
4226     readonly DEPTH_CLEAR_VALUE: GLenum;
4227     readonly DEPTH_COMPONENT: GLenum;
4228     readonly DEPTH_COMPONENT16: GLenum;
4229     readonly DEPTH_FUNC: GLenum;
4230     readonly DEPTH_RANGE: GLenum;
4231     readonly DEPTH_STENCIL: GLenum;
4232     readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4233     readonly DEPTH_TEST: GLenum;
4234     readonly DEPTH_WRITEMASK: GLenum;
4235     readonly DITHER: GLenum;
4236     readonly DONT_CARE: GLenum;
4237     readonly DST_ALPHA: GLenum;
4238     readonly DST_COLOR: GLenum;
4239     readonly DYNAMIC_DRAW: GLenum;
4240     readonly ELEMENT_ARRAY_BUFFER: GLenum;
4241     readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4242     readonly EQUAL: GLenum;
4243     readonly FASTEST: GLenum;
4244     readonly FLOAT: GLenum;
4245     readonly FLOAT_MAT2: GLenum;
4246     readonly FLOAT_MAT3: GLenum;
4247     readonly FLOAT_MAT4: GLenum;
4248     readonly FLOAT_VEC2: GLenum;
4249     readonly FLOAT_VEC3: GLenum;
4250     readonly FLOAT_VEC4: GLenum;
4251     readonly FRAGMENT_SHADER: GLenum;
4252     readonly FRAMEBUFFER: GLenum;
4253     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4254     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4255     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4256     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4257     readonly FRAMEBUFFER_BINDING: GLenum;
4258     readonly FRAMEBUFFER_COMPLETE: GLenum;
4259     readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4260     readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4261     readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4262     readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4263     readonly FRONT: GLenum;
4264     readonly FRONT_AND_BACK: GLenum;
4265     readonly FRONT_FACE: GLenum;
4266     readonly FUNC_ADD: GLenum;
4267     readonly FUNC_REVERSE_SUBTRACT: GLenum;
4268     readonly FUNC_SUBTRACT: GLenum;
4269     readonly GENERATE_MIPMAP_HINT: GLenum;
4270     readonly GEQUAL: GLenum;
4271     readonly GREATER: GLenum;
4272     readonly GREEN_BITS: GLenum;
4273     readonly HIGH_FLOAT: GLenum;
4274     readonly HIGH_INT: GLenum;
4275     readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4276     readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4277     readonly INCR: GLenum;
4278     readonly INCR_WRAP: GLenum;
4279     readonly INT: GLenum;
4280     readonly INT_VEC2: GLenum;
4281     readonly INT_VEC3: GLenum;
4282     readonly INT_VEC4: GLenum;
4283     readonly INVALID_ENUM: GLenum;
4284     readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4285     readonly INVALID_OPERATION: GLenum;
4286     readonly INVALID_VALUE: GLenum;
4287     readonly INVERT: GLenum;
4288     readonly KEEP: GLenum;
4289     readonly LEQUAL: GLenum;
4290     readonly LESS: GLenum;
4291     readonly LINEAR: GLenum;
4292     readonly LINEAR_MIPMAP_LINEAR: GLenum;
4293     readonly LINEAR_MIPMAP_NEAREST: GLenum;
4294     readonly LINES: GLenum;
4295     readonly LINE_LOOP: GLenum;
4296     readonly LINE_STRIP: GLenum;
4297     readonly LINE_WIDTH: GLenum;
4298     readonly LINK_STATUS: GLenum;
4299     readonly LOW_FLOAT: GLenum;
4300     readonly LOW_INT: GLenum;
4301     readonly LUMINANCE: GLenum;
4302     readonly LUMINANCE_ALPHA: GLenum;
4303     readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4304     readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4305     readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4306     readonly MAX_RENDERBUFFER_SIZE: GLenum;
4307     readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4308     readonly MAX_TEXTURE_SIZE: GLenum;
4309     readonly MAX_VARYING_VECTORS: GLenum;
4310     readonly MAX_VERTEX_ATTRIBS: GLenum;
4311     readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4312     readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4313     readonly MAX_VIEWPORT_DIMS: GLenum;
4314     readonly MEDIUM_FLOAT: GLenum;
4315     readonly MEDIUM_INT: GLenum;
4316     readonly MIRRORED_REPEAT: GLenum;
4317     readonly NEAREST: GLenum;
4318     readonly NEAREST_MIPMAP_LINEAR: GLenum;
4319     readonly NEAREST_MIPMAP_NEAREST: GLenum;
4320     readonly NEVER: GLenum;
4321     readonly NICEST: GLenum;
4322     readonly NONE: GLenum;
4323     readonly NOTEQUAL: GLenum;
4324     readonly NO_ERROR: GLenum;
4325     readonly ONE: GLenum;
4326     readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4327     readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4328     readonly ONE_MINUS_DST_ALPHA: GLenum;
4329     readonly ONE_MINUS_DST_COLOR: GLenum;
4330     readonly ONE_MINUS_SRC_ALPHA: GLenum;
4331     readonly ONE_MINUS_SRC_COLOR: GLenum;
4332     readonly OUT_OF_MEMORY: GLenum;
4333     readonly PACK_ALIGNMENT: GLenum;
4334     readonly POINTS: GLenum;
4335     readonly POLYGON_OFFSET_FACTOR: GLenum;
4336     readonly POLYGON_OFFSET_FILL: GLenum;
4337     readonly POLYGON_OFFSET_UNITS: GLenum;
4338     readonly RED_BITS: GLenum;
4339     readonly RENDERBUFFER: GLenum;
4340     readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4341     readonly RENDERBUFFER_BINDING: GLenum;
4342     readonly RENDERBUFFER_BLUE_SIZE: GLenum;
4343     readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
4344     readonly RENDERBUFFER_GREEN_SIZE: GLenum;
4345     readonly RENDERBUFFER_HEIGHT: GLenum;
4346     readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
4347     readonly RENDERBUFFER_RED_SIZE: GLenum;
4348     readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
4349     readonly RENDERBUFFER_WIDTH: GLenum;
4350     readonly RENDERER: GLenum;
4351     readonly REPEAT: GLenum;
4352     readonly REPLACE: GLenum;
4353     readonly RGB: GLenum;
4354     readonly RGB565: GLenum;
4355     readonly RGB5_A1: GLenum;
4356     readonly RGBA: GLenum;
4357     readonly RGBA4: GLenum;
4358     readonly SAMPLER_2D: GLenum;
4359     readonly SAMPLER_CUBE: GLenum;
4360     readonly SAMPLES: GLenum;
4361     readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
4362     readonly SAMPLE_BUFFERS: GLenum;
4363     readonly SAMPLE_COVERAGE: GLenum;
4364     readonly SAMPLE_COVERAGE_INVERT: GLenum;
4365     readonly SAMPLE_COVERAGE_VALUE: GLenum;
4366     readonly SCISSOR_BOX: GLenum;
4367     readonly SCISSOR_TEST: GLenum;
4368     readonly SHADER_TYPE: GLenum;
4369     readonly SHADING_LANGUAGE_VERSION: GLenum;
4370     readonly SHORT: GLenum;
4371     readonly SRC_ALPHA: GLenum;
4372     readonly SRC_ALPHA_SATURATE: GLenum;
4373     readonly SRC_COLOR: GLenum;
4374     readonly STATIC_DRAW: GLenum;
4375     readonly STENCIL_ATTACHMENT: GLenum;
4376     readonly STENCIL_BACK_FAIL: GLenum;
4377     readonly STENCIL_BACK_FUNC: GLenum;
4378     readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
4379     readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
4380     readonly STENCIL_BACK_REF: GLenum;
4381     readonly STENCIL_BACK_VALUE_MASK: GLenum;
4382     readonly STENCIL_BACK_WRITEMASK: GLenum;
4383     readonly STENCIL_BITS: GLenum;
4384     readonly STENCIL_BUFFER_BIT: GLenum;
4385     readonly STENCIL_CLEAR_VALUE: GLenum;
4386     readonly STENCIL_FAIL: GLenum;
4387     readonly STENCIL_FUNC: GLenum;
4388     readonly STENCIL_INDEX8: GLenum;
4389     readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
4390     readonly STENCIL_PASS_DEPTH_PASS: GLenum;
4391     readonly STENCIL_REF: GLenum;
4392     readonly STENCIL_TEST: GLenum;
4393     readonly STENCIL_VALUE_MASK: GLenum;
4394     readonly STENCIL_WRITEMASK: GLenum;
4395     readonly STREAM_DRAW: GLenum;
4396     readonly SUBPIXEL_BITS: GLenum;
4397     readonly TEXTURE: GLenum;
4398     readonly TEXTURE0: GLenum;
4399     readonly TEXTURE1: GLenum;
4400     readonly TEXTURE10: GLenum;
4401     readonly TEXTURE11: GLenum;
4402     readonly TEXTURE12: GLenum;
4403     readonly TEXTURE13: GLenum;
4404     readonly TEXTURE14: GLenum;
4405     readonly TEXTURE15: GLenum;
4406     readonly TEXTURE16: GLenum;
4407     readonly TEXTURE17: GLenum;
4408     readonly TEXTURE18: GLenum;
4409     readonly TEXTURE19: GLenum;
4410     readonly TEXTURE2: GLenum;
4411     readonly TEXTURE20: GLenum;
4412     readonly TEXTURE21: GLenum;
4413     readonly TEXTURE22: GLenum;
4414     readonly TEXTURE23: GLenum;
4415     readonly TEXTURE24: GLenum;
4416     readonly TEXTURE25: GLenum;
4417     readonly TEXTURE26: GLenum;
4418     readonly TEXTURE27: GLenum;
4419     readonly TEXTURE28: GLenum;
4420     readonly TEXTURE29: GLenum;
4421     readonly TEXTURE3: GLenum;
4422     readonly TEXTURE30: GLenum;
4423     readonly TEXTURE31: GLenum;
4424     readonly TEXTURE4: GLenum;
4425     readonly TEXTURE5: GLenum;
4426     readonly TEXTURE6: GLenum;
4427     readonly TEXTURE7: GLenum;
4428     readonly TEXTURE8: GLenum;
4429     readonly TEXTURE9: GLenum;
4430     readonly TEXTURE_2D: GLenum;
4431     readonly TEXTURE_BINDING_2D: GLenum;
4432     readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
4433     readonly TEXTURE_CUBE_MAP: GLenum;
4434     readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
4435     readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
4436     readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
4437     readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
4438     readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
4439     readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
4440     readonly TEXTURE_MAG_FILTER: GLenum;
4441     readonly TEXTURE_MIN_FILTER: GLenum;
4442     readonly TEXTURE_WRAP_S: GLenum;
4443     readonly TEXTURE_WRAP_T: GLenum;
4444     readonly TRIANGLES: GLenum;
4445     readonly TRIANGLE_FAN: GLenum;
4446     readonly TRIANGLE_STRIP: GLenum;
4447     readonly UNPACK_ALIGNMENT: GLenum;
4448     readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
4449     readonly UNPACK_FLIP_Y_WEBGL: GLenum;
4450     readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
4451     readonly UNSIGNED_BYTE: GLenum;
4452     readonly UNSIGNED_INT: GLenum;
4453     readonly UNSIGNED_SHORT: GLenum;
4454     readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
4455     readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
4456     readonly UNSIGNED_SHORT_5_6_5: GLenum;
4457     readonly VALIDATE_STATUS: GLenum;
4458     readonly VENDOR: GLenum;
4459     readonly VERSION: GLenum;
4460     readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
4461     readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
4462     readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
4463     readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
4464     readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
4465     readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
4466     readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
4467     readonly VERTEX_SHADER: GLenum;
4468     readonly VIEWPORT: GLenum;
4469     readonly ZERO: GLenum;
4470 };
4471
4472 interface WebGLRenderingContextBase {
4473     readonly drawingBufferHeight: GLsizei;
4474     readonly drawingBufferWidth: GLsizei;
4475     activeTexture(texture: GLenum): void;
4476     attachShader(program: WebGLProgram, shader: WebGLShader): void;
4477     bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
4478     bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
4479     bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
4480     bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4481     bindTexture(target: GLenum, texture: WebGLTexture | null): void;
4482     blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4483     blendEquation(mode: GLenum): void;
4484     blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
4485     blendFunc(sfactor: GLenum, dfactor: GLenum): void;
4486     blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
4487     checkFramebufferStatus(target: GLenum): GLenum;
4488     clear(mask: GLbitfield): void;
4489     clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4490     clearDepth(depth: GLclampf): void;
4491     clearStencil(s: GLint): void;
4492     colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
4493     compileShader(shader: WebGLShader): void;
4494     copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
4495     copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4496     createBuffer(): WebGLBuffer | null;
4497     createFramebuffer(): WebGLFramebuffer | null;
4498     createProgram(): WebGLProgram | null;
4499     createRenderbuffer(): WebGLRenderbuffer | null;
4500     createShader(type: GLenum): WebGLShader | null;
4501     createTexture(): WebGLTexture | null;
4502     cullFace(mode: GLenum): void;
4503     deleteBuffer(buffer: WebGLBuffer | null): void;
4504     deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
4505     deleteProgram(program: WebGLProgram | null): void;
4506     deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
4507     deleteShader(shader: WebGLShader | null): void;
4508     deleteTexture(texture: WebGLTexture | null): void;
4509     depthFunc(func: GLenum): void;
4510     depthMask(flag: GLboolean): void;
4511     depthRange(zNear: GLclampf, zFar: GLclampf): void;
4512     detachShader(program: WebGLProgram, shader: WebGLShader): void;
4513     disable(cap: GLenum): void;
4514     disableVertexAttribArray(index: GLuint): void;
4515     drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
4516     drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
4517     enable(cap: GLenum): void;
4518     enableVertexAttribArray(index: GLuint): void;
4519     finish(): void;
4520     flush(): void;
4521     framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4522     framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
4523     frontFace(mode: GLenum): void;
4524     generateMipmap(target: GLenum): void;
4525     getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4526     getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4527     getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
4528     getAttribLocation(program: WebGLProgram, name: string): GLint;
4529     getBufferParameter(target: GLenum, pname: GLenum): any;
4530     getContextAttributes(): WebGLContextAttributes | null;
4531     getError(): GLenum;
4532     getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
4533     getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null;
4534     getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null;
4535     getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null;
4536     getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
4537     getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
4538     getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
4539     getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
4540     getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null;
4541     getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
4542     getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
4543     getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
4544     getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
4545     getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
4546     getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
4547     getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null;
4548     getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
4549     getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
4550     getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
4551     getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
4552     getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
4553     getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
4554     getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
4555     getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
4556     getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
4557     getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
4558     getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
4559     getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
4560     getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
4561     getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
4562     getExtension(name: string): any;
4563     getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
4564     getParameter(pname: GLenum): any;
4565     getProgramInfoLog(program: WebGLProgram): string | null;
4566     getProgramParameter(program: WebGLProgram, pname: GLenum): any;
4567     getRenderbufferParameter(target: GLenum, pname: GLenum): any;
4568     getShaderInfoLog(shader: WebGLShader): string | null;
4569     getShaderParameter(shader: WebGLShader, pname: GLenum): any;
4570     getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
4571     getShaderSource(shader: WebGLShader): string | null;
4572     getSupportedExtensions(): string[] | null;
4573     getTexParameter(target: GLenum, pname: GLenum): any;
4574     getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
4575     getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
4576     getVertexAttrib(index: GLuint, pname: GLenum): any;
4577     getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
4578     hint(target: GLenum, mode: GLenum): void;
4579     isBuffer(buffer: WebGLBuffer | null): GLboolean;
4580     isContextLost(): boolean;
4581     isEnabled(cap: GLenum): GLboolean;
4582     isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
4583     isProgram(program: WebGLProgram | null): GLboolean;
4584     isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
4585     isShader(shader: WebGLShader | null): GLboolean;
4586     isTexture(texture: WebGLTexture | null): GLboolean;
4587     lineWidth(width: GLfloat): void;
4588     linkProgram(program: WebGLProgram): void;
4589     pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
4590     polygonOffset(factor: GLfloat, units: GLfloat): void;
4591     renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4592     sampleCoverage(value: GLclampf, invert: GLboolean): void;
4593     scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4594     shaderSource(shader: WebGLShader, source: string): void;
4595     stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
4596     stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
4597     stencilMask(mask: GLuint): void;
4598     stencilMaskSeparate(face: GLenum, mask: GLuint): void;
4599     stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4600     stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4601     texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
4602     texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
4603     uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
4604     uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
4605     uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
4606     uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
4607     uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
4608     uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
4609     uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4610     uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
4611     useProgram(program: WebGLProgram | null): void;
4612     validateProgram(program: WebGLProgram): void;
4613     vertexAttrib1f(index: GLuint, x: GLfloat): void;
4614     vertexAttrib1fv(index: GLuint, values: Float32List): void;
4615     vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
4616     vertexAttrib2fv(index: GLuint, values: Float32List): void;
4617     vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
4618     vertexAttrib3fv(index: GLuint, values: Float32List): void;
4619     vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4620     vertexAttrib4fv(index: GLuint, values: Float32List): void;
4621     vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
4622     viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4623     readonly ACTIVE_ATTRIBUTES: GLenum;
4624     readonly ACTIVE_TEXTURE: GLenum;
4625     readonly ACTIVE_UNIFORMS: GLenum;
4626     readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4627     readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4628     readonly ALPHA: GLenum;
4629     readonly ALPHA_BITS: GLenum;
4630     readonly ALWAYS: GLenum;
4631     readonly ARRAY_BUFFER: GLenum;
4632     readonly ARRAY_BUFFER_BINDING: GLenum;
4633     readonly ATTACHED_SHADERS: GLenum;
4634     readonly BACK: GLenum;
4635     readonly BLEND: GLenum;
4636     readonly BLEND_COLOR: GLenum;
4637     readonly BLEND_DST_ALPHA: GLenum;
4638     readonly BLEND_DST_RGB: GLenum;
4639     readonly BLEND_EQUATION: GLenum;
4640     readonly BLEND_EQUATION_ALPHA: GLenum;
4641     readonly BLEND_EQUATION_RGB: GLenum;
4642     readonly BLEND_SRC_ALPHA: GLenum;
4643     readonly BLEND_SRC_RGB: GLenum;
4644     readonly BLUE_BITS: GLenum;
4645     readonly BOOL: GLenum;
4646     readonly BOOL_VEC2: GLenum;
4647     readonly BOOL_VEC3: GLenum;
4648     readonly BOOL_VEC4: GLenum;
4649     readonly BROWSER_DEFAULT_WEBGL: GLenum;
4650     readonly BUFFER_SIZE: GLenum;
4651     readonly BUFFER_USAGE: GLenum;
4652     readonly BYTE: GLenum;
4653     readonly CCW: GLenum;
4654     readonly CLAMP_TO_EDGE: GLenum;
4655     readonly COLOR_ATTACHMENT0: GLenum;
4656     readonly COLOR_BUFFER_BIT: GLenum;
4657     readonly COLOR_CLEAR_VALUE: GLenum;
4658     readonly COLOR_WRITEMASK: GLenum;
4659     readonly COMPILE_STATUS: GLenum;
4660     readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4661     readonly CONSTANT_ALPHA: GLenum;
4662     readonly CONSTANT_COLOR: GLenum;
4663     readonly CONTEXT_LOST_WEBGL: GLenum;
4664     readonly CULL_FACE: GLenum;
4665     readonly CULL_FACE_MODE: GLenum;
4666     readonly CURRENT_PROGRAM: GLenum;
4667     readonly CURRENT_VERTEX_ATTRIB: GLenum;
4668     readonly CW: GLenum;
4669     readonly DECR: GLenum;
4670     readonly DECR_WRAP: GLenum;
4671     readonly DELETE_STATUS: GLenum;
4672     readonly DEPTH_ATTACHMENT: GLenum;
4673     readonly DEPTH_BITS: GLenum;
4674     readonly DEPTH_BUFFER_BIT: GLenum;
4675     readonly DEPTH_CLEAR_VALUE: GLenum;
4676     readonly DEPTH_COMPONENT: GLenum;
4677     readonly DEPTH_COMPONENT16: GLenum;
4678     readonly DEPTH_FUNC: GLenum;
4679     readonly DEPTH_RANGE: GLenum;
4680     readonly DEPTH_STENCIL: GLenum;
4681     readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4682     readonly DEPTH_TEST: GLenum;
4683     readonly DEPTH_WRITEMASK: GLenum;
4684     readonly DITHER: GLenum;
4685     readonly DONT_CARE: GLenum;
4686     readonly DST_ALPHA: GLenum;
4687     readonly DST_COLOR: GLenum;
4688     readonly DYNAMIC_DRAW: GLenum;
4689     readonly ELEMENT_ARRAY_BUFFER: GLenum;
4690     readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4691     readonly EQUAL: GLenum;
4692     readonly FASTEST: GLenum;
4693     readonly FLOAT: GLenum;
4694     readonly FLOAT_MAT2: GLenum;
4695     readonly FLOAT_MAT3: GLenum;
4696     readonly FLOAT_MAT4: GLenum;
4697     readonly FLOAT_VEC2: GLenum;
4698     readonly FLOAT_VEC3: GLenum;
4699     readonly FLOAT_VEC4: GLenum;
4700     readonly FRAGMENT_SHADER: GLenum;
4701     readonly FRAMEBUFFER: GLenum;
4702     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4703     readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4704     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4705     readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4706     readonly FRAMEBUFFER_BINDING: GLenum;
4707     readonly FRAMEBUFFER_COMPLETE: GLenum;
4708     readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4709     readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4710     readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4711     readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4712     readonly FRONT: GLenum;
4713     readonly FRONT_AND_BACK: GLenum;
4714     readonly FRONT_FACE: GLenum;
4715     readonly FUNC_ADD: GLenum;
4716     readonly FUNC_REVERSE_SUBTRACT: GLenum;
4717     readonly FUNC_SUBTRACT: GLenum;
4718     readonly GENERATE_MIPMAP_HINT: GLenum;
4719     readonly GEQUAL: GLenum;
4720     readonly GREATER: GLenum;
4721     readonly GREEN_BITS: GLenum;
4722     readonly HIGH_FLOAT: GLenum;
4723     readonly HIGH_INT: GLenum;
4724     readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4725     readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4726     readonly INCR: GLenum;
4727     readonly INCR_WRAP: GLenum;
4728     readonly INT: GLenum;
4729     readonly INT_VEC2: GLenum;
4730     readonly INT_VEC3: GLenum;
4731     readonly INT_VEC4: GLenum;
4732     readonly INVALID_ENUM: GLenum;
4733     readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4734     readonly INVALID_OPERATION: GLenum;
4735     readonly INVALID_VALUE: GLenum;
4736     readonly INVERT: GLenum;
4737     readonly KEEP: GLenum;
4738     readonly LEQUAL: GLenum;
4739     readonly LESS: GLenum;
4740     readonly LINEAR: GLenum;
4741     readonly LINEAR_MIPMAP_LINEAR: GLenum;
4742     readonly LINEAR_MIPMAP_NEAREST: GLenum;
4743     readonly LINES: GLenum;
4744     readonly LINE_LOOP: GLenum;
4745     readonly LINE_STRIP: GLenum;
4746     readonly LINE_WIDTH: GLenum;
4747     readonly LINK_STATUS: GLenum;
4748     readonly LOW_FLOAT: GLenum;
4749     readonly LOW_INT: GLenum;
4750     readonly LUMINANCE: GLenum;
4751     readonly LUMINANCE_ALPHA: GLenum;
4752     readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4753     readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4754     readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4755     readonly MAX_RENDERBUFFER_SIZE: GLenum;
4756     readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4757     readonly MAX_TEXTURE_SIZE: GLenum;
4758     readonly MAX_VARYING_VECTORS: GLenum;
4759     readonly MAX_VERTEX_ATTRIBS: GLenum;
4760     readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4761     readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4762     readonly MAX_VIEWPORT_DIMS: GLenum;
4763     readonly MEDIUM_FLOAT: GLenum;
4764     readonly MEDIUM_INT: GLenum;
4765     readonly MIRRORED_REPEAT: GLenum;
4766     readonly NEAREST: GLenum;
4767     readonly NEAREST_MIPMAP_LINEAR: GLenum;
4768     readonly NEAREST_MIPMAP_NEAREST: GLenum;
4769     readonly NEVER: GLenum;
4770     readonly NICEST: GLenum;
4771     readonly NONE: GLenum;
4772     readonly NOTEQUAL: GLenum;
4773     readonly NO_ERROR: GLenum;
4774     readonly ONE: GLenum;
4775     readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4776     readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4777     readonly ONE_MINUS_DST_ALPHA: GLenum;
4778     readonly ONE_MINUS_DST_COLOR: GLenum;
4779     readonly ONE_MINUS_SRC_ALPHA: GLenum;
4780     readonly ONE_MINUS_SRC_COLOR: GLenum;
4781     readonly OUT_OF_MEMORY: GLenum;
4782     readonly PACK_ALIGNMENT: GLenum;
4783     readonly POINTS: GLenum;
4784     readonly POLYGON_OFFSET_FACTOR: GLenum;
4785     readonly POLYGON_OFFSET_FILL: GLenum;
4786     readonly POLYGON_OFFSET_UNITS: GLenum;
4787     readonly RED_BITS: GLenum;
4788     readonly RENDERBUFFER: GLenum;
4789     readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4790     readonly RENDERBUFFER_BINDING: GLenum;
4791     readonly RENDERBUFFER_BLUE_SIZE: GLenum;
4792     readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
4793     readonly RENDERBUFFER_GREEN_SIZE: GLenum;
4794     readonly RENDERBUFFER_HEIGHT: GLenum;
4795     readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
4796     readonly RENDERBUFFER_RED_SIZE: GLenum;
4797     readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
4798     readonly RENDERBUFFER_WIDTH: GLenum;
4799     readonly RENDERER: GLenum;
4800     readonly REPEAT: GLenum;
4801     readonly REPLACE: GLenum;
4802     readonly RGB: GLenum;
4803     readonly RGB565: GLenum;
4804     readonly RGB5_A1: GLenum;
4805     readonly RGBA: GLenum;
4806     readonly RGBA4: GLenum;
4807     readonly SAMPLER_2D: GLenum;
4808     readonly SAMPLER_CUBE: GLenum;
4809     readonly SAMPLES: GLenum;
4810     readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
4811     readonly SAMPLE_BUFFERS: GLenum;
4812     readonly SAMPLE_COVERAGE: GLenum;
4813     readonly SAMPLE_COVERAGE_INVERT: GLenum;
4814     readonly SAMPLE_COVERAGE_VALUE: GLenum;
4815     readonly SCISSOR_BOX: GLenum;
4816     readonly SCISSOR_TEST: GLenum;
4817     readonly SHADER_TYPE: GLenum;
4818     readonly SHADING_LANGUAGE_VERSION: GLenum;
4819     readonly SHORT: GLenum;
4820     readonly SRC_ALPHA: GLenum;
4821     readonly SRC_ALPHA_SATURATE: GLenum;
4822     readonly SRC_COLOR: GLenum;
4823     readonly STATIC_DRAW: GLenum;
4824     readonly STENCIL_ATTACHMENT: GLenum;
4825     readonly STENCIL_BACK_FAIL: GLenum;
4826     readonly STENCIL_BACK_FUNC: GLenum;
4827     readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
4828     readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
4829     readonly STENCIL_BACK_REF: GLenum;
4830     readonly STENCIL_BACK_VALUE_MASK: GLenum;
4831     readonly STENCIL_BACK_WRITEMASK: GLenum;
4832     readonly STENCIL_BITS: GLenum;
4833     readonly STENCIL_BUFFER_BIT: GLenum;
4834     readonly STENCIL_CLEAR_VALUE: GLenum;
4835     readonly STENCIL_FAIL: GLenum;
4836     readonly STENCIL_FUNC: GLenum;
4837     readonly STENCIL_INDEX8: GLenum;
4838     readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
4839     readonly STENCIL_PASS_DEPTH_PASS: GLenum;
4840     readonly STENCIL_REF: GLenum;
4841     readonly STENCIL_TEST: GLenum;
4842     readonly STENCIL_VALUE_MASK: GLenum;
4843     readonly STENCIL_WRITEMASK: GLenum;
4844     readonly STREAM_DRAW: GLenum;
4845     readonly SUBPIXEL_BITS: GLenum;
4846     readonly TEXTURE: GLenum;
4847     readonly TEXTURE0: GLenum;
4848     readonly TEXTURE1: GLenum;
4849     readonly TEXTURE10: GLenum;
4850     readonly TEXTURE11: GLenum;
4851     readonly TEXTURE12: GLenum;
4852     readonly TEXTURE13: GLenum;
4853     readonly TEXTURE14: GLenum;
4854     readonly TEXTURE15: GLenum;
4855     readonly TEXTURE16: GLenum;
4856     readonly TEXTURE17: GLenum;
4857     readonly TEXTURE18: GLenum;
4858     readonly TEXTURE19: GLenum;
4859     readonly TEXTURE2: GLenum;
4860     readonly TEXTURE20: GLenum;
4861     readonly TEXTURE21: GLenum;
4862     readonly TEXTURE22: GLenum;
4863     readonly TEXTURE23: GLenum;
4864     readonly TEXTURE24: GLenum;
4865     readonly TEXTURE25: GLenum;
4866     readonly TEXTURE26: GLenum;
4867     readonly TEXTURE27: GLenum;
4868     readonly TEXTURE28: GLenum;
4869     readonly TEXTURE29: GLenum;
4870     readonly TEXTURE3: GLenum;
4871     readonly TEXTURE30: GLenum;
4872     readonly TEXTURE31: GLenum;
4873     readonly TEXTURE4: GLenum;
4874     readonly TEXTURE5: GLenum;
4875     readonly TEXTURE6: GLenum;
4876     readonly TEXTURE7: GLenum;
4877     readonly TEXTURE8: GLenum;
4878     readonly TEXTURE9: GLenum;
4879     readonly TEXTURE_2D: GLenum;
4880     readonly TEXTURE_BINDING_2D: GLenum;
4881     readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
4882     readonly TEXTURE_CUBE_MAP: GLenum;
4883     readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
4884     readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
4885     readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
4886     readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
4887     readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
4888     readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
4889     readonly TEXTURE_MAG_FILTER: GLenum;
4890     readonly TEXTURE_MIN_FILTER: GLenum;
4891     readonly TEXTURE_WRAP_S: GLenum;
4892     readonly TEXTURE_WRAP_T: GLenum;
4893     readonly TRIANGLES: GLenum;
4894     readonly TRIANGLE_FAN: GLenum;
4895     readonly TRIANGLE_STRIP: GLenum;
4896     readonly UNPACK_ALIGNMENT: GLenum;
4897     readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
4898     readonly UNPACK_FLIP_Y_WEBGL: GLenum;
4899     readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
4900     readonly UNSIGNED_BYTE: GLenum;
4901     readonly UNSIGNED_INT: GLenum;
4902     readonly UNSIGNED_SHORT: GLenum;
4903     readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
4904     readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
4905     readonly UNSIGNED_SHORT_5_6_5: GLenum;
4906     readonly VALIDATE_STATUS: GLenum;
4907     readonly VENDOR: GLenum;
4908     readonly VERSION: GLenum;
4909     readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
4910     readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
4911     readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
4912     readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
4913     readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
4914     readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
4915     readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
4916     readonly VERTEX_SHADER: GLenum;
4917     readonly VIEWPORT: GLenum;
4918     readonly ZERO: GLenum;
4919 }
4920
4921 interface WebGLRenderingContextOverloads {
4922     bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
4923     bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
4924     bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
4925     compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
4926     compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
4927     readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4928     texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4929     texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4930     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4931     texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4932     uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
4933     uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
4934     uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
4935     uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
4936     uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
4937     uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
4938     uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
4939     uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
4940     uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
4941     uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
4942     uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
4943 }
4944
4945 interface WebGLSampler {
4946 }
4947
4948 declare var WebGLSampler: {
4949     prototype: WebGLSampler;
4950     new(): WebGLSampler;
4951 };
4952
4953 /** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
4954 interface WebGLShader {
4955 }
4956
4957 declare var WebGLShader: {
4958     prototype: WebGLShader;
4959     new(): WebGLShader;
4960 };
4961
4962 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
4963 interface WebGLShaderPrecisionFormat {
4964     readonly precision: GLint;
4965     readonly rangeMax: GLint;
4966     readonly rangeMin: GLint;
4967 }
4968
4969 declare var WebGLShaderPrecisionFormat: {
4970     prototype: WebGLShaderPrecisionFormat;
4971     new(): WebGLShaderPrecisionFormat;
4972 };
4973
4974 interface WebGLSync {
4975 }
4976
4977 declare var WebGLSync: {
4978     prototype: WebGLSync;
4979     new(): WebGLSync;
4980 };
4981
4982 /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
4983 interface WebGLTexture {
4984 }
4985
4986 declare var WebGLTexture: {
4987     prototype: WebGLTexture;
4988     new(): WebGLTexture;
4989 };
4990
4991 interface WebGLTransformFeedback {
4992 }
4993
4994 declare var WebGLTransformFeedback: {
4995     prototype: WebGLTransformFeedback;
4996     new(): WebGLTransformFeedback;
4997 };
4998
4999 /** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
5000 interface WebGLUniformLocation {
5001 }
5002
5003 declare var WebGLUniformLocation: {
5004     prototype: WebGLUniformLocation;
5005     new(): WebGLUniformLocation;
5006 };
5007
5008 interface WebGLVertexArrayObject {
5009 }
5010
5011 declare var WebGLVertexArrayObject: {
5012     prototype: WebGLVertexArrayObject;
5013     new(): WebGLVertexArrayObject;
5014 };
5015
5016 interface WebGLVertexArrayObjectOES {
5017 }
5018
5019 interface WebSocketEventMap {
5020     "close": CloseEvent;
5021     "error": Event;
5022     "message": MessageEvent;
5023     "open": Event;
5024 }
5025
5026 /** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
5027 interface WebSocket extends EventTarget {
5028     /**
5029      * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
5030      *
5031      * Can be set, to change how binary data is returned. The default is "blob".
5032      */
5033     binaryType: BinaryType;
5034     /**
5035      * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
5036      *
5037      * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
5038      */
5039     readonly bufferedAmount: number;
5040     /** Returns the extensions selected by the server, if any. */
5041     readonly extensions: string;
5042     onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
5043     onerror: ((this: WebSocket, ev: Event) => any) | null;
5044     onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
5045     onopen: ((this: WebSocket, ev: Event) => any) | null;
5046     /** Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation. */
5047     readonly protocol: string;
5048     /** Returns the state of the WebSocket object's connection. It can have the values described below. */
5049     readonly readyState: number;
5050     /** Returns the URL that was used to establish the WebSocket connection. */
5051     readonly url: string;
5052     /** Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. */
5053     close(code?: number, reason?: string): void;
5054     /** Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. */
5055     send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
5056     readonly CLOSED: number;
5057     readonly CLOSING: number;
5058     readonly CONNECTING: number;
5059     readonly OPEN: number;
5060     addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5061     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5062     removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5063     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5064 }
5065
5066 declare var WebSocket: {
5067     prototype: WebSocket;
5068     new(url: string | URL, protocols?: string | string[]): WebSocket;
5069     readonly CLOSED: number;
5070     readonly CLOSING: number;
5071     readonly CONNECTING: number;
5072     readonly OPEN: number;
5073 };
5074
5075 /** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
5076 interface WindowClient extends Client {
5077     readonly focused: boolean;
5078     readonly visibilityState: VisibilityState;
5079     focus(): Promise<WindowClient>;
5080     navigate(url: string | URL): Promise<WindowClient | null>;
5081 }
5082
5083 declare var WindowClient: {
5084     prototype: WindowClient;
5085     new(): WindowClient;
5086 };
5087
5088 interface WindowOrWorkerGlobalScope {
5089     /** Available only in secure contexts. */
5090     readonly caches: CacheStorage;
5091     readonly crossOriginIsolated: boolean;
5092     readonly crypto: Crypto;
5093     readonly indexedDB: IDBFactory;
5094     readonly isSecureContext: boolean;
5095     readonly origin: string;
5096     readonly performance: Performance;
5097     atob(data: string): string;
5098     btoa(data: string): string;
5099     clearInterval(handle?: number): void;
5100     clearTimeout(handle?: number): void;
5101     createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5102     createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5103     fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5104     queueMicrotask(callback: VoidFunction): void;
5105     setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5106     setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5107 }
5108
5109 interface WorkerEventMap extends AbstractWorkerEventMap {
5110     "message": MessageEvent;
5111     "messageerror": MessageEvent;
5112 }
5113
5114 /** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
5115 interface Worker extends EventTarget, AbstractWorker {
5116     onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
5117     onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
5118     /** Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
5119     postMessage(message: any, transfer: Transferable[]): void;
5120     postMessage(message: any, options?: StructuredSerializeOptions): void;
5121     /** Aborts worker's associated global environment. */
5122     terminate(): void;
5123     addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5124     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5125     removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5126     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5127 }
5128
5129 declare var Worker: {
5130     prototype: Worker;
5131     new(scriptURL: string | URL, options?: WorkerOptions): Worker;
5132 };
5133
5134 interface WorkerGlobalScopeEventMap {
5135     "error": ErrorEvent;
5136     "languagechange": Event;
5137     "offline": Event;
5138     "online": Event;
5139     "rejectionhandled": PromiseRejectionEvent;
5140     "unhandledrejection": PromiseRejectionEvent;
5141 }
5142
5143 /** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects â€” in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
5144 interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerGlobalScope {
5145     /** Returns workerGlobal's WorkerLocation object. */
5146     readonly location: WorkerLocation;
5147     /** Returns workerGlobal's WorkerNavigator object. */
5148     readonly navigator: WorkerNavigator;
5149     onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
5150     onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5151     onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5152     ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5153     onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5154     onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5155     /** Returns workerGlobal. */
5156     readonly self: WorkerGlobalScope & typeof globalThis;
5157     /** Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */
5158     importScripts(...urls: (string | URL)[]): void;
5159     addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5160     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5161     removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5162     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5163 }
5164
5165 declare var WorkerGlobalScope: {
5166     prototype: WorkerGlobalScope;
5167     new(): WorkerGlobalScope;
5168 };
5169
5170 /** The absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location. */
5171 interface WorkerLocation {
5172     readonly hash: string;
5173     readonly host: string;
5174     readonly hostname: string;
5175     readonly href: string;
5176     toString(): string;
5177     readonly origin: string;
5178     readonly pathname: string;
5179     readonly port: string;
5180     readonly protocol: string;
5181     readonly search: string;
5182 }
5183
5184 declare var WorkerLocation: {
5185     prototype: WorkerLocation;
5186     new(): WorkerLocation;
5187 };
5188
5189 /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
5190 interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5191     readonly mediaCapabilities: MediaCapabilities;
5192 }
5193
5194 declare var WorkerNavigator: {
5195     prototype: WorkerNavigator;
5196     new(): WorkerNavigator;
5197 };
5198
5199 /** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
5200 interface WritableStream<W = any> {
5201     readonly locked: boolean;
5202     abort(reason?: any): Promise<void>;
5203     close(): Promise<void>;
5204     getWriter(): WritableStreamDefaultWriter<W>;
5205 }
5206
5207 declare var WritableStream: {
5208     prototype: WritableStream;
5209     new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
5210 };
5211
5212 /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
5213 interface WritableStreamDefaultController {
5214     error(e?: any): void;
5215 }
5216
5217 declare var WritableStreamDefaultController: {
5218     prototype: WritableStreamDefaultController;
5219     new(): WritableStreamDefaultController;
5220 };
5221
5222 /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
5223 interface WritableStreamDefaultWriter<W = any> {
5224     readonly closed: Promise<undefined>;
5225     readonly desiredSize: number | null;
5226     readonly ready: Promise<undefined>;
5227     abort(reason?: any): Promise<void>;
5228     close(): Promise<void>;
5229     releaseLock(): void;
5230     write(chunk?: W): Promise<void>;
5231 }
5232
5233 declare var WritableStreamDefaultWriter: {
5234     prototype: WritableStreamDefaultWriter;
5235     new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
5236 };
5237
5238 interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
5239     "readystatechange": Event;
5240 }
5241
5242 /** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
5243 interface XMLHttpRequest extends XMLHttpRequestEventTarget {
5244     onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
5245     /** Returns client's state. */
5246     readonly readyState: number;
5247     /** Returns the response body. */
5248     readonly response: any;
5249     /**
5250      * Returns response as text.
5251      *
5252      * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
5253      */
5254     readonly responseText: string;
5255     /**
5256      * Returns the response type.
5257      *
5258      * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
5259      *
5260      * When set: setting to "document" is ignored if current global object is not a Window object.
5261      *
5262      * When set: throws an "InvalidStateError" DOMException if state is loading or done.
5263      *
5264      * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5265      */
5266     responseType: XMLHttpRequestResponseType;
5267     readonly responseURL: string;
5268     readonly status: number;
5269     readonly statusText: string;
5270     /**
5271      * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and this's synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
5272      *
5273      * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5274      */
5275     timeout: number;
5276     /** Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server. */
5277     readonly upload: XMLHttpRequestUpload;
5278     /**
5279      * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
5280      *
5281      * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
5282      */
5283     withCredentials: boolean;
5284     /** Cancels any network activity. */
5285     abort(): void;
5286     getAllResponseHeaders(): string;
5287     getResponseHeader(name: string): string | null;
5288     /**
5289      * Sets the request method, request URL, and synchronous flag.
5290      *
5291      * Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed.
5292      *
5293      * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
5294      *
5295      * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
5296      */
5297     open(method: string, url: string | URL): void;
5298     open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void;
5299     /**
5300      * Acts as if the `Content-Type` header value for a response is mime. (It does not change the header.)
5301      *
5302      * Throws an "InvalidStateError" DOMException if state is loading or done.
5303      */
5304     overrideMimeType(mime: string): void;
5305     /**
5306      * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
5307      *
5308      * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5309      */
5310     send(body?: XMLHttpRequestBodyInit | null): void;
5311     /**
5312      * Combines a header in author request headers.
5313      *
5314      * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5315      *
5316      * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
5317      */
5318     setRequestHeader(name: string, value: string): void;
5319     readonly DONE: number;
5320     readonly HEADERS_RECEIVED: number;
5321     readonly LOADING: number;
5322     readonly OPENED: number;
5323     readonly UNSENT: number;
5324     addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5325     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5326     removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5327     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5328 }
5329
5330 declare var XMLHttpRequest: {
5331     prototype: XMLHttpRequest;
5332     new(): XMLHttpRequest;
5333     readonly DONE: number;
5334     readonly HEADERS_RECEIVED: number;
5335     readonly LOADING: number;
5336     readonly OPENED: number;
5337     readonly UNSENT: number;
5338 };
5339
5340 interface XMLHttpRequestEventTargetEventMap {
5341     "abort": ProgressEvent<XMLHttpRequestEventTarget>;
5342     "error": ProgressEvent<XMLHttpRequestEventTarget>;
5343     "load": ProgressEvent<XMLHttpRequestEventTarget>;
5344     "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
5345     "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
5346     "progress": ProgressEvent<XMLHttpRequestEventTarget>;
5347     "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
5348 }
5349
5350 interface XMLHttpRequestEventTarget extends EventTarget {
5351     onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5352     onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5353     onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5354     onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5355     onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5356     onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5357     ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5358     addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5359     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5360     removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5361     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5362 }
5363
5364 declare var XMLHttpRequestEventTarget: {
5365     prototype: XMLHttpRequestEventTarget;
5366     new(): XMLHttpRequestEventTarget;
5367 };
5368
5369 interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
5370     addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5371     addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5372     removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5373     removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5374 }
5375
5376 declare var XMLHttpRequestUpload: {
5377     prototype: XMLHttpRequestUpload;
5378     new(): XMLHttpRequestUpload;
5379 };
5380
5381 interface Console {
5382     assert(condition?: boolean, ...data: any[]): void;
5383     clear(): void;
5384     count(label?: string): void;
5385     countReset(label?: string): void;
5386     debug(...data: any[]): void;
5387     dir(item?: any, options?: any): void;
5388     dirxml(...data: any[]): void;
5389     error(...data: any[]): void;
5390     group(...data: any[]): void;
5391     groupCollapsed(...data: any[]): void;
5392     groupEnd(): void;
5393     info(...data: any[]): void;
5394     log(...data: any[]): void;
5395     table(tabularData?: any, properties?: string[]): void;
5396     time(label?: string): void;
5397     timeEnd(label?: string): void;
5398     timeLog(label?: string, ...data: any[]): void;
5399     timeStamp(label?: string): void;
5400     trace(...data: any[]): void;
5401     warn(...data: any[]): void;
5402 }
5403
5404 declare var console: Console;
5405
5406 declare namespace WebAssembly {
5407     interface CompileError extends Error {
5408     }
5409
5410     var CompileError: {
5411         prototype: CompileError;
5412         new(message?: string): CompileError;
5413         (message?: string): CompileError;
5414     };
5415
5416     interface Global {
5417         value: any;
5418         valueOf(): any;
5419     }
5420
5421     var Global: {
5422         prototype: Global;
5423         new(descriptor: GlobalDescriptor, v?: any): Global;
5424     };
5425
5426     interface Instance {
5427         readonly exports: Exports;
5428     }
5429
5430     var Instance: {
5431         prototype: Instance;
5432         new(module: Module, importObject?: Imports): Instance;
5433     };
5434
5435     interface LinkError extends Error {
5436     }
5437
5438     var LinkError: {
5439         prototype: LinkError;
5440         new(message?: string): LinkError;
5441         (message?: string): LinkError;
5442     };
5443
5444     interface Memory {
5445         readonly buffer: ArrayBuffer;
5446         grow(delta: number): number;
5447     }
5448
5449     var Memory: {
5450         prototype: Memory;
5451         new(descriptor: MemoryDescriptor): Memory;
5452     };
5453
5454     interface Module {
5455     }
5456
5457     var Module: {
5458         prototype: Module;
5459         new(bytes: BufferSource): Module;
5460         customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
5461         exports(moduleObject: Module): ModuleExportDescriptor[];
5462         imports(moduleObject: Module): ModuleImportDescriptor[];
5463     };
5464
5465     interface RuntimeError extends Error {
5466     }
5467
5468     var RuntimeError: {
5469         prototype: RuntimeError;
5470         new(message?: string): RuntimeError;
5471         (message?: string): RuntimeError;
5472     };
5473
5474     interface Table {
5475         readonly length: number;
5476         get(index: number): any;
5477         grow(delta: number, value?: any): number;
5478         set(index: number, value?: any): void;
5479     }
5480
5481     var Table: {
5482         prototype: Table;
5483         new(descriptor: TableDescriptor, value?: any): Table;
5484     };
5485
5486     interface GlobalDescriptor {
5487         mutable?: boolean;
5488         value: ValueType;
5489     }
5490
5491     interface MemoryDescriptor {
5492         initial: number;
5493         maximum?: number;
5494         shared?: boolean;
5495     }
5496
5497     interface ModuleExportDescriptor {
5498         kind: ImportExportKind;
5499         name: string;
5500     }
5501
5502     interface ModuleImportDescriptor {
5503         kind: ImportExportKind;
5504         module: string;
5505         name: string;
5506     }
5507
5508     interface TableDescriptor {
5509         element: TableKind;
5510         initial: number;
5511         maximum?: number;
5512     }
5513
5514     interface WebAssemblyInstantiatedSource {
5515         instance: Instance;
5516         module: Module;
5517     }
5518
5519     type ImportExportKind = "function" | "global" | "memory" | "table";
5520     type TableKind = "anyfunc" | "externref";
5521     type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
5522     type ExportValue = Function | Global | Memory | Table;
5523     type Exports = Record<string, ExportValue>;
5524     type ImportValue = ExportValue | number;
5525     type Imports = Record<string, ModuleImports>;
5526     type ModuleImports = Record<string, ImportValue>;
5527     function compile(bytes: BufferSource): Promise<Module>;
5528     function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
5529     function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5530     function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
5531     function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5532     function validate(bytes: BufferSource): boolean;
5533 }
5534
5535 interface FrameRequestCallback {
5536     (time: DOMHighResTimeStamp): void;
5537 }
5538
5539 interface OnErrorEventHandlerNonNull {
5540     (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5541 }
5542
5543 interface PerformanceObserverCallback {
5544     (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
5545 }
5546
5547 interface QueuingStrategySize<T = any> {
5548     (chunk: T): number;
5549 }
5550
5551 interface TransformerFlushCallback<O> {
5552     (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5553 }
5554
5555 interface TransformerStartCallback<O> {
5556     (controller: TransformStreamDefaultController<O>): any;
5557 }
5558
5559 interface TransformerTransformCallback<I, O> {
5560     (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5561 }
5562
5563 interface UnderlyingSinkAbortCallback {
5564     (reason?: any): void | PromiseLike<void>;
5565 }
5566
5567 interface UnderlyingSinkCloseCallback {
5568     (): void | PromiseLike<void>;
5569 }
5570
5571 interface UnderlyingSinkStartCallback {
5572     (controller: WritableStreamDefaultController): any;
5573 }
5574
5575 interface UnderlyingSinkWriteCallback<W> {
5576     (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
5577 }
5578
5579 interface UnderlyingSourceCancelCallback {
5580     (reason?: any): void | PromiseLike<void>;
5581 }
5582
5583 interface UnderlyingSourcePullCallback<R> {
5584     (controller: ReadableStreamController<R>): void | PromiseLike<void>;
5585 }
5586
5587 interface UnderlyingSourceStartCallback<R> {
5588     (controller: ReadableStreamController<R>): any;
5589 }
5590
5591 interface VoidFunction {
5592     (): void;
5593 }
5594
5595 /** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
5596 declare var name: string;
5597 declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5598 declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5599 /** Aborts dedicatedWorkerGlobal. */
5600 declare function close(): void;
5601 /** Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. */
5602 declare function postMessage(message: any, transfer: Transferable[]): void;
5603 declare function postMessage(message: any, options?: StructuredSerializeOptions): void;
5604 /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
5605 declare function dispatchEvent(event: Event): boolean;
5606 /** Returns workerGlobal's WorkerLocation object. */
5607 declare var location: WorkerLocation;
5608 /** Returns workerGlobal's WorkerNavigator object. */
5609 declare var navigator: WorkerNavigator;
5610 declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
5611 declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5612 declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5613 declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5614 declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5615 declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5616 /** Returns workerGlobal. */
5617 declare var self: WorkerGlobalScope & typeof globalThis;
5618 /** Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */
5619 declare function importScripts(...urls: (string | URL)[]): void;
5620 /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
5621 declare function dispatchEvent(event: Event): boolean;
5622 declare var fonts: FontFaceSet;
5623 /** Available only in secure contexts. */
5624 declare var caches: CacheStorage;
5625 declare var crossOriginIsolated: boolean;
5626 declare var crypto: Crypto;
5627 declare var indexedDB: IDBFactory;
5628 declare var isSecureContext: boolean;
5629 declare var origin: string;
5630 declare var performance: Performance;
5631 declare function atob(data: string): string;
5632 declare function btoa(data: string): string;
5633 declare function clearInterval(handle?: number): void;
5634 declare function clearTimeout(handle?: number): void;
5635 declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5636 declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5637 declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5638 declare function queueMicrotask(callback: VoidFunction): void;
5639 declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5640 declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5641 declare function cancelAnimationFrame(handle: number): void;
5642 declare function requestAnimationFrame(callback: FrameRequestCallback): number;
5643 declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5644 declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5645 declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5646 declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5647 type AlgorithmIdentifier = Algorithm | string;
5648 type BigInteger = Uint8Array;
5649 type BinaryData = ArrayBuffer | ArrayBufferView;
5650 type BlobPart = BufferSource | Blob | string;
5651 type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
5652 type BufferSource = ArrayBufferView | ArrayBuffer;
5653 type CanvasImageSource = ImageBitmap | OffscreenCanvas;
5654 type DOMHighResTimeStamp = number;
5655 type DOMTimeStamp = number;
5656 type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
5657 type Float32List = Float32Array | GLfloat[];
5658 type FormDataEntryValue = File | string;
5659 type GLbitfield = number;
5660 type GLboolean = boolean;
5661 type GLclampf = number;
5662 type GLenum = number;
5663 type GLfloat = number;
5664 type GLint = number;
5665 type GLint64 = number;
5666 type GLintptr = number;
5667 type GLsizei = number;
5668 type GLsizeiptr = number;
5669 type GLuint = number;
5670 type GLuint64 = number;
5671 type HashAlgorithmIdentifier = AlgorithmIdentifier;
5672 type HeadersInit = string[][] | Record<string, string> | Headers;
5673 type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
5674 type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5675 type Int32List = Int32Array | GLint[];
5676 type MessageEventSource = MessagePort | ServiceWorker;
5677 type NamedCurve = string;
5678 type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5679 type PerformanceEntryList = PerformanceEntry[];
5680 type PushMessageDataInit = BufferSource | string;
5681 type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
5682 type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
5683 type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
5684 type RequestInfo = Request | string;
5685 type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
5686 type TimerHandler = string | Function;
5687 type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
5688 type Uint32List = Uint32Array | GLuint[];
5689 type VibratePattern = number | number[];
5690 type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
5691 type BinaryType = "arraybuffer" | "blob";
5692 type ClientTypes = "all" | "sharedworker" | "window" | "worker";
5693 type ColorGamut = "p3" | "rec2020" | "srgb";
5694 type ColorSpaceConversion = "default" | "none";
5695 type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5696 type EndingType = "native" | "transparent";
5697 type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
5698 type FontFaceSetLoadStatus = "loaded" | "loading";
5699 type FrameType = "auxiliary" | "nested" | "none" | "top-level";
5700 type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
5701 type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
5702 type IDBRequestReadyState = "done" | "pending";
5703 type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
5704 type ImageOrientation = "flipY" | "none";
5705 type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5706 type KeyType = "private" | "public" | "secret";
5707 type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5708 type MediaDecodingType = "file" | "media-source" | "webrtc";
5709 type MediaEncodingType = "record" | "webrtc";
5710 type NotificationDirection = "auto" | "ltr" | "rtl";
5711 type NotificationPermission = "default" | "denied" | "granted";
5712 type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
5713 type PermissionState = "denied" | "granted" | "prompt";
5714 type PredefinedColorSpace = "display-p3" | "srgb";
5715 type PremultiplyAlpha = "default" | "none" | "premultiply";
5716 type PushEncryptionKeyName = "auth" | "p256dh";
5717 type PushPermissionState = "denied" | "granted" | "prompt";
5718 type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
5719 type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
5720 type RequestCredentials = "include" | "omit" | "same-origin";
5721 type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
5722 type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
5723 type RequestRedirect = "error" | "follow" | "manual";
5724 type ResizeQuality = "high" | "low" | "medium" | "pixelated";
5725 type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
5726 type SecurityPolicyViolationEventDisposition = "enforce" | "report";
5727 type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
5728 type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
5729 type TransferFunction = "hlg" | "pq" | "srgb";
5730 type VisibilityState = "hidden" | "visible";
5731 type WebGLPowerPreference = "default" | "high-performance" | "low-power";
5732 type WorkerType = "classic" | "module";
5733 type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";