ecomfe / oo

Base library for OO style programming
MIT License
5 stars 5 forks source link

增加Class.defineStatics方法 #8

Closed Exodia closed 9 years ago

Exodia commented 10 years ago

用于给类定义静态成员:

var A = Class();
var statics = { staticA: 1 };
Class.defineStatics(A, statics);
A.staticA; // 1
Exodia commented 9 years ago

好像和赋值相比没啥意义,之前是想静态成员可能可以被继承,现在觉得静态成员没有啥必要继承