Skip to content

Commit 1a673c4

Browse files
authored
Update typescript-support.mdx
1 parent 45e2f0f commit 1a673c4

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

docs/typescript-support.mdx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ title: TypeScript Support
33
description: "CodeHarborHub is built with Docusaurus, which is written in TypeScript and provides first-class TypeScript support."
44
---
55

6-
import TOCInline from '@theme/TOCInline';
7-
86
CodeHarborHub runs on **Docusaurus**, which is written entirely in TypeScript and provides first-class TypeScript support.
97

108
The minimum recommended version is **TypeScript 5.1**.
119

12-
<AdsComponent />
13-
1410
## Initialization {#initialization}
1511

1612
You can start a new CodeHarborHub site with full TypeScript support right from the scaffolding step.
@@ -22,13 +18,11 @@ npx create-docusaurus@latest my-site classic --typescript
2218

2319
This automatically sets up `.ts` and `.tsx` support for theme components and pages.
2420

25-
---
26-
2721
## Setup for Existing Projects {#setup}
2822

2923
If you’re migrating an existing CodeHarborHub site to TypeScript, install these packages:
3024

31-
```bash npm2yarn title="terminal"
25+
```bash npm2yarn
3226
npm install --save-dev typescript @docusaurus/module-type-aliases @docusaurus/tsconfig @docusaurus/types
3327
```
3428

@@ -43,10 +37,7 @@ Then create a `tsconfig.json` at your project root:
4337
}
4438
```
4539

46-
Docusaurus itself does not compile your TypeScript files.
47-
The `tsconfig.json` improves **editor IntelliSense**, and you can run `tsc` to type-check code locally or in CI.
48-
49-
<AdsComponent />
40+
Docusaurus itself does not compile your TypeScript files. The `tsconfig.json` improves **editor IntelliSense**, and you can run `tsc` to type-check code locally or in CI.
5041

5142
## Typing the Config File {#typing-config}
5243

@@ -110,8 +101,6 @@ export default config;
110101

111102
</details>
112103

113-
<AdsComponent />
114-
115104
## Swizzling TypeScript Theme Components {#swizzling-typescript-theme-components}
116105

117106
When swizzling (overriding) components, add the `--typescript` flag
@@ -133,6 +122,4 @@ If you maintain a custom theme, see the
133122
[Lifecycle APIs guide](https://docusaurus.io/docs/api/plugin-methods/extend-infrastructure#getTypeScriptThemePath)
134123
to add TypeScript support.
135124

136-
---
137-
138125
With TypeScript configured, **CodeHarborHub** gains **type safety, autocompletion, and better developer experience** across the entire documentation platform.

0 commit comments

Comments
 (0)