MCPcopy Index your code
hub / github.com/prettier/prettier / createOptionUsageType

Function createOptionUsageType

src/cli/usage.js:57–69  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

55}
56
57function createOptionUsageType(option) {
58 switch (option.type) {
59 case "boolean":
60 return null;
61 case "choice":
62 return `<${option.choices
63 .filter((choice) => !choice.deprecated)
64 .map((choice) => choice.value)
65 .join("|")}>`;
66 default:
67 return `<${option.type}>`;
68 }
69}
70
71function createChoiceUsages(choices, margin, indentation) {
72 const activeChoices = choices.filter((choice) => !choice.deprecated);

Callers 1

createOptionUsageHeaderFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…