kcfe / dobux

🍃 Lightweight responsive state management solution.

Home Page:https://kcfe.github.io/dobux/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: 这种隐式 any 有办法让它报错吗

MinJieLiu opened this issue · comments

这种隐式 any 有办法让它报错吗,写着写着就忘记加类型了
image

这个不是框架层面控制的,需要把 tsconfig 里面的 strict: true 开启,然后配置下 eslint,https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md

没有用的,这个参数是框架主动给他设置成了 any,如果框架将其设置成 unknown ,主动加上类型后又会报错

export interface ConfigReducer<S = any> {
  (state: S, ...payload: any): void
}

好的,这个我看下。欢迎 PR