Render an operation's result as text a model can read.
Every result carries Instructions — the service's own guidance on
what to do with what came back — and that is included, because a model that
never sees it is left to guess.
These results are interfaces, which have no run-time identity, so the
dispatch here is on the field only one of them carries. outcome is tested
before operationId because a revert carries both.
TypeError If the value is not a result this renders. The parameter
type stops a typed caller reaching this; the guard is for the untyped
ones, which is most agent code.
Example
console.log(render(awaitsession.search('how does X work')))
Render an operation's result as text a model can read.
Every result carries Instructions — the service's own guidance on what to do with what came back — and that is included, because a model that never sees it is left to guess.
These results are interfaces, which have no run-time identity, so the dispatch here is on the field only one of them carries.
outcomeis tested beforeoperationIdbecause a revert carries both.