Skip to content

[Feature Request] Provide a type helper function for config auto-complete #193

Closed
@Mister-Hope

Description

💭 Describe the feature

It's a bit annoying to use as in typescript and @type annotation in javascript.

Instead, a function helepr could be exported:

export const config = (userConfig: UserConfig) => UserConfig

This is exactly what a lot of tools like vite and vuepress are using.

Before:

/** @type {import('cz-git').UserConfig} */
module.exports = {
  // ...
}
improt type { UserConfig } from 'cz-git'

export default {
  // ...
} as UserConfig

After:

const { config } = require('cz-git');

module.exports = config({
  // ...
})
import { config } from 'cz-git';

export default config({
  // ...
})

💡 Proposed Solution

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions