Skip to content

ReadableStream.pipeTo overly strict #2858

Description

@quickstep24

The stream wrappers in kotlin-web are generically typed.
For example, Response.body will return a ReadableStream<Uint8Array<ArrayBuffer>>.

The pipeTo methods require the same type, which seams overly strict.
It will prevent me streaming the body to FileSystemWritableFileStream which is WritableStream<JsAny>.

The only workaround I found is to 'lie' to the compiler by unchecked casting to a common type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions