Skip to content

Commit 6744c24

Browse files
committed
Update MDN comments to format boolean values as code in generated TypeScript definitions
1 parent 7da2361 commit 6744c24

21 files changed

+762
-760
lines changed

baselines/audioworklet.generated.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ interface AbortSignalEventMap {
221221
*/
222222
interface AbortSignal extends EventTarget {
223223
/**
224-
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).
224+
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (`true`) or not (`false`).
225225
*
226226
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
227227
*/
@@ -559,7 +559,7 @@ interface Event {
559559
*/
560560
readonly bubbles: boolean;
561561
/**
562-
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
562+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to `true` before returning from an event handler prevents propagation of the event. In later implementations, setting this to `false` does nothing. See Browser compatibility for details.
563563
* @deprecated
564564
*
565565
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
@@ -596,7 +596,7 @@ interface Event {
596596
*/
597597
readonly eventPhase: number;
598598
/**
599-
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.
599+
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is `true` when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to `false` in user agents.
600600
*
601601
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
602602
*/
@@ -1628,7 +1628,7 @@ declare namespace WebAssembly {
16281628
*/
16291629
interface Memory {
16301630
/**
1631-
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
1631+
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: `true`, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
16321632
*
16331633
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer)
16341634
*/
@@ -1821,7 +1821,7 @@ declare namespace WebAssembly {
18211821
*/
18221822
interface Console {
18231823
/**
1824-
* The **`console.assert()`** static method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
1824+
* The **`console.assert()`** static method writes an error message to the console if the assertion is `false`. If the assertion is `true`, nothing happens.
18251825
*
18261826
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static)
18271827
*/

baselines/dom.generated.d.ts

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

baselines/serviceworker.generated.d.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ interface AbortSignalEventMap {
938938
*/
939939
interface AbortSignal extends EventTarget {
940940
/**
941-
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).
941+
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (`true`) or not (`false`).
942942
*
943943
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
944944
*/
@@ -1373,7 +1373,7 @@ interface CSSNumericValue extends CSSStyleValue {
13731373
*/
13741374
div(...values: CSSNumberish[]): CSSNumericValue;
13751375
/**
1376-
* The **`equals()`** method of the CSSNumericValue interface returns a boolean indicating whether the passed value are strictly equal. To return a value of true, all passed values must be of the same type and value and must be in the same order. This allows structural equality to be tested quickly.
1376+
* The **`equals()`** method of the CSSNumericValue interface returns a boolean indicating whether the passed value are strictly equal. To return a value of `true`, all passed values must be of the same type and value and must be in the same order. This allows structural equality to be tested quickly.
13771377
*
13781378
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/equals)
13791379
*/
@@ -1773,7 +1773,7 @@ interface Cache {
17731773
*/
17741774
addAll(requests: RequestInfo[]): Promise<void>;
17751775
/**
1776-
* The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to true. If no Cache entry is found, it resolves to false.
1776+
* The **`delete()`** method of the Cache interface finds the Cache entry whose key is the request, and if found, deletes the Cache entry and returns a Promise that resolves to `true`. If no Cache entry is found, it resolves to `false`.
17771777
*
17781778
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/delete)
17791779
*/
@@ -1817,13 +1817,13 @@ declare var Cache: {
18171817
*/
18181818
interface CacheStorage {
18191819
/**
1820-
* The **`delete()`** method of the CacheStorage interface finds the Cache object matching the cacheName, and if found, deletes the Cache object and returns a Promise that resolves to true. If no Cache object is found, it resolves to false.
1820+
* The **`delete()`** method of the CacheStorage interface finds the Cache object matching the cacheName, and if found, deletes the Cache object and returns a Promise that resolves to `true`. If no Cache object is found, it resolves to `false`.
18211821
*
18221822
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete)
18231823
*/
18241824
delete(cacheName: string): Promise<boolean>;
18251825
/**
1826-
* The **`has()`** method of the CacheStorage interface returns a Promise that resolves to true if a Cache object matches the cacheName.
1826+
* The **`has()`** method of the CacheStorage interface returns a Promise that resolves to `true` if a Cache object matches the cacheName.
18271827
*
18281828
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/has)
18291829
*/
@@ -2184,7 +2184,7 @@ interface CloseEvent extends Event {
21842184
*/
21852185
readonly reason: string;
21862186
/**
2187-
* The **`wasClean`** read-only property of the CloseEvent interface returns true if the connection closed cleanly.
2187+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
21882188
*
21892189
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
21902190
*/
@@ -2536,7 +2536,7 @@ interface DOMMatrix extends DOMMatrixReadOnly {
25362536
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */
25372537
m44: number;
25382538
/**
2539-
* The **`invertSelf()`** method of the DOMMatrix interface inverts the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to NaN and its is2D property is set to false.
2539+
* The **`invertSelf()`** method of the DOMMatrix interface inverts the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to NaN and its is2D property is set to `false`.
25402540
*
25412541
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/invertSelf)
25422542
*/
@@ -2633,13 +2633,13 @@ interface DOMMatrixReadOnly {
26332633
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */
26342634
readonly f: number;
26352635
/**
2636-
* The readonly **`is2D`** property of the DOMMatrixReadOnly interface is a Boolean flag that is true when the matrix is 2D. The value is true if the matrix was initialized as a 2D matrix and only 2D transformation operations were applied. Otherwise, the matrix is defined in 3D, and is2D is false.
2636+
* The readonly **`is2D`** property of the DOMMatrixReadOnly interface is a Boolean flag that is `true` when the matrix is 2D. The value is `true` if the matrix was initialized as a 2D matrix and only 2D transformation operations were applied. Otherwise, the matrix is defined in 3D, and is2D is `false`.
26372637
*
26382638
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/is2D)
26392639
*/
26402640
readonly is2D: boolean;
26412641
/**
2642-
* The readonly **`isIdentity`** property of the DOMMatrixReadOnly interface is a Boolean whose value is true if the matrix is the identity matrix.
2642+
* The readonly **`isIdentity`** property of the DOMMatrixReadOnly interface is a Boolean whose value is `true` if the matrix is the identity matrix.
26432643
*
26442644
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/isIdentity)
26452645
*/
@@ -2689,7 +2689,7 @@ interface DOMMatrixReadOnly {
26892689
*/
26902690
flipY(): DOMMatrix;
26912691
/**
2692-
* The **`inverse()`** method of the DOMMatrixReadOnly interface creates a new matrix which is the inverse of the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to NaN and its is2D property is set to false. The original matrix is not changed.
2692+
* The **`inverse()`** method of the DOMMatrixReadOnly interface creates a new matrix which is the inverse of the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to NaN and its is2D property is set to `false`. The original matrix is not changed.
26932693
*
26942694
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/inverse)
26952695
*/
@@ -3273,7 +3273,7 @@ interface Event {
32733273
*/
32743274
readonly bubbles: boolean;
32753275
/**
3276-
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
3276+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to `true` before returning from an event handler prevents propagation of the event. In later implementations, setting this to `false` does nothing. See Browser compatibility for details.
32773277
* @deprecated
32783278
*
32793279
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
@@ -3310,7 +3310,7 @@ interface Event {
33103310
*/
33113311
readonly eventPhase: number;
33123312
/**
3313-
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.
3313+
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is `true` when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to `false` in user agents.
33143314
*
33153315
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
33163316
*/
@@ -4037,7 +4037,7 @@ interface FontFaceSet extends EventTarget {
40374037
*/
40384038
readonly status: FontFaceSetLoadStatus;
40394039
/**
4040-
* The **`check()`** method of the FontFaceSet returns true if you can render some text using the given font specification without attempting to use any fonts in this FontFaceSet that are not yet fully loaded. This means you can use the font specification without causing a font swap.
4040+
* The **`check()`** method of the FontFaceSet returns `true` if you can render some text using the given font specification without attempting to use any fonts in this FontFaceSet that are not yet fully loaded. This means you can use the font specification without causing a font swap.
40414041
*
40424042
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check)
40434043
*/
@@ -5550,7 +5550,7 @@ interface OES_vertex_array_object {
55505550
*/
55515551
deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
55525552
/**
5553-
* The **`OES_vertex_array_object.isVertexArrayOES()`** method of the WebGL API returns true if the passed object is a WebGLVertexArrayObject object.
5553+
* The **`OES_vertex_array_object.isVertexArrayOES()`** method of the WebGL API returns `true` if the passed object is a WebGLVertexArrayObject object.
55545554
*
55555555
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES)
55565556
*/
@@ -6679,7 +6679,7 @@ interface Request extends Body {
66796679
*/
66806680
readonly integrity: string;
66816681
/**
6682-
* The **`keepalive`** read-only property of the Request interface contains the request's keepalive setting (true or false), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
6682+
* The **`keepalive`** read-only property of the Request interface contains the request's keepalive setting (`true` or `false`), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
66836683
*
66846684
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
66856685
*/
@@ -7186,7 +7186,7 @@ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
71867186
*/
71877187
showNotification(title: string, options?: NotificationOptions): Promise<void>;
71887188
/**
7189-
* The **`unregister()`** method of the ServiceWorkerRegistration interface unregisters the service worker registration and returns a Promise. The promise will resolve to false if no registration was found, otherwise it resolves to true irrespective of whether unregistration happened or not (it may not unregister if someone else just called ServiceWorkerContainer.register() with the same scope.) The service worker will finish any ongoing operations before it is unregistered.
7189+
* The **`unregister()`** method of the ServiceWorkerRegistration interface unregisters the service worker registration and returns a Promise. The promise will resolve to `false` if no registration was found, otherwise it resolves to `true` irrespective of whether unregistration happened or not (it may not unregister if someone else just called ServiceWorkerContainer.register() with the same scope.) The service worker will finish any ongoing operations before it is unregistered.
71907190
*
71917191
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister)
71927192
*/
@@ -7228,7 +7228,7 @@ interface StorageManager {
72287228
*/
72297229
getDirectory(): Promise<FileSystemDirectoryHandle>;
72307230
/**
7231-
* The **`persisted()`** method of the StorageManager interface returns a Promise that resolves to true if your site's storage bucket is persistent.
7231+
* The **`persisted()`** method of the StorageManager interface returns a Promise that resolves to `true` if your site's storage bucket is persistent.
72327232
*
72337233
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/StorageManager/persisted)
72347234
*/
@@ -11142,7 +11142,7 @@ declare namespace WebAssembly {
1114211142
*/
1114311143
interface Memory {
1114411144
/**
11145-
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
11145+
* The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: `true`, the buffer is either an ArrayBuffer or a SharedArrayBuffer.
1114611146
*
1114711147
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer)
1114811148
*/
@@ -11339,7 +11339,7 @@ declare namespace WebAssembly {
1133911339
*/
1134011340
interface Console {
1134111341
/**
11342-
* The **`console.assert()`** static method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
11342+
* The **`console.assert()`** static method writes an error message to the console if the assertion is `false`. If the assertion is `true`, nothing happens.
1134311343
*
1134411344
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static)
1134511345
*/

0 commit comments

Comments
 (0)