【发布时间】:2021-06-09 21:59:21
【问题描述】:
import _ from 'lodash'
const x = _.add(3, 2) // no linting error
const foo = _.flow(
_.add, // @typescript-eslint/unbound-method
square,
)
为什么使用 lodash 的 flow() 会破坏它自己的 add() 并且有解决方案吗?
【问题讨论】:
-
不幸的是,我无法使用 Typescript 4.3.2 版复制它。您使用哪个版本的 Typescript?另外,您使用哪个版本的 lodash 和 @types/lodash?
标签: typescript lodash eslint