apisurf
Version:
Analyze API surface changes between npm package versions to catch breaking changes
18 lines (17 loc) • 665 B
TypeScript
import { TypeDefinition } from '../types/TypeDefinition.js';
/**
* Compares TypeScript type definitions to identify breaking and non-breaking changes.
*/
export declare function compareTypeDefinitions(base: Map<string, TypeDefinition>, head: Map<string, TypeDefinition>): {
breakingChanges: Array<{
type: 'export-removed' | 'type-changed' | 'parameter-changed' | 'property-removed';
description: string;
before: string;
after?: string;
}>;
nonBreakingChanges: Array<{
type: 'export-added' | 'parameter-added' | 'property-added' | 'type-updated';
description: string;
details: string;
}>;
};