/** * Checks if a value is a plain object (not an array, function, or other object type) */ export declare const isObject: (obj: unknown) => obj is Record; export type ConfigLoader = 'jiti' | 'native'; export type LoadConfigOptions = { /** * The root path to resolve the config file. * @default process.cwd() */ cwd?: string; /** * The path to the config file, can be a relative or absolute path. * If not provided, the function will search for the config file in the `cwd`. */ path?: string; /** * A custom meta object to be passed into the config function. */ meta?: Record; /** * The environment mode to be passed into the config function. * @default process.env.NODE_ENV */ envMode?: string; /** * Specify the config loader, can be `jiti` or `native`. * - 'jiti': Use `jiti` as loader, which supports TypeScript and ESM out of the box * - 'native': Use native Node.js loader, requires TypeScript support in Node.js >= 22.6 * @default 'jiti' */ loader?: ConfigLoader; /** * The list of config file names to search for. * For example: ['app.config.ts', 'app.config.js'] * @default [] */ configFiles?: string[]; }; export type LoadConfigResult = Record> = { /** * The loaded configuration object with specified type. */ content: T; /** * The path to the loaded configuration file. * Return `null` if the configuration file is not found. */ filePath: string | null; }; /** * Resolves the path to the config file. */ export declare const resolveConfigPath: (root: string, configFiles: string[], customConfig?: string) => string | null; /** * Loads configuration from a file with generic type support. */ export declare function loadConfig = Record>({ cwd, path: configPath, meta, envMode, loader, configFiles, }?: LoadConfigOptions): Promise>; //# sourceMappingURL=index.d.ts.map