diff --git a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
index f6da49d8c1..1d1f04e462 100644
--- a/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
+++ b/core/lib/Drupal/Core/TypedData/TypedDataInterface.php
@@ -105,7 +105,7 @@ interface TypedDataInterface {
   /**
    * Returns the name of a property or item.
    *
-   * @return string
+   * @return string|int
    *   If the data is a property of some complex data, the name of the property.
    *   If the data is an item of a list, the name is the numeric position of the
    *   item in the list, starting with 0. Otherwise, NULL is returned.
