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

Function unresolvedPublicSeeDiagnostic

packages/tools/jsdocs/src/Jsdocs.ts:2345–2353  ·  view source on GitHub ↗
(link: JSDocApiSeeLink)

Source from the content-addressed store, hash-verified

2343}
2344
2345function unresolvedPublicSeeDiagnostic(link: JSDocApiSeeLink): JSDocModelDiagnostic | undefined {
2346 if (link.resolution._tag === "Resolved" || link.range === undefined) return undefined
2347 const message = link.resolution.reason === "ambiguous"
2348 ? `@see link ${link.raw} is ambiguous; it must resolve to exactly one public JSDoc API. Candidates: ${
2349 link.resolution.candidates.join(", ")
2350 }`
2351 : `@see link ${link.raw} does not resolve to a public JSDoc API. Check that the target is exported and has valid public JSDoc.`
2352 return { ...diagnostic("public-see-target", message), range: link.range }
2353}
2354
2355function appendPublicSeeDiagnostics(
2356 files: ReadonlyArray<JSDocModelFile>,

Callers 2

Calls 2

diagnosticFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected