HH\Lib\C\onlyx

This API is part of the Hack Standard Library, not HHVM itself.

Returns the first and only element of the given Traversable, or throws if the Traversable is empty

namespace HH\Lib\C;

function onlyx<T>(
  Traversable<T> $traversable,
): T;

For Traversables with more than one element, see C\firstx.

Parameters