@sap-cloud-sdk/odata-common
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
23 lines (22 loc) • 796 B
TypeScript
import type { EntityBase, EntityIdentifiable, Constructable } from '../entity-base';
/**
* Is either ascending or descending.
*/
export type OrderType = 'asc' | 'desc';
/**
* OData queries take this to determine the order of results.
* @typeParam EntityT -
*/
export declare class Order<EntityT extends EntityBase> implements EntityIdentifiable<EntityT, any> {
_fieldName: string;
orderType: OrderType;
readonly _entityConstructor: Constructable<EntityT>;
readonly _entity: EntityT;
readonly _deSerializers: any;
/**
* Creates an instance of Order.
* @param _fieldName - Field to order by.
* @param orderType - Type of ordering, can be 'asc' for ascending or 'desc' for descending.
*/
constructor(_fieldName: string, orderType?: OrderType);
}