-
Notifications
You must be signed in to change notification settings - Fork 424
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
Add Streams types #521
Comments
Alternatively we can craft our own IDL, which should be more readable. |
Should we file a spec bug for that? |
There already is: whatwg/streams#45 The author isn't happy with Web IDL... |
Well.. according to microsoft/TypeScript#25277 we need to make it generic. do not think WebIDL can do that today, so we will have to have a base webIdl with a punch of any's and then a modification layer on top. might be easier to just have a .d.ts file that we include verbatim. |
Where do the current definitions for |
I want to give this a try! 😄 I've already started with a few types to see what could work, and I need some suggestions on how to proceed. Ideally, we'd take the existing
Any suggestions on what approach is more desirable would be much appreciated. The read(): Promise<IteratorResult<R>>; However, I think we can get away with defining a separate interface (e.g. I noticed that many Is it okay if we change these to be function types? For example: // old
interface WritableStreamDefaultControllerCallback {
(controller: WritableStreamDefaultController): void;
}
// new
type WritableStreamDefaultControllerCallback = (controller: WritableStreamDefaultController) => void; Or should we keep using callable interfaces, including for the new callbacks (e.g. |
The Streams spec does not provide any Web IDL so it has to be added through the manual way.
cc: @surma
The text was updated successfully, but these errors were encountered: