Warning As of v11.29.x, the
@carbon/icons-react
package ships its own TypeScript definitions. As such,@types/carbon__icons-react
is no longer needed and has been removed. This repo is archived and will remain public for historical purposes.
This repo generates TypeScript definitions (@types/carbon__icons-react) for the @carbon/icons-react icon library using the @carbon/icons package.
This repo uses bun
. See the docs for installation instructions.
- Manually upgrade the minor version of
@carbon/icons
. - Run
bun generate-types
.
- This will generate the source code in
dist/
. - If there are changes, the
tests/index.test.ts
should expectedly fail. Fix the broken test and commit the changes.
If there are changes, perform the following steps to update the type definitions:
- Fork https://github.com/DefinitelyTyped/DefinitelyTyped.
- Create a new branch (e.g.,
carbon-icons-react-<version>
). - Copy the generated files from
dist/
toDefinitelyTyped/types/carbon__icons-react
.