Skip to content

TypeScript 5.9: FFlateCallback needs a tighter data argument #242

Closed

Description

@ajvincent

How to reproduce

Playground Link

The problem

TypeScript 5.9 made a subtle change to its Uint8Array type.

Type 'Uint8Array<ArrayBufferLike>' is not assignable to type 'BlobPart'.
  Type 'Uint8Array<ArrayBufferLike>' is not assignable to type 'ArrayBufferView<ArrayBuffer>'.
    Types of property 'buffer' are incompatible.
      Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
        Type 'SharedArrayBuffer' is missing the following properties from type 'ArrayBuffer': resizable, resize, detached, transfer, transferToFixedLength

Activity

  1. Exac commented on Nov 11, 2025

    @Exac
  2. 101arrowz commented on Feb 9, 2026

    @101arrowz
    Owner

    Assuming the suggestion is to switch the type to explicit Uint8Array<ArrayBuffer>, this should be doable in the next update.

  3. curiousdannii commented on Apr 11, 2026

    @curiousdannii

    I've noticed the same thing in regards to the return type of gunzipSync. It would be nice if it could be switched to Uint8Array<ArrayBuffer>, though I'm not sure if that's actually possible considering you can pass in the output buffer in the options.

    Or perhaps you could have two function signatures?

    gunzipSync(data: Uint8Array) => Uint8Array<ArrayBuffer>
    gunzipSync(data: Uint8Array, opts: GunzipOptions]) => Uint8Array
    
  4. added a commit that references this issue on May 16, 2026
  5. 101arrowz commented on May 16, 2026

    @101arrowz
    Owner

    Fixed in v0.8.3, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions