File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -6417,11 +6417,15 @@ namespace ts {
6417
6417
return [ getReferenceEntryFromNode ( parent . initializer ) ] ;
6418
6418
}
6419
6419
else if ( isFunctionLike ( parent ) && parent . type === containingTypeReference && parent . body && parent . body . kind === SyntaxKind . Block ) {
6420
- return [ forEachReturnStatement ( < Block > parent . body , ( returnStatement ) => {
6420
+ let result : ReferenceEntry [ ] ;
6421
+
6422
+ forEachReturnStatement ( < Block > parent . body , ( returnStatement ) => {
6421
6423
if ( returnStatement . expression && isImplementationExpression ( returnStatement . expression ) ) {
6422
- return getReferenceEntryFromNode ( returnStatement . expression ) ;
6424
+ ( result || ( result = [ ] ) ) . push ( getReferenceEntryFromNode ( returnStatement . expression ) ) ;
6423
6425
}
6424
- } ) ] ;
6426
+ } ) ;
6427
+
6428
+ return result ;
6425
6429
}
6426
6430
else if ( isTypeAssertionExpression ( parent ) && isImplementationExpression ( parent . expression ) ) {
6427
6431
return [ getReferenceEntryFromNode ( parent . expression ) ] ;
Original file line number Diff line number Diff line change 4
4
5
5
//// interface Fo/*interface_definition*/o { hello: () => void }
6
6
////
7
+ //// let x: number = 9;
8
+ ////
7
9
//// function createFoo(): Foo {
10
+ //// if (x === 2) {
11
+ //// return [|{
12
+ //// hello() {}
13
+ //// }|];
14
+ //// }
8
15
//// return [|{
9
16
//// hello() {}
10
17
//// }|];
You can’t perform that action at this time.
0 commit comments