diff --git a/docs/running_psalm/plugins/plugins_type_system.md b/docs/running_psalm/plugins/plugins_type_system.md index 0589309d3..28e1ef9e8 100644 --- a/docs/running_psalm/plugins/plugins_type_system.md +++ b/docs/running_psalm/plugins/plugins_type_system.md @@ -59,6 +59,10 @@ The classes are as follows: `TTemplateValueOf` - Represents the type used when using TValueOfArray when the type of the array is a template +`TPropertiesOf` - Represents properties and their types of a class as a keyed array (e.g. `properties-of`) + +`TTemplatePropertiesOf` - Represents the type used when using TPropertiesOf when type of the class is a template + `TTypeAlias` - To be documented ### Scalar supertype diff --git a/src/Psalm/Type/Atomic/TPropertiesOf.php b/src/Psalm/Type/Atomic/TPropertiesOf.php index bf3970b55..b3e009c6c 100644 --- a/src/Psalm/Type/Atomic/TPropertiesOf.php +++ b/src/Psalm/Type/Atomic/TPropertiesOf.php @@ -5,7 +5,8 @@ namespace Psalm\Type\Atomic; use Psalm\Type\Atomic; /** - * Type that resolves to property names of a class/interface. + * Type that resolves to a keyed-array with properties of a class as keys and + * their apropriate types as values. * * @psalm-type TokenName = 'properties-of'|'public-properties-of'|'protected-properties-of'|'private-properties-of' */