Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stories typechecking fix (#4042) #4043

Merged
merged 4 commits into from
Nov 29, 2023
Merged

Conversation

Fsss126
Copy link
Contributor

@Fsss126 Fsss126 commented Nov 28, 2023

Closes: #4042

Description

Setup proper type checking in stories and eliminated preexisting TS errors

What was done

  • Fixed problem that importing .vue files in stories raised TS error "Cannot find module or its corresponding type declarations." via including *.stories.ts files in tsconfig.json Typescript erros in stories #4042
  • Added separate tsconfig.build.json to pass to build:types so that stories still don't end up in generated type declarations
  • Added typecheck script for type checking all project code including stories and hooked in precommit stage
  • Fixed more TS errors that popped up on typecheck, namely:
    • Typed all stories with interactions play with StoryFn
    • Added "@testing-library/jest-dom" types to tsconfig to have jest-dom assertions methods on expect properly typed

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

@Fsss126 Fsss126 added the storybook Relates to storybook label Nov 28, 2023
@Fsss126 Fsss126 requested review from asvae and m0ksem November 28, 2023 16:38
@Fsss126 Fsss126 self-assigned this Nov 28, 2023
@Fsss126 Fsss126 merged commit 358e632 into epicmaxco:develop Nov 29, 2023
2 checks passed
@Fsss126 Fsss126 mentioned this pull request Dec 1, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storybook Relates to storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript erros in stories
2 participants