noImplicitAny开启后,@tarojs/taro/types 中有大量的“ implicitly has an 'any' type ” 错误
Open
Nobody has claimed this yet.
F-react
T-weapp
V-3
- Dominant language
- TypeScript
- Stars
- 37.7k
- Forks
- 4.9k
- Avg merge
- 10d 8h
- Merged PRs (30d)
- 4
Description
相关平台
微信小程序
小程序基础库: 2.14.3
使用框架: React
复现步骤
tsconfig中设置 noImplicitAny: true,
在taro项目中执行tsc
期望结果
无报错
实际结果
有大量的“ implicitly has an 'any' type ” 错误
环境信息
� Taro v3.0.23
Taro CLI 3.0.23 environment info:
System:
OS: Windows 10
Binaries:
Node: 14.8.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.7 - C:\Program Files\nodejs\npm.CMD
补充信息
animation.d.ts文件中有如下类型定义
interface timingFunction {
linear
ease
'ease-in'
'ease-in-out'
'ease-out'
'step-start'
'step-end'
}
像这样的类型定义是否可以都加上显式的any定义?如:
interface timingFunction {
linear: any
ease: any
'ease-in': any
'ease-in-out': any
'ease-out': any
'step-start': any
'step-end': any
}
想尝试用@ts-nocheck 来规避,但异常文件数量实在太多了,要求每个开发者在每次npm install 后给所有异常文件都加上@ts-nocheck十分麻烦
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with noImplicitAny enabled and tsc in a Taro v3.0.23 project, then inspect the declarations under @tarojs/taro/types, including animation.d.ts. Confirm which declaration errors are reported and update the affected type definitions so the project completes tsc without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100