@types/sharedworker 0.0.60 → 0.0.64

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +104 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.60 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.60.
31
+ You can read what changed in version 0.0.64 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.64.
package/index.d.ts CHANGED
@@ -167,6 +167,18 @@ interface FilePropertyBag extends BlobPropertyBag {
167
167
  lastModified?: number;
168
168
  }
169
169
 
170
+ interface FileSystemGetDirectoryOptions {
171
+ create?: boolean;
172
+ }
173
+
174
+ interface FileSystemGetFileOptions {
175
+ create?: boolean;
176
+ }
177
+
178
+ interface FileSystemRemoveOptions {
179
+ recursive?: boolean;
180
+ }
181
+
170
182
  interface FontFaceDescriptors {
171
183
  display?: string;
172
184
  featureSettings?: string;
@@ -267,6 +279,24 @@ interface KeyAlgorithm {
267
279
  name: string;
268
280
  }
269
281
 
282
+ interface LockInfo {
283
+ clientId?: string;
284
+ mode?: LockMode;
285
+ name?: string;
286
+ }
287
+
288
+ interface LockManagerSnapshot {
289
+ held?: LockInfo[];
290
+ pending?: LockInfo[];
291
+ }
292
+
293
+ interface LockOptions {
294
+ ifAvailable?: boolean;
295
+ mode?: LockMode;
296
+ signal?: AbortSignal;
297
+ steal?: boolean;
298
+ }
299
+
270
300
  interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
271
301
  configuration?: MediaDecodingConfiguration;
272
302
  }
@@ -526,7 +556,7 @@ interface StreamPipeOptions {
526
556
  }
527
557
 
528
558
  interface StructuredSerializeOptions {
529
- transfer?: any[];
559
+ transfer?: Transferable[];
530
560
  }
531
561
 
