import { Edam } from '../index'; export declare type AsyncOrSync = Promise | T; export declare type PromptType = 'checkbox' | 'radio' | 'input' | 'suggest' | any; export interface Prompt { message: string; default?: any; yes?: boolean; when?: (vars: Variables) => boolean; name: string; type: PromptType; choices?: Array; transform?: Function; deniesStore?: boolean; transformer?: (val: any, set: Record, context: Record) => any; validate?: (val: any, set: Record, context: Record) => string | boolean; } export declare type Hook = string | ((...args: any[]) => void); export declare type Glob = string; export declare type VarCenter = { once: Function; always: Function; }; export declare type GetVariable = (vc: VarCenter) => AsyncOrSync; export declare type Variable = GetVariable | any; export declare type Variables = { [name: string]: Variable; }; export declare type StrictLoader = Function & { raw?: boolean; }; export declare type StrictLoaderWithOption = [StrictLoader, any]; export declare type Loader = Array | string | StrictLoader | StrictLoaderWithOption; export declare type Matcher = Glob | Glob[] | RegExp | Function; export declare type Mapper = { test?: Matcher; mimeTest?: Matcher; loader: Loader; }; export declare type Dynamic = (answer: object) => T | Promise; export declare function defineConfig(config: UserTemplateConfig): UserTemplateConfig; export declare type UserTemplateConfig = TemplateConfig | ((edam: Edam) => TemplateConfig); export default interface TemplateConfig extends TemplateGeneratingConfig { prompts?: Array; /** * answers => ({ hooks, ignore, ...(exclude prompts) }) */ process?: (answers: any) => TemplateGeneratingConfig; } export interface TemplateGeneratingConfig { hooks?: { [hookName: string]: Array | Hook; } | Dynamic<{ [hookName: string]: Array | Hook; }>; ignore?: string[] | Dynamic; variables?: Variables | Dynamic; root?: string | Dynamic; loaders?: { [loaderId: string]: Array; }; mappers?: Array; move?: Dynamic> | Record; copy?: Dynamic> | Record; usefulHook?: { gitInit?: boolean; installDependencies?: boolean; installDevDependencies?: boolean; }; }