(link: JSDocApiSeeLink)
| 2343 | } |
| 2344 | |
| 2345 | function 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 | |
| 2355 | function appendPublicSeeDiagnostics( |
| 2356 | files: ReadonlyArray<JSDocModelFile>, |
no test coverage detected