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

fix getComponentDevPatterns for TesterMain #7454

Merged
merged 2 commits into from
May 28, 2023
Merged

Conversation

ocombe
Copy link
Member

@ocombe ocombe commented May 26, 2023

Proposed Changes

getComponentDevPatterns in TesterMain is not coherent with the same function from DocsMain & CompositionsMain, it is supposed to return {name: string, pattern: string[]}, but in TesterMain it sometimes will return string[] and sometimes {name: string, pattern: string[]}.
Also typescript incorrectly infers the return type to string[] (why it doesn't detect the issue? I don't know, it should have thrown a typecast error), which means that you would falsely believe that you would get the correct type until it doesn't...

@ocombe ocombe requested a review from GiladShoham May 26, 2023 13:27
@GiladShoham GiladShoham enabled auto-merge (squash) May 28, 2023 10:26
@GiladShoham GiladShoham merged commit 1f80261 into master May 28, 2023
@GiladShoham GiladShoham deleted the fix/tester-dev-patterns branch May 28, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants