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(types): Conform lib.deno_web.d.ts to lib.dom.d.ts and lib.webworker.d.ts #24599

Merged
merged 27 commits into from
Jul 22, 2024

Conversation

petamoriken
Copy link
Contributor

@petamoriken petamoriken commented Jul 16, 2024

Fix #24578
Fix #21981

@Hajime-san
Copy link
Contributor

Will this also fix?
#21981

@petamoriken petamoriken marked this pull request as draft July 16, 2024 05:07
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. Could you please add some tests like I did in #24489 to ensure we don't regress again?

@bartlomieju
Copy link
Member

@petamoriken do you need any help with this PR? I'd like to land it before v1.45.3 release that will happen on Monday, July 22nd.

@petamoriken
Copy link
Contributor Author

@bartlomieju Finally, I am going to add type aliases for users who refer to old types. It shouldn't take that long.

Comment on lines -610 to -625
/** @category Streams */
declare interface ReadableStreamBYOBReadDoneResult<V extends ArrayBufferView> {
done: true;
value?: V;
}

/** @category Streams */
declare interface ReadableStreamBYOBReadValueResult<V extends ArrayBufferView> {
done: false;
value: V;
}

/** @category Streams */
declare type ReadableStreamBYOBReadResult<V extends ArrayBufferView> =
| ReadableStreamBYOBReadDoneResult<V>
| ReadableStreamBYOBReadValueResult<V>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be reland when supported by upstream (microsoft/TypeScript-DOM-lib-generator#1676)

readonly readable: ReadableStream<string>;
readonly writable: WritableStream<BufferSource>;
readonly [Symbol.toStringTag]: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petamoriken petamoriken marked this pull request as ready for review July 22, 2024 01:39
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants