Skip to content

Commit 861485c

Browse files
committed
refactor(secureStorage): update EncryptedPayload interface to specify ArrayBuffer backing for TypeScript compatibility
1 parent 6d150f7 commit 861485c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/aiassistant/secureStorage.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ const WRAP_KEY_ID = "wrap-key";
3232
const API_KEY_ID = "api-key";
3333

3434
/** Encrypted payload shape. ``iv`` is the 12-byte AES-GCM nonce, regen
35-
* on every write. */
35+
* on every write. The explicit ``ArrayBuffer`` backing is required by
36+
* TypeScript ≥ 5.7's narrower ``BufferSource`` definition (which now
37+
* excludes ``SharedArrayBuffer``-backed views). */
3638
interface EncryptedPayload {
37-
iv: Uint8Array;
38-
ciphertext: Uint8Array;
39+
iv: Uint8Array<ArrayBuffer>;
40+
ciphertext: Uint8Array<ArrayBuffer>;
3941
}
4042

4143
interface SecretsRecord {

0 commit comments

Comments
 (0)