diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 759b443e74240..52f9ef05f37b1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -816,7 +816,7 @@ namespace ts { function hasFileWithHigherPriorityExtension(file: string, literalFiles: Map, wildcardFiles: Map, extensions: string[], keyMapper: (value: string) => string) { const extensionPriority = getExtensionPriority(file, extensions); const adjustedExtensionPriority = adjustExtensionPriority(extensionPriority); - for (let i = ExtensionPriority.Highest; i < adjustedExtensionPriority; ++i) { + for (let i = ExtensionPriority.Highest; i < adjustedExtensionPriority; i++) { const higherPriorityExtension = extensions[i]; const higherPriorityPath = keyMapper(changeExtension(file, higherPriorityExtension)); if (hasProperty(literalFiles, higherPriorityPath) || hasProperty(wildcardFiles, higherPriorityPath)) { @@ -838,7 +838,7 @@ namespace ts { function removeWildcardFilesWithLowerPriorityExtension(file: string, wildcardFiles: Map, extensions: string[], keyMapper: (value: string) => string) { const extensionPriority = getExtensionPriority(file, extensions); const nextExtensionPriority = getNextLowestExtensionPriority(extensionPriority); - for (let i = nextExtensionPriority; i < extensions.length; ++i) { + for (let i = nextExtensionPriority; i < extensions.length; i++) { const lowerPriorityExtension = extensions[i]; const lowerPriorityPath = keyMapper(changeExtension(file, lowerPriorityExtension)); delete wildcardFiles[lowerPriorityPath]; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 137a603407a4c..d0f27a2046f61 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -116,7 +116,7 @@ namespace ts { } export function indexOfAnyCharCode(text: string, charCodes: number[], start?: number): number { - for (let i = start || 0, len = text.length; i < len; ++i) { + for (let i = start || 0, len = text.length; i < len; i++) { if (contains(charCodes, text.charCodeAt(i))) { return i; } @@ -824,7 +824,7 @@ namespace ts { const aComponents = getNormalizedPathComponents(a, currentDirectory); const bComponents = getNormalizedPathComponents(b, currentDirectory); const sharedLength = Math.min(aComponents.length, bComponents.length); - for (let i = 0; i < sharedLength; ++i) { + for (let i = 0; i < sharedLength; i++) { const result = compareStrings(aComponents[i], bComponents[i], ignoreCase); if (result !== Comparison.EqualTo) { return result; @@ -846,7 +846,7 @@ namespace ts { return false; } - for (let i = 0; i < parentComponents.length; ++i) { + for (let i = 0; i < parentComponents.length; i++) { const result = compareStrings(parentComponents[i], childComponents[i], ignoreCase); if (result !== Comparison.EqualTo) { return false; @@ -1021,9 +1021,9 @@ namespace ts { // Iterate over each include base path and include unique base paths that are not a // subpath of an existing base path - include: for (let i = 0; i < includeBasePaths.length; ++i) { + include: for (let i = 0; i < includeBasePaths.length; i++) { const includeBasePath = includeBasePaths[i]; - for (let j = 0; j < basePaths.length; ++j) { + for (let j = 0; j < basePaths.length; j++) { if (containsPath(basePaths[j], includeBasePath, path, !useCaseSensitiveFileNames)) { continue include; } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 9b97c99eaa397..2c23e4016eb30 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -139,10 +139,6 @@ namespace ts { } } - function getCanonicalPath(path: string): string { - return path.toLowerCase(); - } - function getNames(collection: any): string[] { const result: string[] = []; for (let e = new Enumerator(collection); !e.atEnd(); e.moveNext()) { @@ -357,10 +353,6 @@ namespace ts { } } - function getCanonicalPath(path: string): string { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; - } - function getAccessibleFileSystemEntries(path: string): FileSystemEntries { try { const entries = _fs.readdirSync(path || ".").sort(); @@ -501,4 +493,4 @@ namespace ts { return undefined; // Unsupported host } })(); -} +} diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index bcb91fbbfdaf3..769e72d385127 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -287,10 +287,6 @@ class ProjectRunner extends RunnerBase { return Harness.IO.fileExists(getFileNameInTheProjectTest(fileName)); } - function directoryExists(directoryName: string): boolean { - return Harness.IO.directoryExists(getFileNameInTheProjectTest(directoryName)); - } - function getSourceFileText(fileName: string): string { let text: string = undefined; try {