@@ -480,9 +480,18 @@ interface RTCEncodedVideoFrameMetadata {
480
480
width ?: number ;
481
481
}
482
482
483
- interface ReadableStreamReadDoneResult {
483
+ interface ReadableStreamGetReaderOptions {
484
+ /**
485
+ * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
486
+ *
487
+ * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
488
+ */
489
+ mode ?: ReadableStreamReaderMode ;
490
+ }
491
+
492
+ interface ReadableStreamReadDoneResult < T > {
484
493
done : true ;
485
- value ?: undefined ;
494
+ value ?: T ;
486
495
}
487
496
488
497
interface ReadableStreamReadValueResult < T > {
@@ -638,6 +647,21 @@ interface Transformer<I = any, O = any> {
638
647
writableType ?: undefined ;
639
648
}
640
649
650
+ interface UnderlyingByteSource {
651
+ autoAllocateChunkSize ?: number ;
652
+ cancel ?: UnderlyingSourceCancelCallback ;
653
+ pull ?: ( controller : ReadableByteStreamController ) => void | PromiseLike < void > ;
654
+ start ?: ( controller : ReadableByteStreamController ) => any ;
655
+ type : "bytes" ;
656
+ }
657
+
658
+ interface UnderlyingDefaultSource < R = any > {
659
+ cancel ?: UnderlyingSourceCancelCallback ;
660
+ pull ?: ( controller : ReadableStreamDefaultController < R > ) => void | PromiseLike < void > ;
661
+ start ?: ( controller : ReadableStreamDefaultController < R > ) => any ;
662
+ type ?: undefined ;
663
+ }
664
+
641
665
interface UnderlyingSink < W = any > {
642
666
abort ?: UnderlyingSinkAbortCallback ;
643
667
close ?: UnderlyingSinkCloseCallback ;
@@ -647,10 +671,11 @@ interface UnderlyingSink<W = any> {
647
671
}
648
672
649
673
interface UnderlyingSource < R = any > {
674
+ autoAllocateChunkSize ?: number ;
650
675
cancel ?: UnderlyingSourceCancelCallback ;
651
676
pull ?: UnderlyingSourcePullCallback < R > ;
652
677
start ?: UnderlyingSourceStartCallback < R > ;
653
- type ?: undefined ;
678
+ type ?: ReadableStreamType ;
654
679
}
655
680
656
681
interface VideoColorSpaceInit {
@@ -736,6 +761,7 @@ declare var AbortSignal: {
736
761
prototype : AbortSignal ;
737
762
new ( ) : AbortSignal ;
738
763
abort ( reason ?: any ) : AbortSignal ;
764
+ timeout ( milliseconds : number ) : AbortSignal ;
739
765
} ;
740
766
741
767
interface AbstractWorkerEventMap {
@@ -1296,6 +1322,13 @@ interface EXT_sRGB {
1296
1322
interface EXT_shader_texture_lod {
1297
1323
}
1298
1324
1325
+ interface EXT_texture_compression_bptc {
1326
+ readonly COMPRESSED_RGBA_BPTC_UNORM_EXT : GLenum ;
1327
+ readonly COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT : GLenum ;
1328
+ readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT : GLenum ;
1329
+ readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : GLenum ;
1330
+ }
1331
+
1299
1332
interface EXT_texture_compression_rgtc {
1300
1333
readonly COMPRESSED_RED_GREEN_RGTC2_EXT : GLenum ;
1301
1334
readonly COMPRESSED_RED_RGTC1_EXT : GLenum ;
@@ -1327,6 +1360,7 @@ declare var ErrorEvent: {
1327
1360
interface Event {
1328
1361
/** 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. */
1329
1362
readonly bubbles : boolean ;
1363
+ /** @deprecated */
1330
1364
cancelBubble : boolean ;
1331
1365
/** 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. */
1332
1366
readonly cancelable : boolean ;
@@ -2010,13 +2044,13 @@ declare var IDBObjectStore: {
2010
2044
} ;
2011
2045
2012
2046
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
2013
- "blocked" : Event ;
2047
+ "blocked" : IDBVersionChangeEvent ;
2014
2048
"upgradeneeded" : IDBVersionChangeEvent ;
2015
2049
}
2016
2050
2017
2051
/** Also inherits methods from its parents IDBRequest and EventTarget. */
2018
2052
interface IDBOpenDBRequest extends IDBRequest < IDBDatabase > {
2019
- onblocked : ( ( this : IDBOpenDBRequest , ev : Event ) => any ) | null ;
2053
+ onblocked : ( ( this : IDBOpenDBRequest , ev : IDBVersionChangeEvent ) => any ) | null ;
2020
2054
onupgradeneeded : ( ( this : IDBOpenDBRequest , ev : IDBVersionChangeEvent ) => any ) | null ;
2021
2055
addEventListener < K extends keyof IDBOpenDBRequestEventMap > ( type : K , listener : ( this : IDBOpenDBRequest , ev : IDBOpenDBRequestEventMap [ K ] ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
2022
2056
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options ?: boolean | AddEventListenerOptions ) : void ;
@@ -2272,6 +2306,7 @@ interface NavigatorID {
2272
2306
readonly appName : string ;
2273
2307
/** @deprecated */
2274
2308
readonly appVersion : string ;
2309
+ /** @deprecated */
2275
2310
readonly platform : string ;
2276
2311
/** @deprecated */
2277
2312
readonly product : string ;
@@ -2533,6 +2568,7 @@ interface PermissionStatusEventMap {
2533
2568
}
2534
2569
2535
2570
interface PermissionStatus extends EventTarget {
2571
+ readonly name : string ;
2536
2572
onchange : ( ( this : PermissionStatus , ev : Event ) => any ) | null ;
2537
2573
readonly state : PermissionState ;
2538
2574
addEventListener < K extends keyof PermissionStatusEventMap > ( type : K , listener : ( this : PermissionStatus , ev : PermissionStatusEventMap [ K ] ) => any , options ?: boolean | AddEventListenerOptions ) : void ;
@@ -2644,6 +2680,7 @@ declare var PushSubscription: {
2644
2680
/** Available only in secure contexts. */
2645
2681
interface PushSubscriptionOptions {
2646
2682
readonly applicationServerKey : ArrayBuffer | null ;
2683
+ readonly userVisibleOnly : boolean ;
2647
2684
}
2648
2685
2649
2686
declare var PushSubscriptionOptions : {
@@ -2691,19 +2728,23 @@ declare var ReadableByteStreamController: {
2691
2728
interface ReadableStream < R = any > {
2692
2729
readonly locked : boolean ;
2693
2730
cancel ( reason ?: any ) : Promise < void > ;
2731
+ getReader ( options : { mode : "byob" } ) : ReadableStreamBYOBReader ;
2694
2732
getReader ( ) : ReadableStreamDefaultReader < R > ;
2733
+ getReader ( options ?: ReadableStreamGetReaderOptions ) : ReadableStreamReader < R > ;
2695
2734
pipeThrough < T > ( transform : ReadableWritablePair < T , R > , options ?: StreamPipeOptions ) : ReadableStream < T > ;
2696
2735
pipeTo ( destination : WritableStream < R > , options ?: StreamPipeOptions ) : Promise < void > ;
2697
2736
tee ( ) : [ ReadableStream < R > , ReadableStream < R > ] ;
2698
2737
}
2699
2738
2700
2739
declare var ReadableStream : {
2701
2740
prototype : ReadableStream ;
2741
+ new ( underlyingSource : UnderlyingByteSource , strategy ?: { highWaterMark ?: number } ) : ReadableStream < Uint8Array > ;
2742
+ new < R = any > ( underlyingSource : UnderlyingDefaultSource < R > , strategy ?: QueuingStrategy < R > ) : ReadableStream < R > ;
2702
2743
new < R = any > ( underlyingSource ?: UnderlyingSource < R > , strategy ?: QueuingStrategy < R > ) : ReadableStream < R > ;
2703
2744
} ;
2704
2745
2705
2746
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
2706
- read ( view : ArrayBufferView ) : Promise < ReadableStreamReadResult < ArrayBufferView > > ;
2747
+ read < T extends ArrayBufferView > ( view : T ) : Promise < ReadableStreamReadResult < T > > ;
2707
2748
releaseLock ( ) : void ;
2708
2749
}
2709
2750
@@ -2891,6 +2932,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2891
2932
"notificationclick" : NotificationEvent ;
2892
2933
"notificationclose" : NotificationEvent ;
2893
2934
"push" : PushEvent ;
2935
+ "pushsubscriptionchange" : Event ;
2894
2936
}
2895
2937
2896
2938
/** This ServiceWorker API interface represents the global execution context of a service worker. */
@@ -2904,6 +2946,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2904
2946
onnotificationclick : ( ( this : ServiceWorkerGlobalScope , ev : NotificationEvent ) => any ) | null ;
2905
2947
onnotificationclose : ( ( this : ServiceWorkerGlobalScope , ev : NotificationEvent ) => any ) | null ;
2906
2948
onpush : ( ( this : ServiceWorkerGlobalScope , ev : PushEvent ) => any ) | null ;
2949
+ onpushsubscriptionchange : ( ( this : ServiceWorkerGlobalScope , ev : Event ) => any ) | null ;
2907
2950
readonly registration : ServiceWorkerRegistration ;
2908
2951
readonly serviceWorker : ServiceWorker ;
2909
2952
skipWaiting ( ) : Promise < void > ;
@@ -3320,8 +3363,8 @@ interface WEBGL_lose_context {
3320
3363
interface WEBGL_multi_draw {
3321
3364
multiDrawArraysInstancedWEBGL ( mode : GLenum , firstsList : Int32Array | GLint [ ] , firstsOffset : GLuint , countsList : Int32Array | GLsizei [ ] , countsOffset : GLuint , instanceCountsList : Int32Array | GLsizei [ ] , instanceCountsOffset : GLuint , drawcount : GLsizei ) : void ;
3322
3365
multiDrawArraysWEBGL ( mode : GLenum , firstsList : Int32Array | GLint [ ] , firstsOffset : GLuint , countsList : Int32Array | GLsizei [ ] , countsOffset : GLuint , drawcount : GLsizei ) : void ;
3323
- multiDrawElementsInstancedWEBGL ( mode : GLenum , countsList : Int32Array | GLint [ ] , countsOffset : GLuint , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : GLuint , instanceCountsList : Int32Array | GLsizei [ ] , instanceCountsOffset : GLuint , drawcount : GLsizei ) : void ;
3324
- multiDrawElementsWEBGL ( mode : GLenum , countsList : Int32Array | GLint [ ] , countsOffset : GLuint , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : GLuint , drawcount : GLsizei ) : void ;
3366
+ multiDrawElementsInstancedWEBGL ( mode : GLenum , countsList : Int32Array | GLsizei [ ] , countsOffset : GLuint , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : GLuint , instanceCountsList : Int32Array | GLsizei [ ] , instanceCountsOffset : GLuint , drawcount : GLsizei ) : void ;
3367
+ multiDrawElementsWEBGL ( mode : GLenum , countsList : Int32Array | GLsizei [ ] , countsOffset : GLuint , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : GLuint , drawcount : GLsizei ) : void ;
3325
3368
}
3326
3369
3327
3370
interface WebGL2RenderingContext extends WebGL2RenderingContextBase , WebGL2RenderingContextOverloads , WebGLRenderingContextBase {
@@ -4719,35 +4762,39 @@ interface WebGLRenderingContextBase {
4719
4762
getBufferParameter ( target : GLenum , pname : GLenum ) : any ;
4720
4763
getContextAttributes ( ) : WebGLContextAttributes | null ;
4721
4764
getError ( ) : GLenum ;
4765
+ getExtension ( extensionName : "ANGLE_instanced_arrays" ) : ANGLE_instanced_arrays | null ;
4722
4766
getExtension ( extensionName : "EXT_blend_minmax" ) : EXT_blend_minmax | null ;
4723
4767
getExtension ( extensionName : "EXT_color_buffer_float" ) : EXT_color_buffer_float | null ;
4724
4768
getExtension ( extensionName : "EXT_color_buffer_half_float" ) : EXT_color_buffer_half_float | null ;
4725
4769
getExtension ( extensionName : "EXT_float_blend" ) : EXT_float_blend | null ;
4726
- getExtension ( extensionName : "EXT_texture_filter_anisotropic" ) : EXT_texture_filter_anisotropic | null ;
4727
4770
getExtension ( extensionName : "EXT_frag_depth" ) : EXT_frag_depth | null ;
4728
- getExtension ( extensionName : "EXT_shader_texture_lod" ) : EXT_shader_texture_lod | null ;
4729
4771
getExtension ( extensionName : "EXT_sRGB" ) : EXT_sRGB | null ;
4772
+ getExtension ( extensionName : "EXT_shader_texture_lod" ) : EXT_shader_texture_lod | null ;
4773
+ getExtension ( extensionName : "EXT_texture_compression_bptc" ) : EXT_texture_compression_bptc | null ;
4774
+ getExtension ( extensionName : "EXT_texture_compression_rgtc" ) : EXT_texture_compression_rgtc | null ;
4775
+ getExtension ( extensionName : "EXT_texture_filter_anisotropic" ) : EXT_texture_filter_anisotropic | null ;
4730
4776
getExtension ( extensionName : "KHR_parallel_shader_compile" ) : KHR_parallel_shader_compile | null ;
4777
+ getExtension ( extensionName : "OES_element_index_uint" ) : OES_element_index_uint | null ;
4778
+ getExtension ( extensionName : "OES_fbo_render_mipmap" ) : OES_fbo_render_mipmap | null ;
4779
+ getExtension ( extensionName : "OES_standard_derivatives" ) : OES_standard_derivatives | null ;
4780
+ getExtension ( extensionName : "OES_texture_float" ) : OES_texture_float | null ;
4781
+ getExtension ( extensionName : "OES_texture_float_linear" ) : OES_texture_float_linear | null ;
4782
+ getExtension ( extensionName : "OES_texture_half_float" ) : OES_texture_half_float | null ;
4783
+ getExtension ( extensionName : "OES_texture_half_float_linear" ) : OES_texture_half_float_linear | null ;
4731
4784
getExtension ( extensionName : "OES_vertex_array_object" ) : OES_vertex_array_object | null ;
4732
4785
getExtension ( extensionName : "OVR_multiview2" ) : OVR_multiview2 | null ;
4733
4786
getExtension ( extensionName : "WEBGL_color_buffer_float" ) : WEBGL_color_buffer_float | null ;
4734
4787
getExtension ( extensionName : "WEBGL_compressed_texture_astc" ) : WEBGL_compressed_texture_astc | null ;
4735
4788
getExtension ( extensionName : "WEBGL_compressed_texture_etc" ) : WEBGL_compressed_texture_etc | null ;
4736
4789
getExtension ( extensionName : "WEBGL_compressed_texture_etc1" ) : WEBGL_compressed_texture_etc1 | null ;
4790
+ getExtension ( extensionName : "WEBGL_compressed_texture_s3tc" ) : WEBGL_compressed_texture_s3tc | null ;
4737
4791
getExtension ( extensionName : "WEBGL_compressed_texture_s3tc_srgb" ) : WEBGL_compressed_texture_s3tc_srgb | null ;
4792
+ getExtension ( extensionName : "WEBGL_debug_renderer_info" ) : WEBGL_debug_renderer_info | null ;
4738
4793
getExtension ( extensionName : "WEBGL_debug_shaders" ) : WEBGL_debug_shaders | null ;
4794
+ getExtension ( extensionName : "WEBGL_depth_texture" ) : WEBGL_depth_texture | null ;
4739
4795
getExtension ( extensionName : "WEBGL_draw_buffers" ) : WEBGL_draw_buffers | null ;
4740
4796
getExtension ( extensionName : "WEBGL_lose_context" ) : WEBGL_lose_context | null ;
4741
- getExtension ( extensionName : "WEBGL_depth_texture" ) : WEBGL_depth_texture | null ;
4742
- getExtension ( extensionName : "WEBGL_debug_renderer_info" ) : WEBGL_debug_renderer_info | null ;
4743
- getExtension ( extensionName : "WEBGL_compressed_texture_s3tc" ) : WEBGL_compressed_texture_s3tc | null ;
4744
- getExtension ( extensionName : "OES_texture_half_float_linear" ) : OES_texture_half_float_linear | null ;
4745
- getExtension ( extensionName : "OES_texture_half_float" ) : OES_texture_half_float | null ;
4746
- getExtension ( extensionName : "OES_texture_float_linear" ) : OES_texture_float_linear | null ;
4747
- getExtension ( extensionName : "OES_texture_float" ) : OES_texture_float | null ;
4748
- getExtension ( extensionName : "OES_standard_derivatives" ) : OES_standard_derivatives | null ;
4749
- getExtension ( extensionName : "OES_element_index_uint" ) : OES_element_index_uint | null ;
4750
- getExtension ( extensionName : "ANGLE_instanced_arrays" ) : ANGLE_instanced_arrays | null ;
4797
+ getExtension ( extensionName : "WEBGL_multi_draw" ) : WEBGL_multi_draw | null ;
4751
4798
getExtension ( name : string ) : any ;
4752
4799
getFramebufferAttachmentParameter ( target : GLenum , attachment : GLenum , pname : GLenum ) : any ;
4753
4800
getParameter ( pname : GLenum ) : any ;
@@ -5876,13 +5923,13 @@ type NamedCurve = string;
5876
5923
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null ;
5877
5924
type PerformanceEntryList = PerformanceEntry [ ] ;
5878
5925
type PushMessageDataInit = BufferSource | string ;
5879
- type ReadableStreamController < T > = ReadableStreamDefaultController < T > ;
5880
- type ReadableStreamReadResult < T > = ReadableStreamReadValueResult < T > | ReadableStreamReadDoneResult ;
5881
- type ReadableStreamReader < T > = ReadableStreamDefaultReader < T > ;
5926
+ type ReadableStreamController < T > = ReadableStreamDefaultController < T > | ReadableByteStreamController ;
5927
+ type ReadableStreamReadResult < T > = ReadableStreamReadValueResult < T > | ReadableStreamReadDoneResult < T > ;
5928
+ type ReadableStreamReader < T > = ReadableStreamDefaultReader < T > | ReadableStreamBYOBReader ;
5882
5929
type RequestInfo = Request | string ;
5883
5930
type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas ;
5884
5931
type TimerHandler = string | Function ;
5885
- type Transferable = ArrayBuffer | MessagePort | ImageBitmap ;
5932
+ type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer ;
5886
5933
type Uint32List = Uint32Array | GLuint [ ] ;
5887
5934
type VibratePattern = number | number [ ] ;
5888
5935
type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string ;
@@ -5916,6 +5963,8 @@ type PredefinedColorSpace = "display-p3" | "srgb";
5916
5963
type PremultiplyAlpha = "default" | "none" | "premultiply" ;
5917
5964
type PushEncryptionKeyName = "auth" | "p256dh" ;
5918
5965
type RTCEncodedVideoFrameType = "delta" | "empty" | "key" ;
5966
+ type ReadableStreamReaderMode = "byob" ;
5967
+ type ReadableStreamType = "bytes" ;
5919
5968
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url" ;
5920
5969
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" ;
5921
5970
type RequestCredentials = "include" | "omit" | "same-origin" ;
0 commit comments