import predicateType from '../helpers/predicateType'; /** * Creates a new array with the elements from the end of the given array * that satisfy the provided predicate function, stopping as soon as an element * does not satisfy it. * * @param {Array} array - The source array to query. * @param {Function} [predicate=identity] - The function invoked per iteration. * @returns {Array} - Returns the new array of elements. * * @example * takeRightWhile([1, 2, 3, 4, 5], n => n > 3); * // => [4, 5] * * takeRightWhile([{ name: 'John', active: false }, { name: 'Mary', active: true }], { active: true }); * // => [{ name: 'Mary', active: true }] */ declare const takeRightWhile: (array: T[], predicate?: predicateType) => T[]; export default takeRightWhile;