Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not generate iterable signatures for static methods #1839

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions baselines/audioworklet.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// AudioWorklet Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface MessageEvent<T = any> {
/** @deprecated */
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
Expand Down
5 changes: 0 additions & 5 deletions baselines/dom.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// Window Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface AudioParam {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
Expand Down
5 changes: 0 additions & 5 deletions baselines/serviceworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// ServiceWorker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
entries(): ArrayIterator<[number, CSSNumericValue]>;
Expand Down
5 changes: 0 additions & 5 deletions baselines/sharedworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// SharedWorker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
entries(): ArrayIterator<[number, CSSNumericValue]>;
Expand Down
5 changes: 0 additions & 5 deletions baselines/ts5.5/audioworklet.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// AudioWorklet Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface MessageEvent<T = any> {
/** @deprecated */
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
Expand Down
5 changes: 0 additions & 5 deletions baselines/ts5.5/dom.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// Window Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface AudioParam {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime) */
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
Expand Down
5 changes: 0 additions & 5 deletions baselines/ts5.5/serviceworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// ServiceWorker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
entries(): IterableIterator<[number, CSSNumericValue]>;
Expand Down
5 changes: 0 additions & 5 deletions baselines/ts5.5/sharedworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// SharedWorker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
entries(): IterableIterator<[number, CSSNumericValue]>;
Expand Down
5 changes: 0 additions & 5 deletions baselines/ts5.5/webworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// Worker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): IterableIterator<CSSNumericValue>;
entries(): IterableIterator<[number, CSSNumericValue]>;
Expand Down
5 changes: 0 additions & 5 deletions baselines/webworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
/// Worker Iterable APIs
/////////////////////////////

interface AbortSignal {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
any(signals: Iterable<AbortSignal>): AbortSignal;
}

interface CSSNumericArray {
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
entries(): ArrayIterator<[number, CSSNumericValue]>;
Expand Down
2 changes: 1 addition & 1 deletion src/build/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ export function emitWebIdl(
const methodsWithSequence: Browser.Method[] = mapToArray(
i.methods ? i.methods.method : {},
)
.filter((m) => m.signature && !m.overrideSignatures)
.filter((m) => m.signature && !m.overrideSignatures && !m.static)
.map((m) => ({
...m,
signature: replaceTypedefsInSignatures(
Expand Down
Loading