MCPcopy Create free account
hub / github.com/webpack/webpack-cli / #isOptionNeeded

Method #isOptionNeeded

packages/webpack-cli/src/webpack-cli.ts:1003–1012  ·  view source on GitHub ↗
(option: CommandOption, neededOptions: Set<string>)

Source from the content-addressed store, hash-verified

1001 }
1002
1003 #isOptionNeeded(option: CommandOption, neededOptions: Set<string>): boolean {
1004 if (neededOptions.has(option.name)) {
1005 return true;
1006 }
1007
1008 // `makeOption` derives a single-character alias for these from the name.
1009 const alias = option.alias ?? (FLAGS_WITH_ALIAS.has(option.name) ? option.name[0] : undefined);
1010
1011 return typeof alias === "string" && neededOptions.has(alias);
1012 }
1013
1014 // Mirrors when `makeOption` registers a `--no-<name>` negated option.
1015 #optionSupportsNegation(option: CommandOption): boolean {

Callers 1

makeCommandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected