File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 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 {
16821682
16831683 function isImplementation ( node : Node ) : boolean {
16841684 return ! ! ( node . flags & NodeFlags . Ambient )
1685- || ( isVariableLike ( node ) ? hasInitializer ( node )
1685+ ? ! ( isInterfaceDeclaration ( node ) || isTypeAliasDeclaration ( node ) )
1686+ : ( isVariableLike ( node ) ? hasInitializer ( node )
16861687 : isFunctionLikeDeclaration ( node ) ? ! ! node . body
16871688 : isClassLike ( node ) || isModuleOrEnumDeclaration ( node ) ) ;
16881689 }
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