@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / HelperRollback
Interface: HelperRollback<TResult>
Type-only v1 descriptor for cleanup admitted after a helper succeeds.
Returning this descriptor from HelperApplyResult.rollback requests best-effort cleanup if later serial work fails. The callback remains consumer-authored and callable by its owner. The descriptor grants no evaluator admission or traversal authority; the compatibility evaluator exclusively owns admission and reverse-order invocation.
Type Parameters
TResult
TResult = unknown
Direct or recursively adopted cleanup result.
Properties
run()
readonly run: () => MaybePromise<TResult>;Cleanup invoked at most once by one evaluator-owned traversal.
The result crosses the standard read-once thenable boundary: a direct value keeps cleanup synchronous, while a callable then is adopted before the evaluator continues to the next older cleanup.
Returns
MaybePromise<TResult>
key?
readonly optional key: string;Stable machine-readable helper key for diagnostics.
label?
readonly optional label: string;Human-readable cleanup description for observers.
