The unchanged Zod 4.5.2 core gate has one false TS2367 at core/checks.ts:194:52. Both operands of payload.value % (def.value as bigint) are bigint after the typeof branch and assertion, but Home types %, along with every non-add arithmetic expression, as number. The following equality against BigInt(0) therefore compares number to bigint.
Minimal strict ES2022 oracle:
declare const left: bigint;
declare const right: bigint;
const remainder: bigint = left % right;
const equal: boolean = remainder === BigInt(0);
const wrong: number = left % right;TypeScript 6.0.3 and native TypeScript 7.0.2 emit only TS2322 on wrong. Current ReleaseFast Home instead emits TS2322 on remainder and accepts wrong.
Acceptance:
- preserve bigint as the result of valid bigint arithmetic, including the arithmetic operator family covered by TypeScript semantics;
- retain number results for numeric arithmetic and preserve invalid mixed-domain diagnostics;
- exact three-engine positive/negative oracle parity;
- remove only checks.ts:194:52 TS2367 from the unchanged Zod core identity set, with zero additions;
- full checker suite and optimized guarded build pass;
- no source-name, path, diagnostic, or benchmark special case.