import { HttpEventType } from '@angular/common/http'; /** * A file with constants and functions that are helpers. */ /** * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to * flaky browser support and the value not being defined in Closure's typings. */ export declare const MAX_SAFE_INTEGER: number; /** * The markdown file extension. */ export declare const MARKDOWN_FILE_EXTENSION: string; /** * A collection of key/value elements, where the keys are strings. */ export declare type Params = { [key: string]: T; }; /** * An enum that describes an action through a text. */ export declare enum ActionText { /** * Viewing action. */ view = "view", /** * Adding action. */ add = "add", /** * Editing action. */ edit = "edit" } /** * An object of paths that is used to get the child controls in a `FormGroup`/`FormArray` control. * The value of its properties is a dot-delimited string value or an array of string/number values * that define the path to a child control. */ export declare type ChildControlsPath = { [key: string]: Array | string; }; /** * An enum that represents the language texts. */ export declare enum LanguageTexts { /** * The Spanish language. */ EspaƱol = "Espa\u00F1ol", /** * The English language. */ English = "English" } /** * An enum that represents the language text abbreviations. */ export declare enum LanguageAbbrs { /** * The Spanish language abbreviation. */ es = "es", /** * The English language abbreviation. */ en = "en" } /** * The list of language texts. */ export declare const LANGUAGE_TEXTS_LIST: LanguageTexts[]; /** * The list of language text abbreviations. */ export declare const LANGUAGE_ABBRS_LIST: LanguageAbbrs[]; /** * Converts the language representation from string to number. * If the string specified is not registered as a language, then returns -1 number value. * The Spanish language is: 0 as number, and 'es' as string. * The English language is: 1 as number, and 'en' as string. * In other words, it follows the order of `LANGUAGE_TEXTS_LIST` and `LANGUAGE_ABBRS_LIST` enums. * @param lang The language text abbreviation to be used. * @returns Returns the language as a number based on its representation as string. * If the string specified is not registered as a language, then returns -1 number value. */ export declare function convertLangFromStringToNumber(lang: string | LanguageAbbrs): number; /** * Converts the language representation from number to string. * If the number specified is not registered as a language, then returns empty string value. * The Spanish language is: 0 as number, and 'es' as string. * The English language is: 1 as number, and 'en' as string. * In other words, it follows the order of `LANGUAGE_TEXTS_LIST` and `LANGUAGE_ABBRS_LIST` enums. * @param index The language representation as number. * @returns Returns the language as a string based on its representation as number. * If the number specified is not registered as a language, then returns empty string value. */ export declare function convertLangFromNumberToString(index: number): string; /** * Returns a string that is the result of concatenating the specified `path` argument, * the language extension, and the markdown file extension. * @param path The path to markdown file without the language extension and the markdown file extension. * @param lang The language text abbreviation to be used. * @returns Returns the correct path to the markdown file. */ export declare function getPathWithLangExtension(path: string, lang: string | LanguageAbbrs): string; /** * Returns true if the specified `possDescendant` is descendant from the specified `ancestorName`; * otherwise, false. * @param possDescendant Possible descendant. * @param ancestorName Ancestor name. * Example in usage: * if (isDescendant(target.controlType.__proto__, InputControl.name)) { ... } */ export declare function isDescendant(possDescendant: any, ancestorName: string): boolean; /** * Returns a new value that represents the clone of the specified `target` value. * Implementation notes: * - If `target` is `undefined`, then returns `undefined`. * - If `target` is an object, then returns a cloned object with all its properties cloned. * - If `target` is an array, then returns a cloned array with all its values cloned. * @param target The target value to clone. */ export declare function cloneValue(target: any): any; /** * Returns a new value that represents the clone of the specified `target` value, and * sets all its properties/values of built-in type to `undefined`. * Implementation notes: * - If `target` is `undefined`, then returns `undefined`. * - If `target` is an object, then returns an object with all its properties of built-in type to `undefined`. * - If `target` is an array, then returns an array with all its values of built-in type to `undefined`. * @param target The target value to clone. */ export declare function cloneValueToUndefined(target: any): any; /** * Logs an error notification message to the console. * @param operation The operation during the error occurs. * @param place The place where the error occurs. * @param err The error that occurs. */ export declare function logError(operation: string, place: string, err: any): void; /** * Logs a complete notification message to the console. * @param operation The operation during the complete occurs. * @param place The place where the complete occurs. */ export declare function logComplete(operation: string, place: string): void; /** * Returns a string representation of `HttpEventType` specified. * @param httpEventType Type enumeration for the different kinds of `HttpEvent`. */ export declare function getHttpEventTypeToString(httpEventType: HttpEventType): string;