Closed PythonYunfei closed 1 day ago
加;@lint-disable class-non-dynamic-member-check
主要希望开启这类检查。但是希望检查的过程中可以识别return inst
,从而让后续的this
获得所有inst
相关的属性提示或补全。
目的不是取消这个警告。目的是增加inst
的属性补全提示 到this
。
希望先不关这个,什么时候有时间再去增强这个都行。这个wish完全不着急。
只有显式声明是支持的。
static Prototype.count := 0
这也是有效的
目前没有对 this
发挥作用
但静态Call()的返回值必定和this相同。你可以做这个断言。这属于面向对象 的惯例:
类A的构造方法返回的对象X,必须满足:X is A==true
我是感觉只要是面向对象的语言, 肯定会符合面向对象里的common sense的.. 主要 你只是对静态Call开了个特殊, 没啥副作用..
只有显式声明是支持的。
static Prototype.count := 0
这也是有效的
但这个 毕竟行为不一样 一个是给实例加属性,一个是给prototype加。 这样需要该代码,并破坏 原有的结构设计..
再次说一下,这个feature 不是一定要有,太麻烦就算了..😀