[Typescript] Step 3. Turn on "noImplicitAny" and even more strict mode
Step 3: Turn on "noImplicitAny"
From previous steps, we allow implicit any: https://www.cnblogs.com/Answer1215/p/16634618.html
Now, we need to turn on "noImplicitAny" mode.
tsconfig.json
"noImplicitAny": true,
Example commit: https://github.com/zhentian-wan/professional-ts/commit/ebc235ebe63a5ce78e526d6d8f0ad75f50a61f02
Step 3.1: Turn on "strict: true"
tsconfig.json
"strict": true /* Enable all strict type-checking options. */,
You can try to run tsc
command, to see whether there is any build error, if it is then fix it, if not, then continue
Step 3.2: Turn on other "strict" settings
tsconfig.json
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"stripInternal": true,
"forceConsistentCasingInFileNames": true
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
2019-08-29 [React + GraphQL] Use useLazyQuery to manually execute a query with Apollo React Hooks
2019-08-29 [CSS] Conditionally Assign Style to a Parent Element with Focus-Within Pseudo-class
2019-08-29 [Angular 8] Calculate and Measure Performance budgets with the Angular CLI
2019-08-29 [Angular 8] Custom Route Preloading with ngx-quicklink and Angular
2019-08-29 [Angular 8] Implement a Custom Preloading Strategy with Angular
2019-08-29 [Angular 8] Lazy loading with dynamic loading syntax
2018-08-29 [React] Prevent Unnecessary Rerenders of Compound Components using React Context