Skip to content

Commit 0fbe49c

Browse files
committed
Add [Symbol.toStringTag] property to all interfaces
Fixes #1641
1 parent 6621974 commit 0fbe49c

6 files changed

+5059
-1
lines changed

baselines/audioworklet.generated.d.ts

+162
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ interface AbortController {
179179
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
180180
*/
181181
readonly signal: AbortSignal;
182+
/**
183+
* The well-known symbol @@toStringTag.
184+
*
185+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
186+
*/
187+
readonly [Symbol.toStringTag]: string;
182188
/**
183189
* 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.
184190
*
@@ -250,6 +256,12 @@ declare var AudioWorkletGlobalScope: {
250256
interface AudioWorkletProcessor {
251257
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletProcessor/port) */
252258
readonly port: MessagePort;
259+
/**
260+
* The well-known symbol @@toStringTag.
261+
*
262+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
263+
*/
264+
readonly [Symbol.toStringTag]: string;
253265
}
254266

255267
declare var AudioWorkletProcessor: {
@@ -514,6 +526,12 @@ interface Event {
514526
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
515527
*/
516528
readonly type: string;
529+
/**
530+
* The well-known symbol @@toStringTag.
531+
*
532+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
533+
*/
534+
readonly [Symbol.toStringTag]: string;
517535
/**
518536
* Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
519537
*
@@ -560,10 +578,22 @@ declare var Event: {
560578
};
561579

562580
interface EventListener {
581+
/**
582+
* The well-known symbol @@toStringTag.
583+
*
584+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
585+
*/
586+
readonly [Symbol.toStringTag]: string;
563587
(evt: Event): void;
564588
}
565589

566590
interface EventListenerObject {
591+
/**
592+
* The well-known symbol @@toStringTag.
593+
*
594+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
595+
*/
596+
readonly [Symbol.toStringTag]: string;
567597
handleEvent(object: Event): void;
568598
}
569599

@@ -573,6 +603,12 @@ interface EventListenerObject {
573603
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
574604
*/
575605
interface EventTarget {
606+
/**
607+
* The well-known symbol @@toStringTag.
608+
*
609+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
610+
*/
611+
readonly [Symbol.toStringTag]: string;
576612
/**
577613
* Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
578614
*
@@ -615,6 +651,12 @@ interface GenericTransformStream {
615651
readonly readable: ReadableStream;
616652
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/writable) */
617653
readonly writable: WritableStream;
654+
/**
655+
* The well-known symbol @@toStringTag.
656+
*
657+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
658+
*/
659+
readonly [Symbol.toStringTag]: string;
618660
}
619661

620662
/**
@@ -732,6 +774,12 @@ interface ReadableByteStreamController {
732774
readonly byobRequest: ReadableStreamBYOBRequest | null;
733775
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
734776
readonly desiredSize: number | null;
777+
/**
778+
* The well-known symbol @@toStringTag.
779+
*
780+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
781+
*/
782+
readonly [Symbol.toStringTag]: string;
735783
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
736784
close(): void;
737785
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
@@ -753,6 +801,12 @@ declare var ReadableByteStreamController: {
753801
interface ReadableStream<R = any> {
754802
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
755803
readonly locked: boolean;
804+
/**
805+
* The well-known symbol @@toStringTag.
806+
*
807+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
808+
*/
809+
readonly [Symbol.toStringTag]: string;
756810
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
757811
cancel(reason?: any): Promise<void>;
758812
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
@@ -791,6 +845,12 @@ declare var ReadableStreamBYOBReader: {
791845
interface ReadableStreamBYOBRequest {
792846
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
793847
readonly view: ArrayBufferView | null;
848+
/**
849+
* The well-known symbol @@toStringTag.
850+
*
851+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
852+
*/
853+
readonly [Symbol.toStringTag]: string;
794854
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
795855
respond(bytesWritten: number): void;
796856
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
@@ -806,6 +866,12 @@ declare var ReadableStreamBYOBRequest: {
806866
interface ReadableStreamDefaultController<R = any> {
807867
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
808868
readonly desiredSize: number | null;
869+
/**
870+
* The well-known symbol @@toStringTag.
871+
*
872+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
873+
*/
874+
readonly [Symbol.toStringTag]: string;
809875
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
810876
close(): void;
811877
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
@@ -835,6 +901,12 @@ declare var ReadableStreamDefaultReader: {
835901
interface ReadableStreamGenericReader {
836902
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */
837903
readonly closed: Promise<undefined>;
904+
/**
905+
* The well-known symbol @@toStringTag.
906+
*
907+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
908+
*/
909+
readonly [Symbol.toStringTag]: string;
838910
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */
839911
cancel(reason?: any): Promise<void>;
840912
}
@@ -887,6 +959,12 @@ interface TextDecoderCommon {
887959
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/ignoreBOM)
888960
*/
889961
readonly ignoreBOM: boolean;
962+
/**
963+
* The well-known symbol @@toStringTag.
964+
*
965+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
966+
*/
967+
readonly [Symbol.toStringTag]: string;
890968
}
891969

892970
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
@@ -932,6 +1010,12 @@ interface TextEncoderCommon {
9321010
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encoding)
9331011
*/
9341012
readonly encoding: string;
1013+
/**
1014+
* The well-known symbol @@toStringTag.
1015+
*
1016+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1017+
*/
1018+
readonly [Symbol.toStringTag]: string;
9351019
}
9361020

9371021
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
@@ -951,6 +1035,12 @@ interface TransformStream<I = any, O = any> {
9511035
readonly readable: ReadableStream<O>;
9521036
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
9531037
readonly writable: WritableStream<I>;
1038+
/**
1039+
* The well-known symbol @@toStringTag.
1040+
*
1041+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1042+
*/
1043+
readonly [Symbol.toStringTag]: string;
9541044
}
9551045

9561046
declare var TransformStream: {
@@ -962,6 +1052,12 @@ declare var TransformStream: {
9621052
interface TransformStreamDefaultController<O = any> {
9631053
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
9641054
readonly desiredSize: number | null;
1055+
/**
1056+
* The well-known symbol @@toStringTag.
1057+
*
1058+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1059+
*/
1060+
readonly [Symbol.toStringTag]: string;
9651061
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
9661062
enqueue(chunk?: O): void;
9671063
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
@@ -1006,6 +1102,12 @@ interface URL {
10061102
readonly searchParams: URLSearchParams;
10071103
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
10081104
username: string;
1105+
/**
1106+
* The well-known symbol @@toStringTag.
1107+
*
1108+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1109+
*/
1110+
readonly [Symbol.toStringTag]: string;
10091111
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
10101112
toJSON(): string;
10111113
}
@@ -1021,6 +1123,12 @@ declare var URL: {
10211123
interface URLSearchParams {
10221124
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
10231125
readonly size: number;
1126+
/**
1127+
* The well-known symbol @@toStringTag.
1128+
*
1129+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1130+
*/
1131+
readonly [Symbol.toStringTag]: string;
10241132
/**
10251133
* Appends a specified key/value pair as a new search parameter.
10261134
*
@@ -1075,6 +1183,12 @@ declare var URLSearchParams: {
10751183
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkletGlobalScope)
10761184
*/
10771185
interface WorkletGlobalScope {
1186+
/**
1187+
* The well-known symbol @@toStringTag.
1188+
*
1189+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1190+
*/
1191+
readonly [Symbol.toStringTag]: string;
10781192
}
10791193

10801194
declare var WorkletGlobalScope: {
@@ -1090,6 +1204,12 @@ declare var WorkletGlobalScope: {
10901204
interface WritableStream<W = any> {
10911205
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
10921206
readonly locked: boolean;
1207+
/**
1208+
* The well-known symbol @@toStringTag.
1209+
*
1210+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1211+
*/
1212+
readonly [Symbol.toStringTag]: string;
10931213
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
10941214
abort(reason?: any): Promise<void>;
10951215
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
@@ -1111,6 +1231,12 @@ declare var WritableStream: {
11111231
interface WritableStreamDefaultController {
11121232
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
11131233
readonly signal: AbortSignal;
1234+
/**
1235+
* The well-known symbol @@toStringTag.
1236+
*
1237+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1238+
*/
1239+
readonly [Symbol.toStringTag]: string;
11141240
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
11151241
error(e?: any): void;
11161242
}
@@ -1132,6 +1258,12 @@ interface WritableStreamDefaultWriter<W = any> {
11321258
readonly desiredSize: number | null;
11331259
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
11341260
readonly ready: Promise<undefined>;
1261+
/**
1262+
* The well-known symbol @@toStringTag.
1263+
*
1264+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1265+
*/
1266+
readonly [Symbol.toStringTag]: string;
11351267
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
11361268
abort(reason?: any): Promise<void>;
11371269
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
@@ -1206,6 +1338,12 @@ declare namespace WebAssembly {
12061338
interface Global<T extends ValueType = ValueType> {
12071339
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/value) */
12081340
value: ValueTypeMap[T];
1341+
/**
1342+
* The well-known symbol @@toStringTag.
1343+
*
1344+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1345+
*/
1346+
readonly [Symbol.toStringTag]: string;
12091347
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/valueOf) */
12101348
valueOf(): ValueTypeMap[T];
12111349
}
@@ -1219,6 +1357,12 @@ declare namespace WebAssembly {
12191357
interface Instance {
12201358
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance/exports) */
12211359
readonly exports: Exports;
1360+
/**
1361+
* The well-known symbol @@toStringTag.
1362+
*
1363+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1364+
*/
1365+
readonly [Symbol.toStringTag]: string;
12221366
}
12231367

12241368
var Instance: {
@@ -1239,6 +1383,12 @@ declare namespace WebAssembly {
12391383
interface Memory {
12401384
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/buffer) */
12411385
readonly buffer: ArrayBuffer;
1386+
/**
1387+
* The well-known symbol @@toStringTag.
1388+
*
1389+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1390+
*/
1391+
readonly [Symbol.toStringTag]: string;
12421392
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/grow) */
12431393
grow(delta: number): number;
12441394
}
@@ -1250,6 +1400,12 @@ declare namespace WebAssembly {
12501400

12511401
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module) */
12521402
interface Module {
1403+
/**
1404+
* The well-known symbol @@toStringTag.
1405+
*
1406+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1407+
*/
1408+
readonly [Symbol.toStringTag]: string;
12531409
}
12541410

12551411
var Module: {
@@ -1276,6 +1432,12 @@ declare namespace WebAssembly {
12761432
interface Table {
12771433
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/length) */
12781434
readonly length: number;
1435+
/**
1436+
* The well-known symbol @@toStringTag.
1437+
*
1438+
* [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag)
1439+
*/
1440+
readonly [Symbol.toStringTag]: string;
12791441
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/get) */
12801442
get(index: number): any;
12811443
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/grow) */

0 commit comments

Comments
 (0)