@types/web 0.0.81 → 0.0.82

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.
package/README.md CHANGED
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.81 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.81.
50
+ You can read what changed in version 0.0.82 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.82.
package/index.d.ts CHANGED
@@ -709,6 +709,19 @@ interface LockOptions {
709
709
  steal?: boolean;
710
710
  }
711
711
 
712
+ interface MIDIConnectionEventInit extends EventInit {
713
+ port?: MIDIPort;
714
+ }
715
+
716
+ interface MIDIMessageEventInit extends EventInit {
717
+ data?: Uint8Array;
718
+ }
719
+
720
+ interface MIDIOptions {
721
+ software?: boolean;
722
+ sysex?: boolean;
723
+ }
724
+
712
725
  interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
713
726
  configuration?: MediaDecodingConfiguration;
714
727
  }
@@ -4650,6 +4663,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
4650
4663
  createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
4651
4664
  createEvent(eventInterface: "InputEvent"): InputEvent;
4652
4665
  createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent;
4666
+ createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent;
4667
+ createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEvent;
4653
4668
  createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
4654
4669
  createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
4655
4670
  createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
@@ -9276,6 +9291,126 @@ declare var LockManager: {
9276
9291
  new(): LockManager;
9277
9292
  };
9278
9293
 
9294
+ interface MIDIAccessEventMap {
9295
+ "statechange": Event;
9296
+ }
9297
+
9298
+ /** Available only in secure contexts. */
9299
+ interface MIDIAccess extends EventTarget {
9300
+ readonly inputs: MIDIInputMap;
9301
+ onstatechange: ((this: MIDIAccess, ev: Event) => any) | null;
9302
+ readonly outputs: MIDIOutputMap;
9303
+ readonly sysexEnabled: boolean;
9304
+ addEventListener<K extends keyof MIDIAccessEventMap>(type: K, listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9305
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9306
+ removeEventListener<K extends keyof MIDIAccessEventMap>(type: K, listener: (this: MIDIAccess, ev: MIDIAccessEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
9307
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9308
+ }
9309
+
9310
+ declare var MIDIAccess: {
9311
+ prototype: MIDIAccess;
9312
+ new(): MIDIAccess;
9313
+ };
9314
+
9315
+ /** Available only in secure contexts. */
9316
+ interface MIDIConnectionEvent extends Event {
9317
+ readonly port: MIDIPort;
9318
+ }
9319
+
9320
+ declare var MIDIConnectionEvent: {
9321
+ prototype: MIDIConnectionEvent;
9322
+ new(type: string, eventInitDict?: MIDIConnectionEventInit): MIDIConnectionEvent;
9323
+ };
9324
+
9325
+ interface MIDIInputEventMap extends MIDIPortEventMap {
9326
+ "midimessage": Event;
9327
+ }
9328
+
9329
+ /** Available only in secure contexts. */
9330
+ interface MIDIInput extends MIDIPort {
9331
+ onmidimessage: ((this: MIDIInput, ev: Event) => any) | null;
9332
+ addEventListener<K extends keyof MIDIInputEventMap>(type: K, listener: (this: MIDIInput, ev: MIDIInputEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9333
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9334
+ removeEventListener<K extends keyof MIDIInputEventMap>(type: K, listener: (this: MIDIInput, ev: MIDIInputEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
9335
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9336
+ }
9337
+
9338
+ declare var MIDIInput: {
9339
+ prototype: MIDIInput;
9340
+ new(): MIDIInput;
9341
+ };
9342
+
9343
+ /** Available only in secure contexts. */
9344
+ interface MIDIInputMap {
9345
+ forEach(callbackfn: (value: MIDIInput, key: string, parent: MIDIInputMap) => void, thisArg?: any): void;
9346
+ }
9347
+
9348
+ declare var MIDIInputMap: {
9349
+ prototype: MIDIInputMap;
9350
+ new(): MIDIInputMap;
9351
+ };
9352
+
9353
+ /** Available only in secure contexts. */
9354
+ interface MIDIMessageEvent extends Event {
9355
+ readonly data: Uint8Array;
9356
+ }
9357
+
9358
+ declare var MIDIMessageEvent: {
9359
+ prototype: MIDIMessageEvent;
9360
+ new(type: string, eventInitDict?: MIDIMessageEventInit): MIDIMessageEvent;
9361
+ };
9362
+
9363
+ /** Available only in secure contexts. */
9364
+ interface MIDIOutput extends MIDIPort {
9365
+ send(data: number[], timestamp?: DOMHighResTimeStamp): void;
9366
+ addEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9367
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9368
+ removeEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIOutput, ev: MIDIPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
9369
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9370
+ }
9371
+
9372
+ declare var MIDIOutput: {
9373
+ prototype: MIDIOutput;
9374
+ new(): MIDIOutput;
9375
+ };
9376
+
9377
+ /** Available only in secure contexts. */
9378
+ interface MIDIOutputMap {
9379
+ forEach(callbackfn: (value: MIDIOutput, key: string, parent: MIDIOutputMap) => void, thisArg?: any): void;
9380
+ }
9381
+
9382
+ declare var MIDIOutputMap: {
9383
+ prototype: MIDIOutputMap;
9384
+ new(): MIDIOutputMap;
9385
+ };
9386
+
9387
+ interface MIDIPortEventMap {
9388
+ "statechange": Event;
9389
+ }
9390
+
9391
+ /** Available only in secure contexts. */
9392
+ interface MIDIPort extends EventTarget {
9393
+ readonly connection: MIDIPortConnectionState;
9394
+ readonly id: string;
9395
+ readonly manufacturer: string | null;
9396
+ readonly name: string | null;
9397
+ onstatechange: ((this: MIDIPort, ev: Event) => any) | null;
9398
+ readonly state: MIDIPortDeviceState;
9399
+ readonly type: MIDIPortType;
9400
+ readonly version: string | null;
9401
+ close(): Promise<MIDIPort>;
9402
+ open(): Promise<MIDIPort>;
9403
+ addEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIPort, ev: MIDIPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9404
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9405
+ removeEventListener<K extends keyof MIDIPortEventMap>(type: K, listener: (this: MIDIPort, ev: MIDIPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
9406
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9407
+ }
9408
+
9409
+ declare var MIDIPort: {
9410
+ prototype: MIDIPort;
9411
+ new(): MIDIPort;
9412
+ };
9413
+
9279
9414
  interface MathMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
9280
9415
  }
9281
9416
 
@@ -9988,6 +10123,8 @@ interface Navigator extends NavigatorAutomationInformation, NavigatorConcurrentH
9988
10123
  canShare(data?: ShareData): boolean;
9989
10124
  getGamepads(): (Gamepad | null)[];
9990
10125
  /** Available only in secure contexts. */
10126
+ requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>;
10127
+ /** Available only in secure contexts. */
9991
10128
  requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
9992
10129
  sendBeacon(url: string | URL, data?: BodyInit | null): boolean;
9993
10130
  /** Available only in secure contexts. */
@@ -18399,6 +18536,9 @@ type KeyType = "private" | "public" | "secret";
18399
18536
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
18400
18537
  type LineAlignSetting = "center" | "end" | "start";
18401
18538
  type LockMode = "exclusive" | "shared";
18539
+ type MIDIPortConnectionState = "closed" | "open" | "pending";
18540
+ type MIDIPortDeviceState = "connected" | "disconnected";
18541
+ type MIDIPortType = "input" | "output";
18402
18542
  type MediaDecodingType = "file" | "media-source" | "webrtc";
18403
18543
  type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
18404
18544
  type MediaEncodingType = "record" | "webrtc";
package/iterable.d.ts CHANGED
@@ -121,6 +121,16 @@ interface IDBObjectStore {
121
121
  createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
122
122
  }
123
123
 
124
+ interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
125
+ }
126
+
127
+ interface MIDIOutput {
128
+ send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
129
+ }
130
+
131
+ interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
132
+ }
133
+
124
134
  interface MediaKeyStatusMap {
125
135
  [Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
126
136
  entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],