Remove unused getImplementorAtPosition
This commit is contained in:
parent
970aac6458
commit
c417df4306
|
@ -749,29 +749,6 @@ module FourSlash {
|
|||
}
|
||||
}
|
||||
|
||||
public verifyImplementorsCountIs(count: number, localFilesOnly: boolean = true) {
|
||||
var implementors = this.getImplementorsAtCaret();
|
||||
var implementorsCount = 0;
|
||||
|
||||
if (localFilesOnly) {
|
||||
var localFiles = this.testData.files.map<string>(file => file.fileName);
|
||||
// Count only the references in local files. Filter the ones in lib and other files.
|
||||
implementors.forEach((entry) => {
|
||||
if (localFiles.some((filename) => filename === entry.fileName)) {
|
||||
++implementorsCount;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
implementorsCount = implementors.length;
|
||||
}
|
||||
|
||||
if (implementorsCount !== count) {
|
||||
var condition = localFilesOnly ? "excluding libs" : "including libs";
|
||||
this.raiseError("Expected implementors count (" + condition + ") to be " + count + ", but is actually " + implementors.length);
|
||||
}
|
||||
}
|
||||
|
||||
private getMemberListAtCaret() {
|
||||
return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, true);
|
||||
}
|
||||
|
@ -788,10 +765,6 @@ module FourSlash {
|
|||
return this.languageService.getReferencesAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
}
|
||||
|
||||
private getImplementorsAtCaret() {
|
||||
return this.languageService.getImplementorsAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
}
|
||||
|
||||
private assertionMessage(name: string, actualValue: any, expectedValue: any) {
|
||||
return "\nActual " + name + ":\n\t" + actualValue + "\nExpected value:\n\t" + expectedValue;
|
||||
}
|
||||
|
|
|
@ -892,7 +892,6 @@ module ts {
|
|||
getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[];
|
||||
getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
getImplementorsAtPosition(fileName: string, position: number): ReferenceEntry[];
|
||||
|
||||
getNavigateToItems(searchValue: string): NavigateToItem[];
|
||||
getNavigationBarItems(fileName: string): NavigationBarItem[];
|
||||
|
@ -5444,7 +5443,6 @@ module ts {
|
|||
getDefinitionAtPosition,
|
||||
getReferencesAtPosition,
|
||||
getOccurrencesAtPosition,
|
||||
getImplementorsAtPosition: (filename, position) => [],
|
||||
getNameOrDottedNameSpan,
|
||||
getBreakpointStatementAtPosition,
|
||||
getNavigateToItems,
|
||||
|
|
|
@ -133,12 +133,6 @@ module ts {
|
|||
*/
|
||||
getOccurrencesAtPosition(fileName: string, position: number): string;
|
||||
|
||||
/**
|
||||
* Returns a JSON-encoded value of the type:
|
||||
* { fileName: string; textSpan: { start: number; length: number}; isWriteAccess: boolean }[]
|
||||
*/
|
||||
getImplementorsAtPosition(fileName: string, position: number): string;
|
||||
|
||||
/**
|
||||
* Returns a JSON-encoded value of the type:
|
||||
* { name: string; kind: string; kindModifiers: string; containerName: string; containerKind: string; matchKind: string; fileName: string; textSpan: { start: number; length: number}; } [] = [];
|
||||
|
@ -696,16 +690,6 @@ module ts {
|
|||
});
|
||||
}
|
||||
|
||||
/// GET IMPLEMENTORS
|
||||
public getImplementorsAtPosition(fileName: string, position: number): string {
|
||||
return this.forwardJSONCall(
|
||||
"getImplementorsAtPosition('" + fileName + "', " + position + ")",
|
||||
() => {
|
||||
return this.languageService.getImplementorsAtPosition(fileName, position);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// COMPLETION LISTS
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
///<reference path="fourslash.ts" />
|
||||
|
||||
////class C {
|
||||
//// /**/p;
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.implementorsCountIs(0);
|
|
@ -1,6 +0,0 @@
|
|||
///<reference path="fourslash.ts" />
|
||||
////function fo/**/o() {
|
||||
////}
|
||||
|
||||
goTo.marker();
|
||||
verify.implementorsCountIs(0);
|
Loading…
Reference in a new issue