import type ts from "typescript"; export type CommandType = "build" | "create" | "info" | "start" | "template" | "update"; export type AssetConfig = { include: string | string[]; exclude?: string | string[]; outDir?: string; root?: string; } | string; export type Transformer = ts.TransformerFactory | ts.CustomTransformerFactory; export type CompilerHook = (program: ts.Program) => Transformer; export type ScriptOptions = { config: Configuration; cacheDir: string; } & ConfigEnv; export type Prebuild = (options: ScriptOptions) => Promise | boolean | Promise | void; export type Postbuild = (options: ScriptOptions) => Promise | void; export interface ConfigEnv { mode: string; command: CommandType; } export interface Configuration { build?: { prebuild?: Prebuild[]; postbuild?: Postbuild[]; beforeHooks?: CompilerHook[]; afterHooks?: CompilerHook[]; afterDeclarationsHooks?: CompilerHook[]; deleteOutDir?: boolean; assets?: AssetConfig[]; watch?: boolean; watchAssets?: boolean; preserveWatchOutput?: boolean; sourceMap?: boolean; copyPackage?: boolean; removeDevDeps?: boolean; }; start?: { port?: number; binaryToRun?: string; inspect?: boolean | string; startupFile?: string; }; } export declare function defineConfig(config: Configuration): (options: ConfigEnv) => Configuration; export declare function defineConfig(config: (options: ConfigEnv) => Configuration): (options: ConfigEnv) => Configuration;