MCPcopy Create free account
hub / github.com/Effect-TS/effect / uniqueDiagnostics

Function uniqueDiagnostics

packages/tools/jsdocs/src/Jsdocs.ts:1092–1104  ·  view source on GitHub ↗
(
  diagnostics: ReadonlyArray<JSDocDiagnostic>
)

Source from the content-addressed store, hash-verified

1090}
1091
1092function uniqueDiagnostics(
1093 diagnostics: ReadonlyArray<JSDocDiagnostic>
1094): ReadonlyArray<JSDocDiagnostic> {
1095 const seen = new Set<string>()
1096 return diagnostics.filter((item) => {
1097 const key = `${item.code}:${item.message}`
1098 if (seen.has(key)) {
1099 return false
1100 }
1101 seen.add(key)
1102 return true
1103 })
1104}
1105
1106const standardHeadings = ["**When to use**", "**Details**", "**Gotchas**"] as const
1107

Callers 2

parseCoreJSDocFunction · 0.85
parseSourceFileDocsFunction · 0.85

Calls 3

hasMethod · 0.65
addMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected