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

[search input] [ts] enterKeyHint required but undocumented #1653

Closed
willsoto opened this issue Mar 4, 2021 · 6 comments · Fixed by #1667
Closed

[search input] [ts] enterKeyHint required but undocumented #1653

willsoto opened this issue Mar 4, 2021 · 6 comments · Fixed by #1667
Assignees
Labels
bug Something isn't working
Projects

Comments

@willsoto
Copy link
Contributor

willsoto commented Mar 4, 2021

Bug

Expected behavior

The examples for SearchInput should compile when using TypeScript

Actual behavior

A TypeScript error is raised:

Property 'enterKeyHint' is missing in type '{ className: string; placeholder: string; value: string; onClear: () => void; onChange: (e: ChangeEvent<HTMLInputElement>) => void; }' but required in type 'Pick<SearchInputProps, "loading" | "error" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "size" | "key" | "accept" | "alt" | "autoComplete" | ... 281 more ... | "subLabel">'.ts(2741)

Steps to repro

  1. Load any example from the documentation in a codesandbox with TypeScript enabled. Example: https://codesandbox.io/s/v2ero?module=/example.tsx&file=/example.tsx:33-44

Related packages

  • search input@8.0.4

Environment

  • OS - MacOS 10.12
  • Browser version - FF 86
  • TS version - 4.0.5
@jaketrent jaketrent added the needs-triage Things that we need to make a decision on for a next step. label Mar 4, 2021
@jaketrent
Copy link
Contributor

Team triage: TS will suffer. We will wiiiiiin!

@jaketrent jaketrent added bug Something isn't working and removed needs-triage Things that we need to make a decision on for a next step. labels Mar 8, 2021
@danethurber
Copy link
Contributor

possibly related: DefinitelyTyped/DefinitelyTyped#43985

@jaketrent jaketrent added this to Prioritized in Work Mar 8, 2021
@jaketrent jaketrent moved this from Prioritized to In Progress in Work Mar 8, 2021
@jaketrent jaketrent self-assigned this Mar 8, 2021
@jaketrent
Copy link
Contributor

Critically, tsc works for the src itself without a problem:

$ tsc
$ tsc --version
Version 4.0.2

This seems to be a problem with codesandbox's runtime. I'm not sure how to update that. I took a shot adding @types/react to the dependencies of the docs/ project, but that doesn't seem to update the codesandbox environment.

@danethurber or @EdwardIrby , have any alternate ideas? If not, I'm tempted to close for now as a low-priority bug affecting only codesandbox.

@willsoto
Copy link
Contributor Author

willsoto commented Mar 8, 2021

@jaketrent this actually occurs in my source code as well but since I repro'd in codesandbox I did not include it in the report.

@jaketrent
Copy link
Contributor

@willsoto Thanks for the data point. For you, when you run tsc, what is the output of:

pwd
tsc --version

@willsoto
Copy link
Contributor Author

willsoto commented Mar 8, 2021

/content-libraries/apps/client
4.0.5

jaketrent added a commit that referenced this issue Mar 12, 2021
Work automation moved this from In Progress to Done Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Work
Done
Development

Successfully merging a pull request may close this issue.

3 participants