export declare type ReceiverFn = (it: T) => void; export declare type ReceiverFnWithReturn = (it: T) => R; export declare type ReceiverFnAsync = (it: T) => Promise; /** * @param contextObject value of `it` * @param receiverFns array of lambdas that accepts `it` * @return contextObject that is passed */ export declare const _then: (contextObject: T, ...receiverFns: ReceiverFn[]) => T; /** * @param contextObject value of `it` * @param receiverFn lambda that accepts `it` * @return contextObject that is passed */ export declare const _also: (contextObject: T, receiverFn: ReceiverFn) => T; /** * @param contextObject value of `it` * @param receiverFn lambda that accepts deep copy of `it` * @return deep copy of `it` */ export declare const _alsoSafe: (contextObject: T, receiverFn: ReceiverFn) => T; /** * @param contextObject value of `it` * @param receiverFn lambda that accepts `it` * @return {contextObject that is passed, promise returned by receiverFn} */ export declare const _alsoAsync: (contextObject: T, receiverFn: ReceiverFnAsync) => { contextObject: T; promiseFromReceiverFn: Promise; }; /** * @param contextObject value of `it` * @param receiverFn lambda that accepts deep copy of `it` * @return {contextObjectDeepCopy deep copy of `it`, promise returned by receiverFn} */ export declare const _alsoSafeAsync: (contextObject: T, receiverFn: ReceiverFnAsync) => { contextObjectDeepCopy: T; promiseFromReceiverFn: Promise; }; /** * @param contextObject value of `it` * @param receiverFnWithReturn lambda that accepts `it` * @return result of the receiverFnWithReturn (lambda) */ export declare const _let: (contextObject: T, receiverFnWithReturn: ReceiverFnWithReturn) => R; /** * @param contextObject value of `it` * @param receiverFnWithReturn lambda that accepts deep copy of `it` * @return result of the receiverFnWithReturn (lambda) */ export declare const _letSafe: (contextObject: T, receiverFnWithReturn: ReceiverFnWithReturn) => R; export interface ImplicitReceiverObject { fnWithReboundThis: (this: T) => void; } export interface ImplicitReceiverObjectWithReturn { fnWithReboundThis: (this: T) => R; } /** * @param contextObject value of `this` (in the `blockWithReboundThis` function) * @param objectContainingFnWithReboundThis object containing function `blockWithReboundThis` * which accepts contextObject (aka `this`) * @return contextObject that is passed */ export declare const _apply: (contextObject: T, objectContainingFnWithReboundThis: ImplicitReceiverObject) => T; /** * @param contextObject value of `this` (in the `blockWithReboundThis` function) * @param objectContainingFnWithReboundThis object containing function `blockWithReboundThis` * which accepts contextObject (aka `this`) * @return result of the `blockWithReboundThis` function */ export declare const _with: (contextObject: T, objectContainingFnWithReboundThis: ImplicitReceiverObjectWithReturn) => R;