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:
parent
f5a3ccedbb
commit
f48cf2a90d
1 changed files with 5 additions and 1 deletions
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue