-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5615 from Microsoft/getContextualTypeServices
Do not get the apparent type for 'getContextualType' in the services layer
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/cases/fourslash/findAllRefsPropertyContextuallyTypedByTypeParam01.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/// <reference path="./fourslash.ts" /> | ||
|
||
////interface IFoo { | ||
//// [|a|]: string; | ||
////} | ||
////class C<T extends IFoo> { | ||
//// method() { | ||
//// var x: T = { | ||
//// [|a|]: "" | ||
//// }; | ||
//// x.[|a|]; | ||
//// } | ||
////} | ||
//// | ||
//// | ||
////var x: IFoo = { | ||
//// [|a|]: "ss" | ||
////}; | ||
|
||
let ranges = test.ranges() | ||
for (let range of ranges) { | ||
goTo.position(range.start); | ||
|
||
verify.referencesCountIs(ranges.length); | ||
for (let expectedReference of ranges) { | ||
verify.referencesAtPositionContains(expectedReference); | ||
} | ||
} |