docs: add "TypeScript support" section in the "Modules using Sass/SCSS" section (#9807)

Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
Alberto Vilches 2024-02-01 12:03:53 +01:00 committed by GitHub
parent 09b2005759
commit 436e20a42a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -297,3 +297,17 @@ function MyComponent() {
);
}
```
#### TypeScript support
To enable TypeScript support for Sass/SCSS modules, the TypeScript configuration should be updated to add the `docusaurus-plugin-sass` type definitions. This can be done in the `tsconfig.json` file:
```diff
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
...
+ "types": ["docusaurus-plugin-sass"]
}
}
```