/** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ type IdentifierFn = (v: T) => unknown; export type SortingOrder = 'asc' | 'desc'; /** * Natural order a collection * You can define identifiers as callback functions, that get the element and return the value to sort. * * @param collection The collection to order * @param identifiers An array of identifiers to use, by default the identity of the element is used * @param orders Array of orders, by default all identifiers are sorted ascening */ export declare function orderBy(collection: readonly T[], identifiers?: IdentifierFn[], orders?: SortingOrder[]): T[]; export {};