Put simpler condition in front of more complex one (#22696)

This commit is contained in:
Andy
2018-03-19 13:35:19 -07:00
committed by GitHub
parent 096b2b0712
commit 737859e3c1

View File

@@ -6720,8 +6720,8 @@ namespace ts {
// Record a new minimum argument count if this is not an optional parameter
const isOptionalParameter = param.initializer || param.questionToken || param.dotDotDotToken ||
iife && parameters.length > iife.arguments.length && !param.type ||
isJSDocOptionalParameter(param) ||
isUntypedSignatureInJSFile;
isUntypedSignatureInJSFile ||
isJSDocOptionalParameter(param);
if (!isOptionalParameter) {
minArgumentCount = parameters.length;
}