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

Function uniqueDiagnostics

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

Source from the content-addressed store, hash-verified

1068}
1069
1070function uniqueDiagnostics(
1071 diagnostics: ReadonlyArray<JSDocDiagnostic>
1072): ReadonlyArray<JSDocDiagnostic> {
1073 const seen = new Set<string>()
1074 return diagnostics.filter((item) => {
1075 const key = `${item.code}:${item.message}`
1076 if (seen.has(key)) {
1077 return false
1078 }
1079 seen.add(key)
1080 return true
1081 })
1082}
1083
1084const standardHeadings = ["**When to use**", "**Details**", "**Gotchas**"] as const
1085

Callers 2

parseCoreJSDocFunction · 0.85
parseSourceFileDocsFunction · 0.85

Calls 3

filterMethod · 0.80
addMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected