mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #4203 from hoanhtien/fixOccurrenceTypos
Fix occurrence typos
This commit is contained in:
@@ -2115,17 +2115,17 @@ module FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
private getOccurancesAtCurrentPosition() {
|
||||
private getOccurrencesAtCurrentPosition() {
|
||||
return this.languageService.getOccurrencesAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
}
|
||||
|
||||
public verifyOccurrencesAtPositionListContains(fileName: string, start: number, end: number, isWriteAccess?: boolean) {
|
||||
this.taoInvalidReason = "verifyOccurrencesAtPositionListContains NYI";
|
||||
|
||||
let occurrences = this.getOccurancesAtCurrentPosition();
|
||||
let occurrences = this.getOccurrencesAtCurrentPosition();
|
||||
|
||||
if (!occurrences || occurrences.length === 0) {
|
||||
this.raiseError('verifyOccurancesAtPositionListContains failed - found 0 references, expected at least one.');
|
||||
this.raiseError('verifyOccurrencesAtPositionListContains failed - found 0 references, expected at least one.');
|
||||
}
|
||||
|
||||
for (let occurrence of occurrences) {
|
||||
@@ -2144,7 +2144,7 @@ module FourSlash {
|
||||
public verifyOccurrencesAtPositionListCount(expectedCount: number) {
|
||||
this.taoInvalidReason = "verifyOccurrencesAtPositionListCount NYI";
|
||||
|
||||
let occurrences = this.getOccurancesAtCurrentPosition();
|
||||
let occurrences = this.getOccurrencesAtCurrentPosition();
|
||||
let actualCount = occurrences ? occurrences.length : 0;
|
||||
if (expectedCount !== actualCount) {
|
||||
this.raiseError(`verifyOccurrencesAtPositionListCount failed - actual: ${actualCount}, expected:${expectedCount}`);
|
||||
@@ -2172,7 +2172,7 @@ module FourSlash {
|
||||
for (let highlight of highlightSpans) {
|
||||
if (highlight && highlight.textSpan.start === start && ts.textSpanEnd(highlight.textSpan) === end) {
|
||||
if (typeof kind !== "undefined" && highlight.kind !== kind) {
|
||||
this.raiseError('verifyDocumentHighlightsAtPositionListContains failed - item "kind" value does not match, actual: ' + highlight.kind + ', expected: ' + kind + '.');
|
||||
this.raiseError(`verifyDocumentHighlightsAtPositionListContains failed - item "kind" value does not match, actual: ${highlight.kind}, expected: ${kind}.`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2181,7 +2181,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
let missingItem = { fileName: fileName, start: start, end: end, kind: kind };
|
||||
this.raiseError('verifyOccurancesAtPositionListContains failed - could not find the item: ' + JSON.stringify(missingItem) + ' in the returned list: (' + JSON.stringify(documentHighlights) + ')');
|
||||
this.raiseError(`verifyDocumentHighlightsAtPositionListContains failed - could not find the item: ${JSON.stringify(missingItem)} in the returned list: (${JSON.stringify(documentHighlights)})`);
|
||||
}
|
||||
|
||||
public verifyDocumentHighlightsAtPositionListCount(expectedCount: number, fileNamesToSearch: string[]) {
|
||||
|
||||
@@ -4620,7 +4620,7 @@ namespace ts {
|
||||
case SyntaxKind.BreakKeyword:
|
||||
case SyntaxKind.ContinueKeyword:
|
||||
if (hasKind(node.parent, SyntaxKind.BreakStatement) || hasKind(node.parent, SyntaxKind.ContinueStatement)) {
|
||||
return getBreakOrContinueStatementOccurences(<BreakOrContinueStatement>node.parent);
|
||||
return getBreakOrContinueStatementOccurrences(<BreakOrContinueStatement>node.parent);
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.ForKeyword:
|
||||
@@ -4946,7 +4946,7 @@ namespace ts {
|
||||
return map(keywords, getHighlightSpanForNode);
|
||||
}
|
||||
|
||||
function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): HighlightSpan[] {
|
||||
function getBreakOrContinueStatementOccurrences(breakOrContinueStatement: BreakOrContinueStatement): HighlightSpan[] {
|
||||
let owner = getBreakOrContinueOwner(breakOrContinueStatement);
|
||||
|
||||
if (owner) {
|
||||
|
||||
Reference in New Issue
Block a user