Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension.
(extensions, path)
| 43887 | } |
| 43888 | /** Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension. */ |
| 43889 | function resolvedIfExtensionMatches(extensions, path) { |
| 43890 | var ext = ts.tryGetExtensionFromPath(path); |
| 43891 | return ext !== undefined && extensionIsOk(extensions, ext) ? { path: path, ext: ext } : undefined; |
| 43892 | } |
| 43893 | /** True if `extension` is one of the supported `extensions`. */ |
| 43894 | function extensionIsOk(extensions, extension) { |
| 43895 | switch (extensions) { |
no test coverage detected