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

Fix ReadableStream incorrectly marked as a sync iterable #1134

Merged
merged 1 commit into from
Sep 4, 2021
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
1 change: 0 additions & 1 deletion baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ interface ReadableStream<R = any> {
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
}

declare var ReadableStream: {
Expand Down
7 changes: 0 additions & 7 deletions baselines/audioworklet.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,3 @@ 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;
}

interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}
1 change: 0 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10912,7 +10912,6 @@ interface ReadableStream<R = any> {
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
}

declare var ReadableStream: {
Expand Down
7 changes: 0 additions & 7 deletions baselines/dom.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,6 @@ interface PluginArray {
interface RTCStatsReport extends ReadonlyMap<string, any> {
}

interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}

interface SVGLengthList {
[Symbol.iterator](): IterableIterator<SVGLength>;
}
Expand Down
1 change: 0 additions & 1 deletion baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,6 @@ interface ReadableStream<R = any> {
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
}

declare var ReadableStream: {
Expand Down
7 changes: 0 additions & 7 deletions baselines/serviceworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ interface MessageEvent<T = any> {
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}

interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}

interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
Expand Down
1 change: 0 additions & 1 deletion baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,6 @@ interface ReadableStream<R = any> {
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
}

declare var ReadableStream: {
Expand Down
7 changes: 0 additions & 7 deletions baselines/sharedworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ interface MessageEvent<T = any> {
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}

interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}

interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
Expand Down
1 change: 0 additions & 1 deletion baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,6 @@ interface ReadableStream<R = any> {
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
}

declare var ReadableStream: {
Expand Down
7 changes: 0 additions & 7 deletions baselines/webworker.iterable.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ interface MessageEvent<T = any> {
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}

interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}

interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
Expand Down
2 changes: 1 addition & 1 deletion src/build/widlprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function convertInterfaceCommon(
addComments(method[member.name], commentMap, i.name, member.name);
}
} else if (
member.type === "iterable" ||
(member.type === "iterable" && !member.async) ||
member.type === "maplike" ||
member.type === "setlike"
) {
Expand Down