A-A+

typescript相关

2019年12月02日 JavaScript 暂无评论 阅读 11 次

dispatch/history 接口怎么添加

import { History } from 'history';
import { Dispatch, AnyAction, } from 'redux';
interface AIDetailProps {
  dispatch: Dispatch<AnyAction>;
  history:History
}

e的类型

 onHandleFinalDiagnose = (e:React.ChangeEvent<HTMLInputElement>, item: object) => {

How to define type for a function callback (as any function type, not universal any) used in a method parameter

The global type Function serves this purpose.

Additionally, if you intend to invoke this callback with 0 arguments and will ignore its return value, the type () => void matches all functions taking no arguments.

标签:

给我留言

Copyright © web前端技术开发个人博客 保留所有权利  京ICP备14060653号 Theme  Ality

用户登录