Skip to content

Conversation

@maoxiaoke
Copy link
Collaborator

  • support user config & cli option check

@ClarkXia
Copy link
Collaborator

这个能力 0.x 版本和 1.x 版本应该都需要

this.registerConfig('userConfig', args);
}

public hasConfigRegisterd = (type: 'userConfigRegistration' | 'cliOptionRegistration'): (name: string) => boolean => (name: string): boolean => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type CheckRegistedConfig = (name: string) => boolean;
hasConfigRegisterd = (type: 'userConfigRegistration' | 'cliOptionRegistration'): CheckRegistedConfig

是不是多了一层类型返回?
另外由于 api 比较简单,可以考虑下是不是一个函数就能承载,统一都是 cliOptions 和 userConfig 用 type 来区分

@maoxiaoke maoxiaoke requested a review from ClarkXia August 24, 2021 07:52
@maoxiaoke maoxiaoke changed the base branch from master to release-next August 25, 2021 03:49
@maoxiaoke maoxiaoke requested a review from ClarkXia August 25, 2021 04:04
@ClarkXia ClarkXia merged commit 7799a1a into release-next Aug 25, 2021
@delete-merged-branch delete-merged-branch bot deleted the feat/hasUserConfigRegistered branch August 25, 2021 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants