build() {
    this._reset();

    this.tree = captureRenderTree(this.owner);
    let serialized = this._serializeRenderNodes(this.tree);

    this._releaseStaleObjects();

    return serialized;
  }
Capture the render tree and serialize it for sending.

This returns an array of `SerializedRenderNode`:

type SerializedItem = string | number | bigint | boolean | null | undefined | { id: string };

interface SerializedRenderNode {
  id: string;
  type: 'outlet' | 'engine' | 'route-template' | 'component';
  name: string;
  args: {
    named: Dict<SerializedItem>;
    positional: SerializedItem[];
  };
  instance: SerializedItem;
  template: Option<string>;
  bounds: Option<'single' | 'range'>;
  children: SerializedRenderNode[];
}

@method build
@return {Array<SerializedRenderNode>} The render nodes tree.