HH\Shapes::at

Returns the value of the field $index of $shape, throws if the field is missing

public static function at<T as shape(...)>(
  HH\darray $shape,
  arraykey $index,
);

Use this to access optional fields on shapes.

Parameters

  • HH\darray $shape
  • arraykey $index