declared()
declared() : array<string,array<string,mixed>>
Lists the declared types, with the defaults Drupal 7 filled in.
Entity types that a Drupal 7 module declares with `hook_entity_info()`.
Drupal 11 has no such hook, so these types have no entity type definition and no storage. They are read from the module's procedural implementation and loaded by the Drupal 7 controller class the declaration names. A type Drupal 11 defines wins over a declaration of the same name.
The answer is rebuilt on every call: a static copy would survive into the next request of a persistent worker.