final protected static async function renderChildAsync()

in src/core/Node.hack [808:825]


  final protected static async function renderChildAsync(
    \XHPChild $child,
  ): Awaitable<string> {
    if ($child is node) {
      return await $child->toStringAsync();
    }
    if ($child is \Facebook\XHP\UnsafeRenderable) {
      return await $child->toHTMLStringAsync();
    }
    if ($child is Traversable<_>) {
      throw new \Facebook\XHP\RenderArrayException(
        'Can not render traversables!',
      );
    }

    /* HH_FIXME[4281] stringish migration */
    return \htmlspecialchars((string)$child);
  }