You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Add generic type parameters to ChangelogFunctions for better type safety #1722
Currently, the ChangelogFunctions interface uses loose typing for the changelogOpts parameter (Record<string, any> or any), which forces changelog plugin authors to work around type safety issues.
exportconstgetReleaseLine: GetReleaseLine<{repo: string}>=async(changeset,versionType,options)=>{// options is now properly typed as { repo: string }};constchangelog: ChangelogFunctions<{repo: string}>={
getDependencyReleaseLine,
getReleaseLine,};
Migration Path
This would be a non-breaking change:
✅ Existing code continues to work unchanged
✅ New code can opt into stricter typing
✅ Library consumers can gradually adopt the enhanced types
Use Case
This enhancement would particularly benefit changelog plugins that require specific configuration options (like repository information for GitHub integration), allowing them to provide better type safety and developer experience.
Example Real-World Impact
Many changelog plugins need structured options:
// Repository info for GitHub linkstypeGitHubOptions={repo: string};// Custom formatting optionstypeFormattingOptions={repo: string;includeAuthors?: boolean;linkPRs?: boolean;};// Plugin-specific configurationtypeCustomOptions={repo: string;template?: string;categories?: Record<string,string[]>;};
With the proposed generic types, these plugins can provide full type safety without complex workarounds.
Activity
feat(types): add generic type parameters to changelog functions
feat(types): add generic type parameters to changelog functions
feat(types): add generic type parameters to changelog functions
bluwy commentedon Jun 15, 2026
Fixed in #2040