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

Addon-docs: Angular empty string now infers to "string" instead of "void" #12994

Conversation

activenode
Copy link
Contributor

Issue: #12986

What I did

  • I added a test for an empty string to make sure it's covered: ['', { name: 'string' }]
  • I fixed the extractTypeFromValue function to verify that when valueType == string it will infer a string

How to test

Test is added. Should be covered now. For testing if the issue is fixed please refer to the description in the issue.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Merging for now, but are there more types that need improved inference? Any chance you can put together a followup @activenode ?

@shilman shilman changed the title fix: empty string now infers to "string" instead of "void" Addon-docs: Angular empty string now infers to "string" instead of "void" Nov 4, 2020
@shilman shilman merged commit 60278c8 into storybookjs:next Nov 4, 2020
@activenode
Copy link
Contributor Author

I can do a follow-up.

@activenode
Copy link
Contributor Author

activenode commented Nov 4, 2020

I also found that the test was put in the wrong place and it should've failed (seems to have slipped in).
Will immediately create a follow-up PR to fix this.

(it is adding the test in the with compodoc type but it should be exactly in the without compodoc type).

So just the test is wrong but still it needs to be fixed. See #13009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants