pharos
pharos copied to clipboard
Convert component stories to TypeScript
The problem
Type safety is generally a productivity tool to aid in writing new code and avoiding regressions in existing code. Storybook is compatible with TypeScript and it would be nice to avoid type mismatches while authoring component stories.
The solution
Convert the current JSX story files to TSX and add type declarations accordingly.
Additional information
Patterns for using TypeScript for CSF aren't yet documented. This StackOverflow issue gives some leads on how to go about it.
This will likely require updating the TypeScript configuration, because right now the rootDir is packages/pharos/src/ but we're importing files that live in .storybook/.