/** * The jsconfig.json hash of paths */ export type PathsHash = { [x: string]: string[]; }; /** * The Hash of string:function plugins */ export type PluginHash = { [x: string]: Function; }; /** * The Alias HQ user settings; loaded and saved from package.json */ export type HQSettings = { root: string; configFile: string; extensions: string; prefix: string; folders: string[]; modules: string[]; }; /** * The core Alias HQ config; passed to plugins */ export type HQConfig = { /** * The absolute path to the config file folder */ rootUrl: string; /** * The relative path to the JSConfig base folder */ baseUrl: string; /** * The loaded aliases */ paths: PathsHash; }; /** * The Alias HQ plugins object; used to store and load all transforms */ export type HQPlugins = { /** * The list of loaded plugin names */ names: string[]; /** * Method to add new plugins */ add: Function; /** * The hash of plugins */ custom: PluginHash; }; /** * Convert paths config using a plugin or callback * * @param {string} plugin The name of an available plugin * @param {function} plugin A custom function * @param {object} [options] Any options to pass to the plugin */ export function get(plugin: string, options?: object): any; /** * Load config * * @param {string} [value] Pass no value for to determine config file automatically * @param {string} value Pass an absolute path to load from alternate location * @returns {object} The Alias HQ instance */ export function load(value?: string): object; /** * @type {HQConfig} */ export const config: HQConfig; /** * * @type {HQPlugins} */ export const plugins: HQPlugins; /** * @type {HQSettings} */ export const settings: HQSettings;