MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / toString

Method toString

frontend/scripts/check-assets.ts:57–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 return Object.keys(this.problems).length !== 0;
56 }
57 public toString(): string {
58 stepSummary?.addHeading(`${this.type} Checks`, 2);
59 if (!this.hasError()) {
60 stepSummary?.addRaw("✅ all checks passed").addEOL();
61 return `${this.type} are all \u001b[32mvalid\u001b[0m`;
62 }
63
64 Object.entries(this.problems).forEach(([key, problems]) => {
65 let label: string = this.labels[key as T] ?? `${key}`;
66 stepSummary
67 ?.addRaw(`❌ ${label}`)
68 .addEOL()
69 .addList(problems as string[])
70 .addEOL();
71 });
72
73 return `${this.type} are \u001b[31minvalid\u001b[0m\n${Object.entries(
74 this.problems,
75 )
76 .map(([key, problems]) => {
77 let label: string = this.labels[key as T] ?? `${key}`;
78
79 return `${label}:\n ${(problems as string[])
80 .map((error) => `\t- ${error}`)
81 .join("\n")}`;
82 })
83 .join("\n")}`;
84 }
85}
86
87function findDuplicates<T>(items: T[]): T[] {

Callers 15

validateChallengesFunction · 0.95
validateLayoutsFunction · 0.95
validateQuotesFunction · 0.95
validateLanguagesFunction · 0.95
validateFontsFunction · 0.95
validateThemesFunction · 0.95
validateSoundsFunction · 0.95
runCommandFunction · 0.80
runProjectRootCommandFunction · 0.80
incrementVersionFunction · 0.80
checkUncommittedChangesFunction · 0.80
getFunboxFunction · 0.80

Calls 1

hasErrorMethod · 0.95

Tested by 2

toHaveLevelFunction · 0.64