You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, the type of ReadableStreamSource.prototype.start is declared as function((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!Promise<*>|undefined)). At first I thought this was a bug in Closure's extern definitions, but then I realised that this is what the Streams standard actually says.
Editorially, the simplest fix would be to say "thenable" where we currently say "Promise", but I am concerned that might be too hard to understand.
The text was updated successfully, but these errors were encountered:
I think it is fine as-is. The notes explaining usage are meant to guide you down the right path, not state what is technically allowed.
As a separate example, we would say "can return a number" instead of "can return any object that coerces to a number". (I.e., there's no need to point out that not only 1, but also { valueOf() { return 1; } } or "1" work.)
https://streams.spec.whatwg.org/#ref-for-pull-source-1
Actually a thenable. The same applies to all sink and source methods that can return a Promise.
I noticed this when I was looking at the Closure compiler extern definitions for Streams, at https://github.com/google/closure-compiler/blob/master/externs/browser/streamsapi.js
For example, the type of
ReadableStreamSource.prototype.start
is declared asfunction((!ReadableByteStreamController|!ReadableStreamDefaultController)):(!Promise<*>|undefined))
. At first I thought this was a bug in Closure's extern definitions, but then I realised that this is what the Streams standard actually says.Editorially, the simplest fix would be to say "thenable" where we currently say "Promise", but I am concerned that might be too hard to understand.
The text was updated successfully, but these errors were encountered: