### ⚙ Compilation target es2022 ### ⚙ Library es2022, dom ### Missing / Incorrect Definition ts5.7 change which made uint8arrays generic was okay. ts5.9 introduced absolutely horrific change which breaks Uint8Array-heavy projects. It seems like some changes made types too strict. It's unclear at which phase - perhaps during inference (i'm using `infer`). I'm now constantly getting those errors and it's really unhelpful - it's unclear what to do. Blog post recommendations (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-9.html#libdts-changes) make arrays subtype-specific. It seems like this is a wrong way to fix things. Users should not be forced to always consume ArrayBuffer-based type arrays. It's perfectly fine to use either ArrayBuffer or SharedArrayBuffer based arrays, the changes are minor. The defaults should be able to consume both types! ``` // type Poly = Uint16Array TS2345: Argument of type 'Poly' is not assignable to parameter of type 'Uint16Array<ArrayBuffer>'. 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"'. ``` ### Sample Code I've spent a lot of time but was not able to produce a standalone example which reproduces the issue. There are a bunch of types at play and it's unclear which exact type causes the issue. The code which produces errors is in commit cb76058 of https://github.com/paulmillr/noble-post-quantum ```sh git clone https://github.com/paulmillr/noble-post-quantum cd noble-post-quantum git checkout cb76058 npm install npm run build ```