Closed
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