BryanLeeNavigate back to the homepage

Bryan Lee

Web Developer. Now prefer TypeScript and Rust, mainly working on UED.

Link to $https://github.com/libyLink to $https://twitter.com/meetliby

记一次 new Array() 时错误传递参数导致 TypeScript 报错的来龙去脉

因为不想被 block 住,完成 ticket 是首要的,所以没有深究这个报错,便选择了折中的解决方案。后续空闲下来,再看这个部分的代码,认为 `Object.assign(this, data);` 这个地方写的异常丑陋, `new Providers()` 的传值被暴力复制给了 `this`,完全失去了传参意义,且代码可维护性极差。

May 25th, 2020 · 1 min read
© 2020–2022 Bryan Lee