fix: narrow the crypto-member delete cast in the attempt-id tests

`Record<string, unknown>` does not overlap `Crypto` (TS2352 under `tsc -b`).
`Partial<Pick<Crypto, …>>` says the same thing in one legal cast and keeps
`delete` operating on a known-optional property.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uw1s4LRBUzrFwLzPT4mAJn
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-09-05 14:54:48 -04:00
commit f48cf2a90d

View file

@ -49,7 +49,11 @@ function withoutCryptoMember(
if (original) {
Object.defineProperty(globalThis.crypto, name, original);
} else {
delete (globalThis.crypto as Record<string, unknown>)[name];
delete (
globalThis.crypto as Partial<
Pick<Crypto, "randomUUID" | "getRandomValues">
>
)[name];
}
}
}