TypeDoc supports code blocks in Markdown and uses Shiki to provide syntax highlighting.
If no language is specified, the code block is assumed to be TypeScript:
// A fabulous variableconst x: number | string = 12
You can specify the language at the start of your code block like this:
```rust
Use the tsx language to get JSX support:
tsx
function BasicComponent(): ReactElement { return <div>Test</div>}
You might want to write code in the language your backend uses. Here's some Python:
for i in range(30): print(i + 1)
And some CSS:
.card { background-color: white; padding: 1rem; border: 1px solid lightgray;}
If you don't want syntax highlighting, use the text language:
text
package.json src/ index.ts __tests__/ index.test.ts
View the full list of supported languages. You can also get this list by running typedoc --help.
typedoc --help
Generated using TypeDoc
TypeDoc supports code blocks in Markdown and uses Shiki to provide syntax highlighting.
If no language is specified, the code block is assumed to be TypeScript:
You can specify the language at the start of your code block like this:
Use the
tsx
language to get JSX support:You might want to write code in the language your backend uses. Here's some Python:
And some CSS:
If you don't want syntax highlighting, use the
text
language:View the full list of supported languages. You can also get this list by running
typedoc --help
.