TypeScript Support
Docusaurus is written in TypeScript and provides first-class TypeScript support.
The minimum required version is TypeScript 5.1.
Initialization
Docusaurus supports writing and using TypeScript theme components. If the init template provides a TypeScript variant, you can directly initialize a site with full TypeScript support by using the --typescript
flag.
npx create-docusaurus@latest my-website classic --typescript
Below are some guides on how to migrate an existing project to TypeScript.