Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

备稿计划: TS 最佳实践之 枚举类型的判断 #114

Open
iugo opened this issue May 5, 2022 · 0 comments
Open

备稿计划: TS 最佳实践之 枚举类型的判断 #114

iugo opened this issue May 5, 2022 · 0 comments

Comments

@iugo
Copy link
Member

iugo commented May 5, 2022

我们应该以一种 "为了将来更不容易出错" 的办法去写.

比如我们约定, 如果要判断的枚举类型超过 3 项, 那么我们就不逐一判断, 而是使用枚举类型本身来判断. 以防止将来可能出错.

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

No branches or pull requests

1 participant