@sap-cloud-sdk/odata-v4
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
15 lines (14 loc) • 813 B
TypeScript
import type { Expandable, EntityApi } from '@sap-cloud-sdk/odata-common/internal';
import type { DeSerializers } from '../de-serializers';
import type { Entity } from '../entity';
/**
* @internal
* Get an object containing the given expand as a query parameter, or an empty object if none was given.
* @typeParam EntityT - Type of the entity to expand on.
* @param expands - The expands to transform to a query parameter.
* @param entityApi - Entity API of the entity to build the expand for.
* @returns An object containing the query parameter or an empty object/
*/
export declare function getExpand<EntityT extends Entity, DeSerializersT extends DeSerializers>(expands: Expandable<EntityT, DeSerializersT>[] | undefined, entityApi: EntityApi<EntityT, DeSerializersT>): Partial<{
expand: string;
}>;