Skip to content

Commit

Permalink
Merge pull request #5615 from Microsoft/getContextualTypeServices
Browse files Browse the repository at this point in the history
Do not get the apparent type for 'getContextualType' in the services layer
  • Loading branch information
DanielRosenwasser committed Nov 11, 2015
2 parents 0c96d7b + df1dd00 commit beb998b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace ts {
symbolToString,
getAugmentedPropertiesOfType,
getRootSymbols,
getContextualType: getApparentTypeOfContextualType,
getContextualType,
getFullyQualifiedName,
getResolvedSignature,
getConstantValue,
Expand Down
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);
}
}

0 comments on commit beb998b

Please sign in to comment.