Feature: 这种隐式 any 有办法让它报错吗
MinJieLiu opened this issue · comments
MinJie commented
Ender Lee commented
这个不是框架层面控制的,需要把 tsconfig 里面的 strict: true
开启,然后配置下 eslint,https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md
MinJie commented
没有用的,这个参数是框架主动给他设置成了 any,如果框架将其设置成 unknown ,主动加上类型后又会报错
export interface ConfigReducer<S = any> {
(state: S, ...payload: any): void
}
Ender Lee commented
好的,这个我看下。欢迎 PR