Re: [whatwg/streams] `SetUpTransformStreamDefaultControllerFromTransformer` doesn't ensure that `transformAlgorithm` and `flushAlgorithm` return `Promise` (Issue #1201)

This is handled by step 2 of [the `TransformStream` constructor](https://streams.spec.whatwg.org/commit-snapshots/7f7d68befc29d9cfa0c3b204e0e8b9217e941fd2/#ts-constructor):
> 2. Let _transformerDict_ be _transformer_, converted to an IDL value of type `Transformer`.

Note that [the `Transformer` interface](https://streams.spec.whatwg.org/commit-snapshots/7f7d68befc29d9cfa0c3b204e0e8b9217e941fd2/#dictdef-transformer) declares `transform` and `flush` as promise-returning callbacks, so Web IDL handles converting a non-promise return value into a promise. See https://github.com/whatwg/streams/issues/1161#issuecomment-902032645 for more information.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1201#issuecomment-1001165714
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1201/1001165714@github.com>

Received on Sunday, 26 December 2021 11:59:35 UTC