-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有需要用Typescript重写吗, 乐意PR #26
Comments
额,没用过啊,原生JavaScript控。语法bug对于我来说很少了,主要还是业务逻辑的bug,考虑不周全,这个不管用那种语言都是很难避免的,至于代码可读性代码多了逻辑复杂了都不好理解别人的思维😂 |
typescript写法与js并没有差异,只是类型检测系统。 |
有了解过,但是没有具体去做项目用过,就是JavaScript的超集,对ES6/7/8也完美支持 |
后续代码都会慢慢重构优化,哈哈,现在主要开发核心功能,还有好几个模块没时间开发 |
@jawil 里面的代码, 经常有扩写原生对象的方法. 这就导致了, 有些地方代码逻辑不清晰, 不推荐这么做... 比如这里 const attr = (HTMLElement.prototype.attr = function(attr, value) {
return arguments[1] == void 0
? this.getAttribute(attr)
: this.setAttribute(attr, value);
}); |
主要是模拟JQ的attr方法,偷个懒少些代码,getAttribute有点太长了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用JS浑身不自在....
使用Typescript, 代码可读性大大提高, 减少N多BUG...
好吧, 我就是来安利的
The text was updated successfully, but these errors were encountered: