Add Typescript types to UserProfileImage #4501
Labels
adopter: automation
Issues connected to work that accelerates IBM's automation offerings.
adopter: data & ai
Issues connected to work that accelerates IBM's Data & AI offerings.
adopter: security
Issues connected to work that accelerates IBM's Security offerings.
adopter: sustainability
Issues connected to work that accelerates IBM's sustainability offerings.
area: typescript
role: dev
type: infrastructure 🤖
Issues related to devops, builds, packaging
Milestone
As we add Typescript support, want to call out a few helpful tips from the Carbon TypeScript guide that is largely relevant to our library as well.
Changing the extension via git
When changing the file extension — do not simply rename the file. Instead, change the extension via
git
.For example,
Do not add types to internal components or functions
.js
/** @type any */
// @ts-check
to the first line in the file.Testing changes
A few different options for testing changes —
.tsx
file and validate whether or not it accepts the props as you’ve defined them.Tasks
Resources
Carbon’s guide on adding component types
The text was updated successfully, but these errors were encountered: