加入麦门
8 月 21 日 · 周一
8 月 18 日 · 周五
8 月 11 日 · 周五
Eagerly waiting for @ViteConf! Get your free ticket! https://viteconf.org/23/tickets/hyoban?t=React
8 月 9 日 · 周三
https://rxresu.me 可能是全宇宙最好的简历生成器
Published a new post on my blockchain blog: 如何让 fetch 变的类型安全. Check it out now! https://blog.hyoban.cc/type-safe-fetch via @_xLog
8 月 7 日 · 周一
Published a new post on my blockchain blog: 远程兼职一年后. Check it out now! https://blog.hyoban.cc/work-one-year via @_xLog
8 月 6 日 · 周日
tsconfig 中关于类型检查的 option 1/n strict 等于一系列类型检查的合集,推荐尽量保持开启。alwaysStrict noImplicitAny noImplicitThis strictBindCallApply strictFunctionTypes strictNullChecks strictPropertyInitialization useUnknownInCatchVariables
4/n exactOptionalPropertyTypes 帮助你区别显式参数传入值为 undefined 的 key 与不传该 key,但是很多依赖库的里的类型定义没有区别它,所以开启会很麻烦
5/n noUncheckedIndexedAccess 为你提供访问未知 key 的类型安全,开启后对于 [propName: string]: string 的类型定义,访问未知 key 拿到的值类型会是 string | undefined,这个效果同样作用于数组下标的访问
6/n noImplicitReturns 帮助你检查函数中的每一条路径的返回值都和函数定义的返回值类型匹配
1. 开启后的报错 2. 修复的方式
1. 开启之前 2. 开启之后
8 月 1 日 · 周二
很好看的一个 vscode 主题,https://plastictheme.com/

