MCPcopy Create free account
hub / github.com/denoland/std / assertDocs

Function assertDocs

_tools/check_docs.ts:392–419  ·  view source on GitHub ↗
(specifiers: string[])

Source from the content-addressed store, hash-verified

390}
391
392async function assertDocs(specifiers: string[]) {
393 const docs = await doc(specifiers, { resolve });
394 for (const d of Object.values(docs).flat()) {
395 if (d.jsDoc === undefined || d.declarationKind !== "export") continue; // this is caught by other checks
396
397 const document = d as DocNodeWithJsDoc<DocNode>;
398 assertHasDeprecationDesc(document);
399 switch (document.kind) {
400 case "moduleDoc": {
401 if (document.location.filename.endsWith("/mod.ts")) {
402 assertModuleDoc(document);
403 }
404 break;
405 }
406 case "function": {
407 assertFunctionDocs(document);
408 break;
409 }
410 case "class": {
411 assertClassDocs(document);
412 break;
413 }
414 case "interface":
415 assertInterfaceDocs(document);
416 break;
417 }
418 }
419}
420
421export async function checkDocs(specifiers: string[]) {
422 const { success, stderr } = await new Deno.Command(Deno.execPath(), {

Callers 1

checkDocsFunction · 0.85

Calls 6

assertHasDeprecationDescFunction · 0.85
assertModuleDocFunction · 0.85
assertFunctionDocsFunction · 0.85
assertClassDocsFunction · 0.85
assertInterfaceDocsFunction · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected