Skip to content

CompressionStream & DecompressionStream types don't support brotli & zstd #25367

@kylekz

Description

@kylekz

What version of Bun is running?

1.3.3+274e01c73

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

simple example from the 1.3.3 blog post detailing CompressionStream implementation:

async function main() {
  const response = await fetch("https://example.com");
  const zstd = response.body!.pipeThrough(new CompressionStream("zstd"));
}

What is the expected behavior?

types for CompressionStream and DecompressionStream should have brotli and zstd added

What do you see instead?

type error: Argument of type '"zstd"' is not assignable to parameter of type 'CompressionFormat'.

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtypesAn issue with TypeScript types

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions