DocsSnippet
One fenced code block of a guide.
Import:
import type { DocsSnippet } from '@mnaoumov/typescript-dev-toolkit/docs-site/docs-snippets';Signature:
export interface DocsSnippetProperties
| Property | Type | Description |
|---|---|---|
| code | string | The code, with any blockquote or indentation prefix of the fence stripped. |
| codeStartLine | number | The 1-based line of the guide on which the code starts (the line after the opening fence). |
| context | string | The declarations of the snippet-check: context markers above the fence, joined by newlines. |
| isJavaScript | boolean | Whether the snippet is JavaScript rather than TypeScript. |
| language | string | The language of the fence. |
| skipReason | null | string | The reason given by a snippet-check: skip marker, or null when the snippet is checked. |
Links to this page: