-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Support typescript #157
Support typescript #157
Conversation
1 similar comment
call: Function; | ||
select: Function; | ||
take: Function; | ||
cancel: Function; |
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.
这里需要定义 return 类型吗
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.
感觉这里不是很重要,就偷懒了。
mapDispatchToProps?: Function, | ||
mergeProps?: Function, | ||
options?: Object | ||
): Function; |
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.
export function connect(
mapStateToProps?: Function,
mapDispatchToProps?: Function,
mergeProps?: Function,
options?: Object
): Function(JSX.Element); // 这样?写法好像不对,因为如果不指定参数不会检测的吧,这个地方是强关联
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.
ok。
太厉害了,这么全,膜拜 @sorrycc 👍 👍 👍 佩服...我好好学习一下咋写的 |
👍 可以考虑把 fetch 和 router 的定义 PR 到对应的仓库?如果 creator 也能参与到维护中会更好。 |
Modified based on #142 . Close #142
Note:
d.ts
for individual export filestypings install dt~react dt~react-dom dt~react-router dt~react-router/history --global --save
, view boilerplate example for detailTODO:
setup({ dispatch }, done) {}