export type CreateTranslateRejectionParams<TMatched> = {
    /**
     * Builds the error thrown in place of a matched rejection.
     */
    mapTo: (error: TMatched) => Error;
    /**
     * Type guard selecting which rejections to translate. Anything it does not
     * match is rethrown untouched, so callers only translate the errors they
     * own. Narrowing to `TMatched` lets {@link CreateTranslateRejectionParams.mapTo}
     * receive a typed error without a cast.
     */
    match: (error: unknown) => error is TMatched;
};
/**
 * Builds a reusable decorator, bound once to a `match`/`mapTo` pair, that wraps
 * any async function so a matching rejection is rethrown as `mapTo(error)`
 * while every other rejection — and every resolved value — passes through
 * untouched. Unmatched errors are rethrown by reference, so the decorator can
 * never swallow or reshape an error it was not asked to translate.
 *
 * Binding `match`/`mapTo` up front keeps the generic wrapping machinery here
 * instead of at the call site: consumers get a plain `(fn) => wrappedFn`
 * decorator they can apply to many functions of differing signatures, each of
 * which keeps its own argument and return types.
 *
 * @notInstrumented
 */
export declare const createTranslateRejection: <TMatched>({ match, mapTo }: CreateTranslateRejectionParams<TMatched>) => <TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => Promise<TReturn>) => (...args: TArgs) => Promise<TReturn>;
//# sourceMappingURL=createTranslateRejection.d.ts.map