diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fe5a746a74df8..2d678afbf519a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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; }