A hook complex result is an object with at minimum a boolean pass field,
and may optionally also carry replacement data / next_data fields that
the machine should adopt if the hook passes. This helper is used by the
hook-dispatch machinery to tell "hook returned a complex object" from
"hook returned a bare boolean / null / undefined".
Type guard that narrows an unknown value to a HookComplexResult.
A hook complex result is an object with at minimum a boolean
passfield, and may optionally also carry replacementdata/next_datafields that the machine should adopt if the hook passes. This helper is used by the hook-dispatch machinery to tell "hook returned a complex object" from "hook returned a bare boolean / null / undefined".