How to intercept autocomplete events in js in Drupal 8.

<?php

var autocomplete = Drupal.autocomplete;
var
acInput= $("#my-autocomplete").autocomplete({
     
select: function( event, ui ) {

      }
     });

?>