We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a10ab commit 0e7e3b1Copy full SHA for 0e7e3b1
src/compiler/checker.ts
@@ -6572,7 +6572,8 @@ namespace ts {
6572
function isJSDocOptionalParameter(node: ParameterDeclaration) {
6573
return isInJavaScriptFile(node) && (
6574
node.type && node.type.kind === SyntaxKind.JSDocOptionalType
6575
- || some(getJSDocParameterTags(node), paramTag => paramTag.isBracketed || !!paramTag.typeExpression && paramTag.typeExpression.type.kind === SyntaxKind.JSDocOptionalType));
+ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) =>
6576
+ isBracketed || !!typeExpression && typeExpression.type.kind === SyntaxKind.JSDocOptionalType));
6577
}
6578
6579
function tryFindAmbientModule(moduleName: string, withAugmentations: boolean) {
0 commit comments