Skip to main content

Function: withSafeTypeOperationFailureObserver()

withSafeTypeOperationFailureObserver<Result>(observer: SafeTypeOperationFailureObserver<string>, operation: () => Result): Result

Defined in: _internal/safe-type-operation.ts:149

Run one operation with a scoped failure observer that is always cleaned up.

Type Parametersโ€‹

Resultโ€‹

Result

Parametersโ€‹

observerโ€‹

SafeTypeOperationFailureObserver<string>

Observer registered for the operation scope.

operationโ€‹

() => Result

Synchronous operation to execute while observing failures.

Returnsโ€‹

Result

Return value produced by operation.