How to discover the currently active twig template I need to find out the currently active Twig template from within my module preprocess function.

function mymodule_preprocess_field(&amp;$variables, $hook) {
    // How do i retrieve the currently active Twig template?
}


I need to know whether it is field.html.twig, field--field-example.html.twig or some other template suggestion.

Is that possible?
With the help of Clive's comment, I managed to identify the active theme suggestion.  Code below.

function mymodule_preprocess_field(&amp;$variables, $hook) {
  $theme_suggestions = mymodule_get_theme_suggestions($hook, $variables);

  $active_suggestion = mymodule_get_active_theme_suggestion($theme_suggestions);
}

function mymodule_get_theme_suggestions(String $base_hook, array $variables) {
  // Invoke hook_theme_suggestions_HOOK().
  $suggestions = \Drupal::moduleHandler()-&gt;invokeAll('theme_suggestions_' . $base_hook, [$variables]);

  // Invoke hook_theme_suggestions_alter().
  $hooks = [
    'theme_suggestions',
    'theme_suggestions_' . $base_hook,
  ];
  \Drupal::moduleHandler()-&gt;alter($hooks, $suggestions, $variables, $base_hook);

  array_unshift($suggestions, $base_hook);

  return $suggestions;
}

function mymodule_get_active_theme_suggestion($suggestions) {

  $theme_registry = theme_get_registry(FALSE);

  // Order by most specific first.
  $suggestions = array_reverse($suggestions);

  foreach ($suggestions as $candidate) {
    if ($theme_registry
      -&gt;has($candidate)) {
      return $candidate;
    }
  }
}