Fix JS function type in carousel.