Check in other places too
This commit is contained in:
parent
d64bbc0bec
commit
8c9baf81c5
1 changed files with 1 additions and 1 deletions
|
@ -7414,7 +7414,7 @@ namespace ts {
|
||||||
|
|
||||||
function getTypeForThisExpressionFromJSDoc(node: Node) {
|
function getTypeForThisExpressionFromJSDoc(node: Node) {
|
||||||
const typeTag = getJSDocTypeTag(node);
|
const typeTag = getJSDocTypeTag(node);
|
||||||
if (typeTag && typeTag.typeExpression.type.kind === SyntaxKind.JSDocFunctionType) {
|
if (typeTag && typeTag.typeExpression && typeTag.typeExpression.type && typeTag.typeExpression.type.kind === SyntaxKind.JSDocFunctionType) {
|
||||||
const jsDocFunctionType = <JSDocFunctionType>typeTag.typeExpression.type;
|
const jsDocFunctionType = <JSDocFunctionType>typeTag.typeExpression.type;
|
||||||
if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === SyntaxKind.JSDocThisType) {
|
if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === SyntaxKind.JSDocThisType) {
|
||||||
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
|
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type);
|
||||||
|
|
Loading…
Reference in a new issue