Get the field type of FieldItemList I need to find all FieldItemList's with a certain field type.

/* @var FieldItemList $field */
foreach ($p-&gt;getFields(FALSE) as $field_name =&gt;  $field){
  kint($field-&gt;getPluginId()); //NOPE
  kint($field-&gt;getFieldDefinition()); //NOPE
  kint($field-&gt;equals(array('MY_FIELD_TYPE'))); //NOPE
}


I would expect there is a simple way of finding out the field type of a FieldItemList.
its this one:

$field-&gt;getFieldDefinition()-&gt;getType()