Skip to content

KnowledgeFormatter

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-14-meta/knowledge-formatter.ts

Methods

MethodSignatureReturns
format`format(reference: MetaCategoryReferenceundefined, options: {
  maxChars: number;
  maxEntries: number;
  snippetTypes?: SnippetType[];
  groupByCategory?: boolean;
})` | `string` |

| formatDocList | formatDocList(reference: MetaCategoryReference | undefined, options: { maxEntries: number }) | string | | formatSnippets | formatSnippets(entries: KnowledgeEntry[], snippetType: SnippetType, maxChars: number) | string |

Where it refuses work

  • KnowledgeFormatter stops the work with an early return when !reference || !reference.entries || reference.entries.length === 0, in 2 places.
  • KnowledgeFormatter stops the work with an early return when entries.length === 0.
  • KnowledgeFormatter stops the work with an early return when options.groupByCategory.
  • KnowledgeFormatter stops the work with an early return when !entries || entries.length === 0.

Was this page helpful?

Download as PDF