Closed panagosg7 closed 10 years ago
Addessing #55
For an enumeration
enum E { ADD, SUB, MUL, DIV }
E has type enum E, E.ADD has type { number | v = 0} etc.
E
enum E
E.ADD
{ number | v = 0}
Also, E[0] resolves to a string type: { string | v = "ADD"}
E[0]
{ string | v = "ADD"}
Added some fixes in unification / subtyping:
module m
class c
enum e
Awesome, thanks!
Addessing #55
For an enumeration
E
has typeenum E
,E.ADD
has type{ number | v = 0}
etc.Also,
E[0]
resolves to a string type:{ string | v = "ADD"}
Added some fixes in unification / subtyping:
module m
,class c
andenum e
are all types that get flattened to an object literal type if needed. This follows TS behavior.