How to get referenced fields of a particular node/content type? I have a content type with reference field of type paragraph. 

Using below code only gives me fields of content type and does not give referenced fields. How can I get referenced fields of a particular node type?

function hook_form_alter(array &amp;$form, FormStateInterface &amp;$form_state, $form_id) {
    $entityManager = \Drupal::service('entity.manager');
    $fields = $entityManager-&gt;getFieldDefinitions('node','media');
}
Once you have a $node object, you can get the referenced field value by the following code:

$node-&gt;get('field_reference')-&gt;referencedEntities();


Here, field_reference is a field of type Entity reference revisions referencing to the paragraph entity.