Skip to content

Compatibility with TypeScript 5.7 (array buffers) #53

Closed
@ehoogeveen-medweb

Description

@ehoogeveen-medweb

Disclaimer: TypeScript 5.7 was only just released and I'm not trying to rush you.

TypeScript 5.7 includes some changes to how array buffers are typed, and it appears that better-typescript-lib will need to be updated to be compatible with it.

With TypeScript 5.7.2 and better-typescript-lib 2.9.0 and compiling the following file:

import * as zlib from 'node:zlib'

const result = zlib.gzipSync("test");

console.log(result.byteLength);

I get this error:

src/test.ts:5:20 - error TS2339: Property 'byteLength' does not exist on type 'Buffer<ArrayBufferLike>'.

Without better-typescript-lib there's no error.

reproduction repository

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