Skip to content

Commit 5bd485e

Browse files
Bashamegasaschanaz
andauthored
Add more comments (microsoft#1993)
Co-authored-by: saschanaz <[email protected]>
1 parent 751bb66 commit 5bd485e

31 files changed

+68330
-23238
lines changed

baselines/audioworklet.generated.d.ts

Lines changed: 549 additions & 164 deletions
Large diffs are not rendered by default.

baselines/dom.generated.d.ts

Lines changed: 12522 additions & 4202 deletions
Large diffs are not rendered by default.

baselines/dom.iterable.generated.d.ts

Lines changed: 83 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,29 @@
33
/////////////////////////////
44

55
interface AudioParam {
6-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
6+
/**
7+
* The **`setValueCurveAtTime()`** method of the following a curve defined by a list of values.
8+
*
9+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime)
10+
*/
711
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
812
}
913

1014
interface AudioParamMap extends ReadonlyMap<string, AudioParam> {
1115
}
1216

1317
interface BaseAudioContext {
14-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter) */
18+
/**
19+
* The **`createIIRFilter()`** method of the BaseAudioContext interface creates an IIRFilterNode, which represents a general **infinite impulse response** (IIR) filter which can be configured to serve as various types of filter.
20+
*
21+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter)
22+
*/
1523
createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode;
16-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave) */
24+
/**
25+
* The `createPeriodicWave()` method of the BaseAudioContext interface is used to create a PeriodicWave.
26+
*
27+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave)
28+
*/
1729
createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
1830
}
1931

@@ -51,7 +63,11 @@ interface CSSUnparsedValue {
5163
}
5264

5365
interface Cache {
54-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */
66+
/**
67+
* The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.
68+
*
69+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
70+
*/
5571
addAll(requests: Iterable<RequestInfo>): Promise<void>;
5672
}
5773

@@ -153,7 +169,7 @@ interface HighlightRegistry extends Map<string, Highlight> {
153169

154170
interface IDBDatabase {
155171
/**
156-
* 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.
172+
* The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store.
157173
*
158174
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
159175
*/
@@ -162,9 +178,7 @@ interface IDBDatabase {
162178

163179
interface IDBObjectStore {
164180
/**
165-
* 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.
166-
*
167-
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
181+
* The **`createIndex()`** method of the field/column defining a new data point for each database record to contain.
168182
*
169183
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
170184
*/
@@ -179,7 +193,11 @@ interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
179193
}
180194

181195
interface MIDIOutput {
182-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send) */
196+
/**
197+
* The **`send()`** method of the MIDIOutput interface queues messages for the corresponding MIDI port.
198+
*
199+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send)
200+
*/
183201
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
184202
}
185203

@@ -216,12 +234,17 @@ interface NamedNodeMap {
216234

217235
interface Navigator {
218236
/**
237+
* The **`requestMediaKeySystemAccess()`** method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
219238
* Available only in secure contexts.
220239
*
221240
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
222241
*/
223242
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
224-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate) */
243+
/**
244+
* The **`vibrate()`** method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists.
245+
*
246+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
247+
*/
225248
vibrate(pattern: Iterable<number>): boolean;
226249
}
227250

@@ -254,7 +277,11 @@ interface PluginArray {
254277
}
255278

256279
interface RTCRtpTransceiver {
257-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences) */
280+
/**
281+
* The **`setCodecPreferences()`** method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding _received_ data, in order of decreasing preference.
282+
*
283+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences)
284+
*/
258285
setCodecPreferences(codecs: Iterable<RTCRtpCodec>): void;
259286
}
260287

@@ -309,17 +336,33 @@ interface StyleSheetList {
309336
}
310337

311338
interface SubtleCrypto {
312-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
339+
/**
340+
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
341+
*
342+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
343+
*/
313344
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
314-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
345+
/**
346+
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
347+
*
348+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
349+
*/
315350
generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
316351
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
317352
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
318353
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
319-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
354+
/**
355+
* The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
356+
*
357+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
358+
*/
320359
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
321360
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
322-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
361+
/**
362+
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
363+
*
364+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
365+
*/
323366
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
324367
}
325368

@@ -353,18 +396,38 @@ interface ViewTransitionTypeSet extends Set<string> {
353396
}
354397

355398
interface WEBGL_draw_buffers {
356-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */
399+
/**
400+
* The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written.
401+
*
402+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL)
403+
*/
357404
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
358405
}
359406

360407
interface WEBGL_multi_draw {
361-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */
408+
/**
409+
* The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
410+
*
411+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL)
412+
*/
362413
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
363-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */
414+
/**
415+
* The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data.
416+
*
417+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL)
418+
*/
364419
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
365-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */
420+
/**
421+
* The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
422+
*
423+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL)
424+
*/
366425
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
367-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */
426+
/**
427+
* The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data.
428+
*
429+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL)
430+
*/
368431
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
369432
}
370433

0 commit comments

Comments
 (0)