File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -10380,9 +10380,11 @@ namespace ts {
10380
10380
10381
10381
function getReturnTypeFromJSDocComment(func: SignatureDeclaration | FunctionDeclaration): Type {
10382
10382
const returnTag = getJSDocReturnTag(func);
10383
- if (returnTag) {
10383
+ if (returnTag && returnTag.typeExpression ) {
10384
10384
return getTypeFromTypeNode(returnTag.typeExpression.type);
10385
10385
}
10386
+
10387
+ return undefined;
10386
10388
}
10387
10389
10388
10390
function createPromiseType(promisedType: Type): Type {
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @allowNonTsExtensions : true
4
+ // @Filename : file.js
5
+ //// /**
6
+ //// * This is a very cool function that is very nice.
7
+ //// * @returns something
8
+ //// * @param p anotherthing
9
+ //// */
10
+ //// function a1(p) {
11
+ //// try {
12
+ //// throw new Error('x');
13
+ //// } catch (x) { x--; }
14
+ //// return 23;
15
+ //// }
16
+ ////
17
+ //// x - /**/a1()
18
+
19
+ goTo . marker ( ) ;
20
+ verify . quickInfoExists ( ) ;
You can’t perform that action at this time.
0 commit comments