Skip to content

Some WHATWG streams types not available on globalThis #12484

@lucacasonato

Description

@lucacasonato

The CI errors seem to be typing issues exposed by this PR:

  ByteLengthQueuingStrategy,
  ~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:2:3

TS2339 [ERROR]: Property 'CountQueuingStrategy' does not exist on type 'typeof globalThis'.
  CountQueuingStrategy,
  ~~~~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:3:3

TS2339 [ERROR]: Property 'TextDecoderStream' does not exist on type 'typeof globalThis'.
  TextDecoderStream,
  ~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:8:3

TS2339 [ERROR]: Property 'TextEncoderStream' does not exist on type 'typeof globalThis'.
  TextEncoderStream,
  ~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:9:3

TS2339 [ERROR]: Property 'TransformStreamDefaultController' does not exist on type 'typeof globalThis'.
  TransformStreamDefaultController,
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:11:3

TS2339 [ERROR]: Property 'WritableStreamDefaultController' does not exist on type 'typeof globalThis'.
  WritableStreamDefaultController,
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/runner/work/deno_std/deno_std/node/stream/web.ts:13:3

these are definitely defined on the global so just seem to be omitted from the types for some reason.

Originally posted by @guybedford in denoland/std#1430 (comment)

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