Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用anzlyzer包检查函数参数是否可选?
例如:
myFunction(param1, {param2});
我想知道这param1是必需的并且param2是可选的
param1
param2
如果我没记错的话,参数有一个kindgetter,它是ParameterKind的一个实例,它可以是REQUIRED,NAMED或POSITIONAL(也是可选的)。
kind
REQUIRED
NAMED
POSITIONAL