You should typehint `array` in the prototype instead of casting it here