Trying to upgrade to TypeScript 5.6 Beta, I get the following error messages in node_modules. I didn't make any other change, so what should I do to fix these errors?
node_modules/@types/node/buffer.d.ts:632:19 - error TS2430: Interface 'Buffer' incorrectly extends interface 'Uint8Array'.
The types returned by 'reverse()' are incompatible between these types.
Type 'this' is not assignable to type 'Uint8Array'.
Type 'Buffer' is not assignable to type 'Uint8Array'.
The types returned by 'slice(...).entries()' are incompatible between these types.
Type 'IterableIterator<[number, number]>' is missing the following properties from type 'BuiltinIterator<[number, number], undefined, any>': map, filter, take, drop, and 8 more.
632 interface Buffer extends Uint8Array {
~~~~~~
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 | DataView'.
Type 'Buffer' is not assignable to type 'Uint8Array'.
The types returned by 'entries()' are incompatible between these types.
Type 'IterableIterator<[number, number]>' is missing the following properties from type 'BuiltinIterator<[number, number], undefined, any>': map, filter, take, drop, and 8 more.
56 interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
~~~~~~
node_modules/@types/node/fs/promises.d.ts:238:49 - error TS2344: Type 'Buffer' does not satisfy the constraint 'ArrayBufferView'.
Type 'Buffer' is not assignable to type 'Uint8Array | DataView'.
Type 'Buffer' is not assignable to type 'Uint8Array'.
The types returned by 'entries()' are incompatible between these types.
Type 'IterableIterator<[number, number]>' is missing the following properties from type 'BuiltinIterator<[number, number], undefined, any>': map, filter, take, drop, and 8 more.
238 read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
~~~~~~
Note: when I used a newer version of TypeScript 5.6, mentions of BuiltinIterator<[number, number], ...> seem replaced with ArrayIterator<number>.