Psalm: Add support for aliased types

Created on 15 Dec 2016  路  2Comments  路  Source: vimeo/psalm

/** @psalm-type CoolType = A|B|null **/

...

/** @return CoolType */
function foo() {
...
}

/** @param CoolType $a **/
function bar ($a) : void { }

bar(foo());
enhancement

Most helpful comment

We might want to namespace this as @psalm-type.

All 2 comments

We might want to namespace this as @psalm-type.

Sick

Was this page helpful?
0 / 5 - 0 ratings