import { Issue } from "./validation"; export declare const flatArray: (arr: any[], d?: number) => any; export declare const ensureArray: (map: string | number | boolean | any[] | { [key: string]: any; }, key?: string, valueKey?: string) => any[]; /** * Checks the type of each property in a hashMap. Returns "mismatch" if property types are mixed, * otherwise returns type that corresponds to all properties. */ export declare const checkMapValueType: (map: { [key: string]: any; }) => "string" | "number" | "undefined" | "object" | "array" | "null" | "mismatch"; export declare const checkValueType: (value: any) => "string" | "number" | "undefined" | "object" | "array" | "null"; export declare const incrementString: (str: string) => string; export declare const spreadAllProps: (destObj: Object, sourceObj: Object) => any; export declare const spreadSelectProps: (sourceObj: Object, destObj: Object, keys: string[]) => void; export declare const intersection: (arrA?: any[], arrB?: any[]) => any[]; export declare const commaSeparatedToArray: (str: string | string[]) => string[]; export declare const charSeparatedToArray: (str: string | string[], pattern: RegExp) => string[]; export declare const snakeCase: (str?: string) => string; export declare const isEmpty: (obj: Object | any[]) => boolean; export declare const fetchByLoc: (obj: any, loc: string) => any; export declare const cleanupNull: (obj: Object) => any; export declare const nullifyObjValues: (obj: Object) => any; /** * FIXME: any unicode string should be a valid ID. Split connectionID props into distinct chunk map and sync that with SVG */ export declare function validateID(id: string): void; export declare const incrementLastLoc: (items: { loc: string; }[], prefix: string) => string; /** * Returns true if port is of type or type[] * If type is an array, will check if port is single item or array of any of types * @param port * @param type */ export declare const isType: (port: { type: { type: string; items: string; }; }, type: string | string[]) => boolean; export declare const flatten: (arr: any[]) => any[]; export declare const returnNumIfNum: (s: any, parseAsFloat?: boolean) => any; export declare const isFileType: (i: { type: { isNullable: boolean; type: string; items: string; }; }, required?: any) => boolean; export declare const hasFileType: (port: { type: { fields: any[]; type: string; items: string; isNullable: boolean; }; }) => boolean; /** * Returns the next available ID based on the provided ID which is unique in the given array. * @param {string} id * @param {Array<{id: string}>} set * @returns {string} */ export declare const getNextAvailableId: (id: string, set: { id: string; }[]) => string; export declare const checkIdValidity: (id: string, scope: { id: string; }[]) => void; export declare const concatIssues: (base: { [key: string]: Issue[]; }, add: { [key: string]: Issue | Issue[]; }, overwrite: boolean) => any; export declare const issueExistsInArray: (arr: Issue[], item: Issue) => boolean; export declare const checkPortIdUniqueness: (ports: { id: string; loc: string; }[]) => void;