Skip to content

Commit 737859e

Browse files
author
Andy
authored
Put simpler condition in front of more complex one (microsoft#22696)
1 parent 096b2b0 commit 737859e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6720,8 +6720,8 @@ namespace ts {
67206720
// Record a new minimum argument count if this is not an optional parameter
67216721
const isOptionalParameter = param.initializer || param.questionToken || param.dotDotDotToken ||
67226722
iife && parameters.length > iife.arguments.length && !param.type ||
6723-
isJSDocOptionalParameter(param) ||
6724-
isUntypedSignatureInJSFile;
6723+
isUntypedSignatureInJSFile ||
6724+
isJSDocOptionalParameter(param);
67256725
if (!isOptionalParameter) {
67266726
minArgumentCount = parameters.length;
67276727
}

0 commit comments

Comments
 (0)