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()>(
  darray $shape,
  arraykey $index,
);

Use this to access optional fields on shapes.

Parameters

  • darray $shape
  • arraykey $index