Skip to content

npn run types-check tests have been failing #3465

@scratchmex

Description

@scratchmex

latest run failed https://github.com/bigskysoftware/htmx/actions/runs/18348010656/job/52259859351

I can reproduce on my system with node 20 and 22

> [email protected] types-check
> tsc src/htmx.js --noEmit --checkJs --target es6 --lib dom,dom.iterable

Error: node_modules/@types/node/buffer.d.ts(616,19): error TS2430: Interface 'Buffer' incorrectly extends interface 'Uint8Array<ArrayBufferLike>'.
  The types of 'slice(...).buffer' are incompatible between these types.
    Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
      Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
        Types of property '[Symbol.toStringTag]' are incompatible.
          Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.
Error: node_modules/@types/node/fs/promises.d.ts(56,66): error TS2344: Type 'Buffer' does not satisfy the constraint 'ArrayBufferView'.
  Type 'Buffer' is not assignable to type 'Uint8Array<ArrayBufferLike> | DataView<ArrayBufferLike>'.
    Type 'Buffer' is not assignable to type 'Uint8Array<ArrayBufferLike>'.
      The types of 'slice(...).buffer' are incompatible between these types.
        Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
          Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
            Types of property '[Symbol.toStringTag]' are incompatible.
              Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.
Error: node_modules/@types/node/fs/promises.d.ts(218,49): error TS2344: Type 'Buffer' does not satisfy the constraint 'ArrayBufferView'.
  Type 'Buffer' is not assignable to type 'Uint8Array<ArrayBufferLike> | DataView<ArrayBufferLike>'.
    Type 'Buffer' is not assignable to type 'Uint8Array<ArrayBufferLike>'.
      The types of 'slice(...).buffer' are incompatible between these types.
        Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
          Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
            Types of property '[Symbol.toStringTag]' are incompatible.
              Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.
Error: node_modules/@types/node/module.d.ts(108,13): error TS2386: Overload signatures must all be optional or required.
Error: Process completed with exit code 2.

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