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 03d2382 commit a99b5cbCopy full SHA for a99b5cb
src/compiler/checker.ts
@@ -7392,7 +7392,7 @@ namespace ts {
7392
7393
function getTypeForThisExpressionFromJSDoc(node: Node) {
7394
const typeTag = getJSDocTypeTag(node);
7395
- if (typeTag && typeTag.typeExpression.type.kind === SyntaxKind.JSDocFunctionType) {
+ if (typeTag && typeTag.typeExpression && typeTag.typeExpression.type && typeTag.typeExpression.type.kind === SyntaxKind.JSDocFunctionType) {
7396
const jsDocFunctionType = <JSDocFunctionType>typeTag.typeExpression.type;
7397
if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === SyntaxKind.JSDocThisType) {
7398
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
0 commit comments