MCPcopy Index your code
hub / github.com/nodejs/node / resolvedIfExtensionMatches

Function resolvedIfExtensionMatches

test/fixtures/snapshot/typescript.js:43889–43892  ·  view source on GitHub ↗

Resolve from an arbitrarily specified file. Return `undefined` if it has an unsupported extension.

(extensions, path)

Source from the content-addressed store, hash-verified

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) {

Callers 1

loaderFunction · 0.85

Calls 1

extensionIsOkFunction · 0.85

Tested by

no test coverage detected