Added type hints for better js code