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

Function getOptionDeclarationFromName

test/fixtures/snapshot/typescript.js:40700–40712  ·  view source on GitHub ↗
(getOptionNameMap, optionName, allowShort)

Source from the content-addressed store, hash-verified

40698 }
40699 ts.getOptionFromName = getOptionFromName;
40700 function getOptionDeclarationFromName(getOptionNameMap, optionName, allowShort) {
40701 if (allowShort === void 0) { allowShort = false; }
40702 optionName = optionName.toLowerCase();
40703 var _a = getOptionNameMap(), optionsNameMap = _a.optionsNameMap, shortOptionNames = _a.shortOptionNames;
40704 // Try to translate short option names to their full equivalents.
40705 if (allowShort) {
40706 var short = shortOptionNames.get(optionName);
40707 if (short !== undefined) {
40708 optionName = short;
40709 }
40710 }
40711 return optionsNameMap.get(optionName);
40712 }
40713 var buildOptionsNameMapCache;
40714 function getBuildOptionsNameMap() {
40715 return buildOptionsNameMapCache || (buildOptionsNameMapCache = createOptionNameMap(ts.buildOpts));

Callers 2

parseStringsFunction · 0.85
getOptionFromNameFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected