If the original code was written in Rust, then I don't think the Rust compiler is allowed to do any of these "optimizations" of rewriting floating point expressions.
> new Date(0) === new Date(0)
false type Values<T extends Record<string | number | symbol, unknown>> = T[keyof T]