infer untyped variables in js-optimizer.js by origin variable's type if they are just a copy