import type { OpenAPIServer } from '../types/open-api'; /** * Maps over array passing `isLast` bool to iterator as the second argument */ export declare function mapWithLast(array: T[], iteratee: (item: T, isLast: boolean) => P): P[]; /** * Creates an object with the same keys as object and values generated by running each * own enumerable string keyed property of object thru iteratee. * The iteratee is invoked with three arguments: (value, key, object). * * @param object the object to iterate over * @param iteratee the function invoked per iteration. */ export declare function mapValues(object: Record, iteratee: (val: T, key: string, obj: Record) => P): Record; /** * flattens collection using `prop` field as a children * @param collectionItems collection items * @param prop item property with child elements */ export declare function flattenByProp(collectionItems: T[], prop: P): T[]; export declare function stripTrailingSlash(path: string): string; export declare function isNumeric(value: unknown): value is number; export declare function appendToMdHeading(md: string, heading: string, content: string): string; export declare const isArrayOfObjects: (items: unknown) => items is []; export declare const deleteEmptyArrayItem: (items: unknown[]) => unknown[]; export declare const isMergeableObject: (item: unknown) => boolean; export declare function isAbsoluteUrl(url: string): boolean; export declare function transformStringToTelemetryId(...args: string[]): string; /** * simple resolve URL which doesn't break on strings with url fragments * e.g. resolveUrl('http://test.com:{port}', 'path') results in http://test.com:{port}/path */ export declare function resolveUrl(url: string, to: string): string; export declare function titleize(text: string): string; export declare function removeQueryStringAndHash(serverUrl: string): string; export declare function escapeHTMLAttrChars(str: string): string; export declare function unescapeHTMLChars(str: string): string; export declare function sanitizeItemId(id: string): string; export declare function useSchemaTitle(pointer: string, title?: string): string; export declare function get(object: GenericObject | undefined, path: string | Array, defval?: T): GenericObject; export declare function joinStringFactory(separator: string): (...args: (string | undefined)[]) => string; export declare const dottedString: (...args: (string | undefined)[]) => string; export declare function getWindowReferenceOptions(option: string): T | null; export declare const normalizeText: (text?: string | GenericObject) => string; export declare const getValueFromMdParsedExtension: (item: GenericObject, key: 'description' | 'summary' | 'x-summary' | 'x-enumDescriptions') => any; export declare function getServerDisplayName(server: OpenAPIServer): string | undefined; export declare function isLastInArray(arr: Array, index: number): boolean; export declare function isLastProperty(obj: object, key: string): boolean;