import type { Annotation, AnnotationList, ArrayWithIndex, ComplexType, RawMetadata, Reference, TypeDefinition } from '@sap-ux/vocabularies-types'; export { EnumIsFlag } from '@sap-ux/vocabularies-types/vocabularies/EnumIsFlag'; export { TermToTypes } from '@sap-ux/vocabularies-types/vocabularies/TermToTypes'; export { VocabularyReferences as defaultReferences } from '@sap-ux/vocabularies-types/vocabularies/VocabularyReferences'; export type ReferencesWithMap = Reference[] & { referenceMap?: Record; reverseReferenceMap?: Record; }; /** * Splits a string at the first occurrence of a separator. * * @param string The string to split * @param separator Separator, e.g. a single character. * @returns An array consisting of two elements: the part before the first occurrence of the separator and the part after it. If the string does not contain the separator, the second element is the empty string. */ export declare function splitAtFirst(string: string, separator: string): [string, string]; /** * Splits a string at the last occurrence of a separator. * * @param string The string to split * @param separator Separator, e.g. a single character. * @returns An array consisting of two elements: the part before the last occurrence of the separator and the part after it. If the string does not contain the separator, the second element is the empty string. */ export declare function splitAtLast(string: string, separator: string): [string, string]; /** * Returns the substring before the first occurrence of a separator. * * @param string The string * @param separator Separator, e.g. a single character. * @returns The substring before the first occurrence of the separator, or the input string if it does not contain the separator. */ export declare function substringBeforeFirst(string: string, separator: string): string; /** * Returns the substring before the last occurrence of a separator. * * @param string The string * @param separator Separator, e.g. a single character. * @returns The substring before the last occurrence of the separator, or the input string if it does not contain the separator. */ export declare function substringBeforeLast(string: string, separator: string): string; /** * Transform an unaliased string representation annotation to the aliased version. * * @param references currentReferences for the project * @param unaliasedValue the unaliased value * @returns the aliased string representing the same */ export declare function alias(references: ReferencesWithMap, unaliasedValue: string): string; /** * Transform an aliased string to its unaliased version given a set of references. * * @param references The references to use for unaliasing. * @param aliasedValue The aliased value * @param namespace The fallback namespace * @returns The equal unaliased string. */ export declare function unalias(references: ReferencesWithMap, aliasedValue: string | undefined, namespace?: string): string | undefined; /** * Differentiate between a ComplexType and a TypeDefinition. * * @param complexTypeDefinition * @returns true if the value is a complex type */ export declare function isComplexTypeDefinition(complexTypeDefinition?: ComplexType | TypeDefinition): complexTypeDefinition is ComplexType; export declare function Double(value: number): { isDouble(): boolean; valueOf(): number; toString(): string; }; export declare function Decimal(value: number): { isDecimal(): boolean; valueOf(): number; toString(): string; }; export declare const initialSymbol: unique symbol; export interface IResettable { reset(): void; collectDynamic(object: any, property: string | number | symbol): void; } /** * Defines a lazy property. * * The property is initialized by calling the init function on the first read access, or by directly assigning a value. * * @param converter The converter instance * @param object The host object * @param property The lazy property to add * @param init The function that initializes the property's value */ export declare function lazy(converter: IResettable, object: Type, property: Key, init: () => Type[Key]): void; /** * Creates a function that allows to find an array element by property value. * * @param array The array * @param property Elements in the array are searched by this property * @returns A function that can be used to find an element of the array by property value. */ export declare function createIndexedFind(array: Array, property: keyof T): (value: T[keyof T]) => T | undefined; /** * Adds a 'get by value' function to an array. * * If this function is called with addIndex(myArray, 'name'), a new function 'by_name(value)' will be added that allows to * find a member of the array by the value of its 'name' property. * * @param array The array * @param property The property that will be used by the 'by_{property}()' function * @returns The array with the added function */ export declare function addGetByValue>(array: Array, property: P): ArrayWithIndex; /** * Copy of the one from edmx-parser because we don't want a dependency. * @param baseMetadata * @param parserOutput */ export declare function mergeRawMetadata(baseMetadata: RawMetadata, parserOutput: RawMetadata): void; /** * Merge annotations from different sources together by overwriting at the term level. * * @param references References, used to resolve aliased annotation targets and aliased annotation terms. * @param annotationSources Annotation sources * @returns the resulting merged annotations */ export declare function mergeAnnotations(references: Reference[], ...annotationSources: { name: string; annotationList: AnnotationList[]; }[]): Record; //# sourceMappingURL=utils.d.ts.map