Skip to content

Commit 6d459ad

Browse files
authored
Simplify comment emitter (#1096)
* Simplify comment emitter * fix
1 parent 8b6ddc1 commit 6d459ad

12 files changed

+1658
-4032
lines changed

baselines/audioworklet.generated.d.ts

+23-69
Original file line numberDiff line numberDiff line change
@@ -154,68 +154,40 @@ declare var CountQueuingStrategy: {
154154

155155
/** An event which takes place in the DOM. */
156156
interface Event {
157-
/**
158-
* Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
159-
*/
157+
/** Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. */
160158
readonly bubbles: boolean;
161159
cancelBubble: boolean;
162-
/**
163-
* Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
164-
*/
160+
/** Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. */
165161
readonly cancelable: boolean;
166-
/**
167-
* Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
168-
*/
162+
/** Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. */
169163
readonly composed: boolean;
170-
/**
171-
* Returns the object whose event listener's callback is currently being invoked.
172-
*/
164+
/** Returns the object whose event listener's callback is currently being invoked. */
173165
readonly currentTarget: EventTarget | null;
174-
/**
175-
* Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
176-
*/
166+
/** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */
177167
readonly defaultPrevented: boolean;
178-
/**
179-
* Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
180-
*/
168+
/** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */
181169
readonly eventPhase: number;
182-
/**
183-
* Returns true if event was dispatched by the user agent, and false otherwise.
184-
*/
170+
/** Returns true if event was dispatched by the user agent, and false otherwise. */
185171
readonly isTrusted: boolean;
186172
/** @deprecated */
187173
returnValue: boolean;
188174
/** @deprecated */
189175
readonly srcElement: EventTarget | null;
190-
/**
191-
* Returns the object to which event is dispatched (its target).
192-
*/
176+
/** Returns the object to which event is dispatched (its target). */
193177
readonly target: EventTarget | null;
194-
/**
195-
* Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
196-
*/
178+
/** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */
197179
readonly timeStamp: DOMHighResTimeStamp;
198-
/**
199-
* Returns the type of event, e.g. "click", "hashchange", or "submit".
200-
*/
180+
/** Returns the type of event, e.g. "click", "hashchange", or "submit". */
201181
readonly type: string;
202-
/**
203-
* 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.
204-
*/
182+
/** 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. */
205183
composedPath(): EventTarget[];
206184
/** @deprecated */
207185
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
208-
/**
209-
* If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
210-
*/
186+
/** If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. */
211187
preventDefault(): void;
212-
/**
213-
* Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
214-
*/
188+
/** Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. */
215189
stopImmediatePropagation(): void;
216-
/**
217-
* When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
218-
*/
190+
/** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */
219191
stopPropagation(): void;
220192
readonly AT_TARGET: number;
221193
readonly BUBBLING_PHASE: number;
@@ -258,13 +230,9 @@ interface EventTarget {
258230
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
259231
*/
260232
addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
261-
/**
262-
* Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
263-
*/
233+
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
264234
dispatchEvent(event: Event): boolean;
265-
/**
266-
* Removes the event listener in target's event listener list with the same type, callback, and options.
267-
*/
235+
/** Removes the event listener in target's event listener list with the same type, callback, and options. */
268236
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
269237
}
270238

@@ -275,25 +243,15 @@ declare var EventTarget: {
275243

276244
/** A message received by a target object. */
277245
interface MessageEvent<T = any> extends Event {
278-
/**
279-
* Returns the data of the message.
280-
*/
246+
/** Returns the data of the message. */
281247
readonly data: T;
282-
/**
283-
* Returns the last event ID string, for server-sent events.
284-
*/
248+
/** Returns the last event ID string, for server-sent events. */
285249
readonly lastEventId: string;
286-
/**
287-
* Returns the origin of the message, for server-sent events and cross-document messaging.
288-
*/
250+
/** Returns the origin of the message, for server-sent events and cross-document messaging. */
289251
readonly origin: string;
290-
/**
291-
* Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
292-
*/
252+
/** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */
293253
readonly ports: ReadonlyArray<MessagePort>;
294-
/**
295-
* Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
296-
*/
254+
/** Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */
297255
readonly source: MessageEventSource | null;
298256
/** @deprecated */
299257
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
@@ -313,9 +271,7 @@ interface MessagePortEventMap {
313271
interface MessagePort extends EventTarget {
314272
onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
315273
onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
316-
/**
317-
* Disconnects the port, so that it is no longer active.
318-
*/
274+
/** Disconnects the port, so that it is no longer active. */
319275
close(): void;
320276
/**
321277
* Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
@@ -324,9 +280,7 @@ interface MessagePort extends EventTarget {
324280
*/
325281
postMessage(message: any, transfer: Transferable[]): void;
326282
postMessage(message: any, options?: StructuredSerializeOptions): void;
327-
/**
328-
* Begins dispatching messages received on the port.
329-
*/
283+
/** Begins dispatching messages received on the port. */
330284
start(): void;
331285
addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
332286
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;

0 commit comments

Comments
 (0)