typescript 4.6.0-dev.20220117 → 4.6.0-dev.20220121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,8 +90,8 @@ interface CloseEventInit extends EventInit {
90
90
  }
91
91
 
92
92
  interface CryptoKeyPair {
93
- privateKey?: CryptoKey;
94
- publicKey?: CryptoKey;
93
+ privateKey: CryptoKey;
94
+ publicKey: CryptoKey;
95
95
  }
96
96
 
97
97
  interface CustomEventInit<T = any> extends EventInit {
@@ -210,6 +210,18 @@ interface FilePropertyBag extends BlobPropertyBag {
210
210
  lastModified?: number;
211
211
  }
212
212
 
213
+ interface FileSystemGetDirectoryOptions {
214
+ create?: boolean;
215
+ }
216
+
217
+ interface FileSystemGetFileOptions {
218
+ create?: boolean;
219
+ }
220
+
221
+ interface FileSystemRemoveOptions {
222
+ recursive?: boolean;
223
+ }
224
+
213
225
  interface FontFaceDescriptors {
214
226
  display?: string;
215
227
  featureSettings?: string;
@@ -373,7 +385,7 @@ interface NotificationOptions {
373
385
  requireInteraction?: boolean;
374
386
  silent?: boolean;
375
387
  tag?: string;
376
- timestamp?: DOMTimeStamp;
388
+ timestamp?: EpochTimeStamp;
377
389
  vibrate?: VibratePattern;
378
390
  }
379
391
 
@@ -422,7 +434,7 @@ interface PushEventInit extends ExtendableEventInit {
422
434
 
423
435
  interface PushSubscriptionJSON {
424
436
  endpoint?: string;
425
- expirationTime?: DOMTimeStamp | null;
437
+ expirationTime?: EpochTimeStamp | null;
426
438
  keys?: Record<string, string>;
427
439
  }
428
440
 
@@ -578,7 +590,7 @@ interface StreamPipeOptions {
578
590
  }
579
591
 
580
592
  interface StructuredSerializeOptions {
581
- transfer?: any[];
593
+ transfer?: Transferable[];
582
594
  }
583
595
 
584
596
  interface TextDecodeOptions {
@@ -665,7 +677,7 @@ interface AbortController {
665
677
  /** Returns the AbortSignal object associated with this object. */
666
678
  readonly signal: AbortSignal;
667
679
  /** 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;
680
+ abort(reason?: any): void;
669
681
  }
670
682
 
671
683
  declare var AbortController: {
@@ -691,7 +703,7 @@ interface AbortSignal extends EventTarget {
691
703
  declare var AbortSignal: {
692
704
  prototype: AbortSignal;
693
705
  new(): AbortSignal;
694
- // abort(): AbortSignal; - To be re-added in the future
706
+ abort(reason?: any): AbortSignal;
695
707
  };
696
708
 
697
709
  interface AbstractWorkerEventMap {
@@ -905,6 +917,8 @@ interface Crypto {
905
917
  /** Available only in secure contexts. */
906
918
  readonly subtle: SubtleCrypto;
907
919
  getRandomValues<T extends ArrayBufferView | null>(array: T): T;
920
+ /** Available only in secure contexts. */
921
+ randomUUID(): string;
908
922
  }
909
923
 
910
924
  declare var Crypto: {
@@ -1358,8 +1372,10 @@ interface EventSource extends EventTarget {
1358
1372
  readonly CONNECTING: number;
1359
1373
  readonly OPEN: number;
1360
1374
  addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1375
+ addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void;
1361
1376
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1362
1377
  removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1378
+ removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void;
1363
1379
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1364
1380
  }
1365
1381
 
@@ -1518,6 +1534,41 @@ declare var FileReaderSync: {
1518
1534
  new(): FileReaderSync;
1519
1535
  };
1520
1536
 
1537
+ /** Available only in secure contexts. */
1538
+ interface FileSystemDirectoryHandle extends FileSystemHandle {
1539
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1540
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1541
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
1542
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
1543
+ }
1544
+
1545
+ declare var FileSystemDirectoryHandle: {
1546
+ prototype: FileSystemDirectoryHandle;
1547
+ new(): FileSystemDirectoryHandle;
1548
+ };
1549
+
1550
+ /** Available only in secure contexts. */
1551
+ interface FileSystemFileHandle extends FileSystemHandle {
1552
+ getFile(): Promise<File>;
1553
+ }
1554
+
1555
+ declare var FileSystemFileHandle: {
1556
+ prototype: FileSystemFileHandle;
1557
+ new(): FileSystemFileHandle;
1558
+ };
1559
+
1560
+ /** Available only in secure contexts. */
1561
+ interface FileSystemHandle {
1562
+ readonly kind: FileSystemHandleKind;
1563
+ readonly name: string;
1564
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
1565
+ }
1566
+
1567
+ declare var FileSystemHandle: {
1568
+ prototype: FileSystemHandle;
1569
+ new(): FileSystemHandle;
1570
+ };
1571
+
1521
1572
  interface FontFace {
1522
1573
  ascentOverride: string;
1523
1574
  descentOverride: string;
@@ -1981,6 +2032,7 @@ interface IDBTransactionEventMap {
1981
2032
  interface IDBTransaction extends EventTarget {
1982
2033
  /** Returns the transaction's connection. */
1983
2034
  readonly db: IDBDatabase;
2035
+ readonly durability: IDBTransactionDurability;
1984
2036
  /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
1985
2037
  readonly error: DOMException | null;
1986
2038
  /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
@@ -2481,7 +2533,7 @@ declare var PushEvent: {
2481
2533
  */
2482
2534
  interface PushManager {
2483
2535
  getSubscription(): Promise<PushSubscription | null>;
2484
- permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
2536
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
2485
2537
  subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
2486
2538
  }
2487
2539
 
@@ -2798,6 +2850,7 @@ declare var SharedWorkerGlobalScope: {
2798
2850
  /** Available only in secure contexts. */
2799
2851
  interface StorageManager {
2800
2852
  estimate(): Promise<StorageEstimate>;
2853
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
2801
2854
  persisted(): Promise<boolean>;
2802
2855
  }
2803
2856
 
@@ -3134,6 +3187,13 @@ interface WEBGL_lose_context {
3134
3187
  restoreContext(): void;
3135
3188
  }
3136
3189
 
3190
+ interface WEBGL_multi_draw {
3191
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3192
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
3193
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3194
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
3195
+ }
3196
+
3137
3197
  interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
3138
3198
  }
3139
3199
 
@@ -5075,7 +5135,7 @@ declare var WebSocket: {
5075
5135
  /** 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
5136
  interface WindowClient extends Client {
5077
5137
  readonly focused: boolean;
5078
- readonly visibilityState: VisibilityState;
5138
+ readonly visibilityState: DocumentVisibilityState;
5079
5139
  focus(): Promise<WindowClient>;
5080
5140
  navigate(url: string | URL): Promise<WindowClient | null>;
5081
5141
  }
@@ -5096,12 +5156,13 @@ interface WindowOrWorkerGlobalScope {
5096
5156
  readonly performance: Performance;
5097
5157
  atob(data: string): string;
5098
5158
  btoa(data: string): string;
5099
- clearInterval(handle?: number): void;
5100
- clearTimeout(handle?: number): void;
5159
+ clearInterval(id?: number): void;
5160
+ clearTimeout(id?: number): void;
5101
5161
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5102
5162
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5103
5163
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5104
5164
  queueMicrotask(callback: VoidFunction): void;
5165
+ reportError(e: any): void;
5105
5166
  setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5106
5167
  setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5107
5168
  }
@@ -5518,7 +5579,7 @@ declare namespace WebAssembly {
5518
5579
 
5519
5580
  type ImportExportKind = "function" | "global" | "memory" | "table";
5520
5581
  type TableKind = "anyfunc" | "externref";
5521
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
5582
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
5522
5583
  type ExportValue = Function | Global | Memory | Table;
5523
5584
  type Exports = Record<string, ExportValue>;
5524
5585
  type ImportValue = ExportValue | number;
@@ -5630,12 +5691,13 @@ declare var origin: string;
5630
5691
  declare var performance: Performance;
5631
5692
  declare function atob(data: string): string;
5632
5693
  declare function btoa(data: string): string;
5633
- declare function clearInterval(handle?: number): void;
5634
- declare function clearTimeout(handle?: number): void;
5694
+ declare function clearInterval(id?: number): void;
5695
+ declare function clearTimeout(id?: number): void;
5635
5696
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5636
5697
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5637
5698
  declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5638
5699
  declare function queueMicrotask(callback: VoidFunction): void;
5700
+ declare function reportError(e: any): void;
5639
5701
  declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5640
5702
  declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5641
5703
  declare function cancelAnimationFrame(handle: number): void;
@@ -5652,7 +5714,7 @@ type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
5652
5714
  type BufferSource = ArrayBufferView | ArrayBuffer;
5653
5715
  type CanvasImageSource = ImageBitmap | OffscreenCanvas;
5654
5716
  type DOMHighResTimeStamp = number;
5655
- type DOMTimeStamp = number;
5717
+ type EpochTimeStamp = number;
5656
5718
  type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
5657
5719
  type Float32List = Float32Array | GLfloat[];
5658
5720
  type FormDataEntryValue = File | string;
@@ -5693,13 +5755,16 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker";
5693
5755
  type ColorGamut = "p3" | "rec2020" | "srgb";
5694
5756
  type ColorSpaceConversion = "default" | "none";
5695
5757
  type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5758
+ type DocumentVisibilityState = "hidden" | "visible";
5696
5759
  type EndingType = "native" | "transparent";
5760
+ type FileSystemHandleKind = "directory" | "file";
5697
5761
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
5698
5762
  type FontFaceSetLoadStatus = "loaded" | "loading";
5699
5763
  type FrameType = "auxiliary" | "nested" | "none" | "top-level";
5700
5764
  type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
5701
5765
  type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
5702
5766
  type IDBRequestReadyState = "done" | "pending";
5767
+ type IDBTransactionDurability = "default" | "relaxed" | "strict";
5703
5768
  type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
5704
5769
  type ImageOrientation = "flipY" | "none";
5705
5770
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
@@ -5714,7 +5779,6 @@ type PermissionState = "denied" | "granted" | "prompt";
5714
5779
  type PredefinedColorSpace = "display-p3" | "srgb";
5715
5780
  type PremultiplyAlpha = "default" | "none" | "premultiply";
5716
5781
  type PushEncryptionKeyName = "auth" | "p256dh";
5717
- type PushPermissionState = "denied" | "granted" | "prompt";
5718
5782
  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
5783
  type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
5720
5784
  type RequestCredentials = "include" | "omit" | "same-origin";
@@ -5727,7 +5791,6 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
5727
5791
  type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
5728
5792
  type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
5729
5793
  type TransferFunction = "hlg" | "pq" | "srgb";
5730
- type VisibilityState = "hidden" | "visible";
5731
5794
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
5732
5795
  type WorkerType = "classic" | "module";
5733
5796
  type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
@@ -100,6 +100,13 @@ interface WEBGL_draw_buffers {
100
100
  drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
101
101
  }
102
102
 
103
+ interface WEBGL_multi_draw {
104
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
105
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
106
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
107
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
108
+ }
109
+
103
110
  interface WebGL2RenderingContextBase {
104
111
  clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
105
112
  clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
package/lib/protocol.d.ts CHANGED
@@ -2900,6 +2900,7 @@ declare namespace ts.server.protocol {
2900
2900
  externalModuleName = "external module name",
2901
2901
  /**
2902
2902
  * <JsxTagName attribute1 attribute2={0} />
2903
+ * @deprecated
2903
2904
  */
2904
2905
  jsxAttribute = "JSX attribute",
2905
2906
  /** String literal */