This doesn't quite work; when calculating the seed your TS code does:
if (seed) mapGenSettings.seed = (seed + (planet.map_seed_offset ?? 0)) % 2 ^ 32
but unlike Lua, ^ is bitwise XOR, not exponentiation, and has a lower precedence than %, so this ends up adding the seed offset, then reducing it modulo 2, then XORing it with 32, and so the resulting seed value is always either 32 or 33. :)