From a0fe7a90f0811bc65770e00c1f3d73aa8f75afec Mon Sep 17 00:00:00 2001 From: Garrett Dawson <37080130+ggdawson@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:57:42 -0700 Subject: [PATCH] docs: add tsconfig note to @carbon/react README.md (#15679) --- .all-contributorsrc | 3 ++- README.md | 2 +- packages/react/README.md | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 58d8d3326b1e..f4a82e66915b 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1422,7 +1422,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/37080130?v=4", "profile": "https://github.com/ggdawson", "contributions": [ - "code" + "code", + "doc" ] } ], diff --git a/README.md b/README.md index 9d35c271ad8a..a2adeec35a52 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
J Thomas

💻 -
Garrett Dawson

💻 +
Garrett Dawson

💻 📖 diff --git a/packages/react/README.md b/packages/react/README.md index 09bb47c58110..231335eee797 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -51,6 +51,25 @@ to include `node_modules` in its `includePaths` option. For more information, checkout the [configuration](../styles/docs/sass.md#configuration) section in our Sass docs. +### TypeScript + +There is an ongoing project to add `*.d.ts` files to `@carbon/react`. Though not +all components have yet been typed, you can still use the project successfully +in a TypeScript setting, provided you amend to your `tsconfig.json` or +equivalent configuration file. Include the `skipLibCheck: true` compiler option: + +```json +{ + "compilerOptions": { + "skipLibCheck": true + } +} +``` + +To track the progress of TypeScript adoption, check out: + +- [TypeScript Adoption](https://github.com/orgs/carbon-design-system/projects/53) + ## Usage The `@carbon/react` package provides components and icons for the Carbon Design