-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathtsconfig.json
More file actions
38 lines (38 loc) · 1.6 KB
/
Copy pathtsconfig.json
File metadata and controls
38 lines (38 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
/*
* `@docusaurus/tsconfig` sets `baseUrl` alongside a `@site/*` path mapping, but
* `extends` resolves `baseUrl` relative to the file that declares it, so the
* mapping points inside `node_modules/@docusaurus/tsconfig`. Redeclaring it here
* anchors it to the project root.
*
* TypeScript 6 deprecates `baseUrl` and 7 removes it. Dropping it here will not
* unblock those versions on its own, because the inherited one from
* `@docusaurus/tsconfig` triggers the same error, so this goes when upstream
* drops it. A `paths` mapping is not a substitute: the inherited `baseUrl`
* still wins.
*/
"baseUrl": ".",
/*
* Real ambient declarations for `@theme/*` and `@docusaurus/*`. Without them the
* catch-all `declare module` fallbacks in `index.d.ts` win and every swizzled
* component is typed as `any`.
*/
"types": ["@docusaurus/module-type-aliases", "@docusaurus/theme-classic"],
/*
* Lets `release-notes.d.json.ts` describe the generated `release-notes.json`.
* Ambient `declare module` cannot do this, as it does not apply to relative
* imports.
*/
"allowArbitraryExtensions": true,
"strict": true
},
/*
* `src` holds every TypeScript file in the project, and `index.d.ts` declares the
* `*.module.scss` imports those files rely on. Listing them explicitly also restores
* TypeScript's default excludes, notably `node_modules`, which the previous
* `exclude`-only config silently overrode.
*/
"include": ["src", "index.d.ts"]
}