UNPKG

@stacksjs/dtsx

Version:

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

39 lines (38 loc) 941 B
import type { Declaration } from './types'; /** * Merge declarations with the same name */ export declare function mergeDeclarations(declarations: Declaration[], config?: MergeConfig): MergeResult; /** * Merge declarations in content string */ export declare function mergeDeclarationsInContent(content: string, _config?: MergeConfig): string; /** * Merge configuration */ export declare interface MergeConfig { mergeInterfaces?: boolean mergeNamespaces?: boolean mergeTypes?: boolean mergeEnums?: boolean deduplicateIdentical?: boolean conflictStrategy?: 'first' | 'last' | 'error' preserveAllComments?: boolean } /** * Result of merge operation */ export declare interface MergeResult { declarations: Declaration[] mergedCount: number merges: MergeDetail[] } /** * Details of a single merge */ export declare interface MergeDetail { name: string kind: string sourceCount: number memberCount: number }