core icon indicating copy to clipboard operation
core copied to clipboard

Shorten namespace access and create aliases

Open Jand42 opened this issue 8 years ago • 1 comments

  • [x] While being inside namespace A, shorten a name like A.B to B.
  • [ ] If a B also exists as a global type/value, it is shadowed by A.B inside A. If a value/type would be used anywhere where it's shadowed, create a (non-exported) alias for it type B$1 = B or const B$1 = B. This is not just a cosmetic change but also needed for correct behavior.
  • [ ] Create aliases to shorten accesses from imported modules. For example type X = OtherModule.X

Jand42 avatar Oct 16 '17 08:10 Jand42

A fix needed: interfaces and class members also have to be considered

Jand42 avatar Oct 20 '17 09:10 Jand42