import Task from '@dojo/core/async/Task';
export interface TextLoader {
    (path: string): Task<string>;
}
/**
 * Return a string with all lines prefixed with a given prefix.
 */
export declare function prefix(message: string, prefix: string): string;
/**
 * Load config data from a given path, using a given text loader, and mixing args and/or a childConfig into the final
 * config value if provided.
 */
export declare function loadConfig(configPath: string, loadText: TextLoader, args?: {
    [key: string]: any;
}, childConfig?: string | string[]): Task<any>;
export declare function getConfigDescription(config: any): string;
/**
 * Normalize a path such that it ends in '/'
 */
export declare function normalizePathEnding(path: string): string;
/**
 * Parse an array of name=value arguments into an object
 */
export declare function parseArgs(rawArgs: string[]): {
    [key: string]: any;
};
/**
 * Parse a JSON string that may contain comments
 */
export declare function parseJson(json: string): any;
/**
 * Parse a particular type of value from a given value
 *
 * @param name The 'name' of the value being parsed (used for error messages)
 * @param value A value to parse something from
 * @param parser The type of thing to parse, or a parser function
 * @param requiredProperty Only used with 'object' and 'object[]' parsers
 */
export declare function parseValue(name: string, value: any, parser: TypeName | Parser, requiredProperty?: string): any;
export declare type TypeName = 'string' | 'boolean' | 'number' | 'regexp' | 'object' | 'string[]' | 'object[]';
export declare type Parser<T = any> = (value: any) => T;
/**
 * Remove all instances of of an item from any array and return the removed instances.
 */
export declare function pullFromArray<T>(haystack: T[], needle: T): T[];
/**
 * Split a config path into a file name and a child config name.
 */
export declare function splitConfigPath(path: string): {
    configFile: string;
    childConfig?: string;
};
/**
 * Convert an object to JSON, handling non-primitive properties
 *
 * @param object The object to serialise.
 * @returns A JSON string
 */
export declare function stringify(object: Object, indent?: string): string;
