MCPcopy Index your code
hub / github.com/freshframework/fresh / assertDocs

Function assertDocs

tools/check_docs_lib.ts:327–351  ·  view source on GitHub ↗
(specifiers: string[])

Source from the content-addressed store, hash-verified

325}
326
327async function assertDocs(specifiers: string[]) {
328 const docs = await doc(specifiers, { resolve });
329 for (const d of Object.values(docs).flat()) {
330 if (d.jsDoc === undefined || d.declarationKind !== "export") continue;
331
332 const document = d as DocNodeWithJsDoc<DocNode>;
333 assertHasDeprecationDesc(document);
334 switch (document.kind) {
335 case "moduleDoc": {
336 if (document.location.filename.endsWith("/mod.ts")) {
337 assertModuleDoc(document);
338 }
339 break;
340 }
341 case "function": {
342 assertFunctionDocs(document);
343 break;
344 }
345 case "class": {
346 assertClassDocs(document);
347 break;
348 }
349 }
350 }
351}
352
353export async function checkDocs(specifiers: string[]) {
354 const { success, stderr } = await new Deno.Command(Deno.execPath(), {

Callers 1

checkDocsFunction · 0.85

Calls 4

assertHasDeprecationDescFunction · 0.85
assertModuleDocFunction · 0.85
assertFunctionDocsFunction · 0.85
assertClassDocsFunction · 0.85

Tested by

no test coverage detected