Adds type hint to setEnvironment()