-
Notifications
You must be signed in to change notification settings - Fork 105
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
add TypeScript typings #33
base: master
Are you sure you want to change the base?
Conversation
Any progress on merging this? Looks good for me. cc @gaearon |
Up. |
> require('react-side-effect')
[Function: withSideEffect]
> require('react-side-effect').default
undefined |
now :)? |
LGTM |
rewind() is missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaearon could we get this PR merged after these changes? Its' been 2 years...
interface IDocumentTitleProps { | ||
title: string; | ||
} | ||
declare class DocumentTitle extends Component<IDocumentTitleProps, void> {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void
is not valid in newer React types. You should use {}
for back and forward compatibility.
@@ -0,0 +1,6 @@ | |||
import {Component} from 'react'; | |||
interface IDocumentTitleProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename the interface DocumentTitleProps
. It is not recommended to prefix interfaces with I
(although its somewhat still up for debate).
adds TypeScript typings