pharos icon indicating copy to clipboard operation
pharos copied to clipboard

Convert component stories to TypeScript

Open daneah opened this issue 3 years ago • 1 comments

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.

daneah avatar Nov 09 '22 01:11 daneah

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/.

daneah avatar Nov 13 '22 18:11 daneah