532
562
  interface TextDecodeOptions {
@@ -639,7 +669,7 @@ interface AbortSignal extends EventTarget {
639
669
  declare var AbortSignal: {
640
670
  prototype: AbortSignal;
641
671
  new(): AbortSignal;
642
- abort(reason?: any): AbortSignal;
672
+ // abort(reason?: any): AbortSignal; - To be re-added in the future
643
673
  };
644
674
 
645
675
  interface AbstractWorkerEventMap {
@@ -1372,6 +1402,43 @@ declare var FileReaderSync: {
1372
1402
  new(): FileReaderSync;
1373
1403
  };
1374
1404
 
1405
+ /** Available only in secure contexts. */
1406
+ interface FileSystemDirectoryHandle extends FileSystemHandle {
1407
+ readonly kind: "directory";
1408
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1409
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1410
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
1411
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
1412
+ }
1413
+
1414
+ declare var FileSystemDirectoryHandle: {
1415
+ prototype: FileSystemDirectoryHandle;
1416
+ new(): FileSystemDirectoryHandle;
1417
+ };
1418
+
1419
+ /** Available only in secure contexts. */
1420
+ interface FileSystemFileHandle extends FileSystemHandle {
1421
+ readonly kind: "file";
1422
+ getFile(): Promise<File>;
1423
+ }
1424
+
1425
+ declare var FileSystemFileHandle: {
1426
+ prototype: FileSystemFileHandle;
1427
+ new(): FileSystemFileHandle;
1428
+ };
1429
+
1430
+ /** Available only in secure contexts. */
1431
+ interface FileSystemHandle {
1432
+ readonly kind: FileSystemHandleKind;
1433
+ readonly name: string;
1434
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
1435
+ }
1436
+
1437
+ declare var FileSystemHandle: {
1438
+ prototype: FileSystemHandle;
1439
+ new(): FileSystemHandle;
1440
+ };
1441
+
1375
1442
  interface FontFace {
1376
1443
  ascentOverride: string;
1377
1444
  descentOverride: string;
@@ -1916,6 +1983,29 @@ interface KHR_parallel_shader_compile {
1916
1983
  readonly COMPLETION_STATUS_KHR: GLenum;
1917
1984
  }
1918
1985
 
1986
+ /** Available only in secure contexts. */
1987
+ interface Lock {
1988
+ readonly mode: LockMode;
1989
+ readonly name: string;
1990
+ }
1991
+
1992
+ declare var Lock: {
1993
+ prototype: Lock;
1994
+ new(): Lock;
1995
+ };
1996
+
1997
+ /** Available only in secure contexts. */
1998
+ interface LockManager {
1999
+ query(): Promise<LockManagerSnapshot>;
2000
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
2001
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
2002
+ }
2003
+
2004
+ declare var LockManager: {
2005
+ prototype: LockManager;
2006
+ new(): LockManager;
2007
+ };
2008
+
1919
2009
  interface MediaCapabilities {
1920
2010
  decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
1921
2011
  encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -2578,6 +2668,7 @@ declare var SharedWorkerGlobalScope: {
2578
2668
  /** Available only in secure contexts. */
2579
2669
  interface StorageManager {
2580
2670
  estimate(): Promise<StorageEstimate>;
2671
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
2581
2672
  persisted(): Promise<boolean>;
2582
2673
  }
2583
2674
 
@@ -4870,8 +4961,8 @@ interface WindowOrWorkerGlobalScope {
4870
4961
  readonly performance: Performance;
4871
4962
  atob(data: string): string;
4872
4963
  btoa(data: string): string;
4873
- clearInterval(handle?: number): void;
4874
- clearTimeout(handle?: number): void;
4964
+ clearInterval(id?: number): void;
4965
+ clearTimeout(id?: number): void;
4875
4966
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
4876
4967
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
4877
4968
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
@@ -5293,7 +5384,7 @@ declare namespace WebAssembly {
5293
5384
 
5294
5385
  type ImportExportKind = "function" | "global" | "memory" | "table";
5295
5386
  type TableKind = "anyfunc" | "externref";
5296
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
5387
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
5297
5388
  type ExportValue = Function | Global | Memory | Table;
5298
5389
  type Exports = Record<string, ExportValue>;
5299
5390
  type ImportValue = ExportValue | number;
@@ -5307,6 +5398,10 @@ declare namespace WebAssembly {
5307
5398
  function validate(bytes: BufferSource): boolean;
5308
5399
  }
5309
5400
 
5401
+ interface LockGrantedCallback {
5402
+ (lock: Lock | null): any;
5403
+ }
5404
+
5310
5405
  interface OnErrorEventHandlerNonNull {
5311
5406
  (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5312
5407
  }
@@ -5397,8 +5492,8 @@ declare var origin: string;
5397
5492
  declare var performance: Performance;
5398
5493
  declare function atob(data: string): string;
5399
5494
  declare function btoa(data: string): string;
5400
- declare function clearInterval(handle?: number): void;
5401
- declare function clearTimeout(handle?: number): void;
5495
+ declare function clearInterval(id?: number): void;
5496
+ declare function clearTimeout(id?: number): void;
5402
5497
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5403
5498
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5404
5499
  declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
@@ -5459,6 +5554,7 @@ type ColorGamut = "p3" | "rec2020" | "srgb";
5459
5554
  type ColorSpaceConversion = "default" | "none";
5460
5555
  type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5461
5556
  type EndingType = "native" | "transparent";
5557
+ type FileSystemHandleKind = "directory" | "file";
5462
5558
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
5463
5559
  type FontFaceSetLoadStatus = "loaded" | "loading";
5464
5560
  type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
@@ -5470,6 +5566,7 @@ type ImageOrientation = "flipY" | "none";
5470
5566
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5471
5567
  type KeyType = "private" | "public" | "secret";
5472
5568
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5569
+ type LockMode = "exclusive" | "shared";
5473
5570
  type MediaDecodingType = "file" | "media-source" | "webrtc";
5474
5571
  type MediaEncodingType = "record" | "webrtc";
5475
5572
  type NotificationDirection = "auto" | "ltr" | "rtl";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.60",
3
+ "version": "0.0.64",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],