Adding type hint for AbstractConnection