File tree 3 files changed +26
-1
lines changed 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -1682,7 +1682,8 @@ namespace ts.FindAllReferences.Core {
1682
1682
1683
1683
function isImplementation ( node : Node ) : boolean {
1684
1684
return ! ! ( node . flags & NodeFlags . Ambient )
1685
- || ( isVariableLike ( node ) ? hasInitializer ( node )
1685
+ ? ! ( isInterfaceDeclaration ( node ) || isTypeAliasDeclaration ( node ) )
1686
+ : ( isVariableLike ( node ) ? hasInitializer ( node )
1686
1687
: isFunctionLikeDeclaration ( node ) ? ! ! node . body
1687
1688
: isClassLike ( node ) || isModuleOrEnumDeclaration ( node ) ) ;
1688
1689
}
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ // Should go to object literals within cast expressions when invoked on interface
4
+
5
+ // @Filename : def.d.ts
6
+ //// export interface Interface { P: number }
7
+
8
+ // @Filename : ref.ts
9
+ //// import { Interface } from "./def";
10
+ //// const c: I/*ref*/nterface = [|{ P: 2 }|];
11
+
12
+ verify . allRangesAppearInImplementationList ( "ref" ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ // Should go to object literals within cast expressions when invoked on interface
4
+
5
+ // @Filename : def.d.ts
6
+ //// export type TypeAlias = { P: number }
7
+
8
+ // @Filename : ref.ts
9
+ //// import { TypeAlias } from "./def";
10
+ //// const c: T/*ref*/ypeAlias = [|{ P: 2 }|];
11
+
12
+ verify . allRangesAppearInImplementationList ( "ref" ) ;
You can’t perform that action at this time.
0 commit comments