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

Stricter Typescript #24

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

sarink
Copy link
Contributor

@sarink sarink commented Oct 12, 2020

  • Add "strict": true to tsconfig (https://www.typescriptlang.org/tsconfig#strict)
  • Add requestIdleCallback window types and removes // ts-ignore statements
  • Add null-checking around childRef.current (it's possible that a ref's current value is null)
  • Use the built-in React.FunctionComponent<Props> type for the function
  • In the case of noWrapper, since children could be an array, and an array is not a valid return type for a component, wrap them in a fragment <>{children}</>

@sarink sarink mentioned this pull request Oct 12, 2020
@sarink
Copy link
Contributor Author

sarink commented Dec 7, 2020

@ScriptedAlchemy wanna check this one out instead?

@PascalPixel
Copy link

PascalPixel commented Feb 10, 2021

@hadeeb please fix these types, it just has to tell us that it returns a JSX.Element, at the moment it says it returns {}. 🙏

@Mati365
Copy link

Mati365 commented Mar 19, 2021

bump, declare function LazyHydrate(props: Props): {}; returns wrong type

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.

3 participants