1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

docs: add properties-of type to plugins type system

This commit is contained in:
Patrick Remy 2022-02-24 18:50:35 +01:00
parent 8ebc9b599f
commit 51f3b9869b
No known key found for this signature in database
GPG Key ID: FE25C0B14C0500CD
2 changed files with 6 additions and 1 deletions

View File

@ -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<MyClass>`)
`TTemplatePropertiesOf` - Represents the type used when using TPropertiesOf when type of the class is a template
`TTypeAlias` - To be documented
### Scalar supertype

View File

@ -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'
*/