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(types): more accurate form types #5067

Merged
merged 3 commits into from
Apr 10, 2020
Merged

fix(types): more accurate form types #5067

merged 3 commits into from
Apr 10, 2020

Conversation

jquense
Copy link
Member

@jquense jquense commented Mar 25, 2020

Does this seem better? They types are fairly off right now b/c nothing is actually a class anymore.

@jquense jquense requested review from glenjamin and taion March 25, 2020 14:18
@@ -210,7 +211,7 @@ import {
<Form.Control
as="textarea"
rows={3}
innerRef={React.createRef<HTMLTextAreaElement>()}
Copy link
Member Author

Choose a reason for hiding this comment

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

IDK why these were added innerRef isn't supported on these

@kosmiq
Copy link
Collaborator

kosmiq commented Mar 25, 2020

The changes themselves looks good to me. I do however wonder about the error the test throws.

    <Form.Control
      type="email"
      placeholder="name@example.com"
      ref={React.createRef<HTMLInputElement>()}
      onChange={(e) => {
        // $ExpectType React.FormEvent<FormControlElement>
        e;
      }}
    />

It is set to expect React.FormEvent but actually returns FormEvent. I see that @jquense added the ExceptType line. Typo or do we get the wrong type back?

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.

None yet

3 participants