final |
|---|
| Methods | ||
|---|---|---|
public
static
|
map(Type $type, TypeTraverserCallable|(callable(Type $type, callable(Type): Type $traverse): Type) $cb): Type
Map a Type recursively Map a Type recursively For every Type instance, the callback can return a new Type, and/or decide to traverse inner types or to ignore them. The following example converts constant strings to objects, while preserving unions and intersections:
|
# |