Open
Conversation
Owner
|
@najoast 不好意思,没有及时处理,导致代码冲突了;能否rebase一下再推上来; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why submit this PR?
#16 (comment)
参数名使用
options的原因这个参数表示一组选项,而不是单独的一个选项。使用复数形式更加准确地描述了它的性质。
同时也可以提高代码的可读性,比如:
没有使用
opts,因为options本身不是很长,没必要缩写。虽然很多库都使用 opts 作为选项参数名,但严格来说这是一种有损压缩,只有知道这个惯例的人才看的懂。参数标注
对于
options参数的说明,使用了 Emmylua 的标注。好处是直观/易懂,且对于使用了 Emmylua 插件的同学来说,还可以智能提示。