Skip to content

DocsSnippet

One fenced code block of a guide.

Import:

import type { DocsSnippet } from '@mnaoumov/typescript-dev-toolkit/docs-site/docs-snippets';

Signature:

export interface DocsSnippet

Properties

PropertyTypeDescription
codestringThe code, with any blockquote or indentation prefix of the fence stripped.
codeStartLinenumberThe 1-based line of the guide on which the code starts (the line after the opening fence).
contextstringThe declarations of the snippet-check: context markers above the fence, joined by newlines.
isJavaScriptbooleanWhether the snippet is JavaScript rather than TypeScript.
languagestringThe language of the fence.
skipReasonnull | stringThe reason given by a snippet-check: skip marker, or null when the snippet is checked.

Links to this page: