mirror of
https://github.com/ProtonMail/pmcrypto.git
synced 2026-01-16 23:00:37 +00:00
Also, enforce declaring Uint8Array<ArrayBuffer> via ESLint. This is to limit the need to downcast Uint8Array in output when using them with e.g. WebCrypto and Blobs, following an incompatible interface change between ArrayBuffer and SharedArrayBuffer (enforced in TS v5.9). More context: a `Uint8Array` type definition without generic-type indicator defaults to `Uint8Array<ArrayBufferLike>`. The core of the issue is that in ES2024, SharedArrayBuffer and ArrayBuffer are no longer compatible, hence an ArrayBufferLike (which is also supertype of SharedArrayBuffer) cannot be passed if an ArrayBuffer is expected. This breaks Uint8Array usages which expect an ArrayBuffer (which is the case for e.g. the WebCrypto API). |
||
|---|---|---|
| .. | ||
| crypto | ||
| key | ||
| message | ||
| bigInteger.ts | ||
| constants.ts | ||
| index.ts | ||
| openpgp.ts | ||
| pmcrypto.d.ts | ||
| pmcrypto.js | ||
| serverTime.ts | ||
| utils.ts | ||