Preview environment

function codeBlock

declare function codeBlock<Content extends string>(content: Content): `\`\`\`\n${Content}\n\`\`\``;

Wraps the content inside a code block with an optional language.

Type Parameters

Content extends string

Parameters

content: Content
The content to wrap