From bf94a4ae415c77d0159e383eb691837400418f54 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 20 Dec 2016 12:39:56 -0800 Subject: [PATCH] Change function name --- src/compiler/moduleNameResolver.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 820abb73787..4291f05f24b 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -680,7 +680,7 @@ namespace ts { // A package.json "typings" may specify an exact filename, or may choose to omit an extension. const fromExactFile = tryFile(mainOrTypesFile, failedLookupLocations, onlyRecordFailures, state); if (fromExactFile) { - const resolved = fromExactFile && resolvedFromSuspiciousFile(extensions, fromExactFile); + const resolved = fromExactFile && resolvedIfExtensionMatches(extensions, fromExactFile); if (resolved) { return resolved; } @@ -709,7 +709,7 @@ namespace ts { } /** Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension. */ - function resolvedFromSuspiciousFile(extensions: Extensions, path: string): Resolved | undefined { + function resolvedIfExtensionMatches(extensions: Extensions, path: string): Resolved | undefined { const extension = tryGetExtensionFromPath(path); return extension !== undefined && extensionIsOk(extensions, extension) ? { path, extension } : undefined; }