UNPKG

@stacksjs/dtsx

Version:

A modern, fast .d.ts generation tool, powered by Bun.

36 lines (35 loc) 1.11 kB
import type { DtsGenerationConfig } from './types'; /** * Get the configuration, loading from config file if available */ export declare function getConfig(cwd?: string): Promise<DtsGenerationConfig>; /** * Reset the cached config (useful for testing) */ export declare function resetConfig(): void; /*.ts'], * keepComments: true, * }) * ``` */ export declare function defineConfig(config: Partial<DtsGenerationConfig>): DtsGenerationConfig; /** * Define a dtsx configuration with async support * Allows loading plugins or other async dependencies * * @example * ```ts * // dtsx.config.ts * import { defineConfigAsync } from 'dtsx' * * export default defineConfigAsync(async () => ({ * root: './src', * outdir: './dist', * plugins: [await loadPlugin()], * })) * ``` */ export declare function defineConfigAsync(configFn: () => Promise<Partial<DtsGenerationConfig>>): () => Promise<DtsGenerationConfig>; export declare const defaultConfig: DtsGenerationConfig; // For backwards compatibility - synchronous access with default fallback export declare const config: DtsGenerationConfig;