This project is read-only.


Classes and enums inside classes


It'd be nice if we were able to create scoped classes and enums inside classes:

class MyClass {
public enum SomeEnum {

private ScopedClass {
Closed Oct 24, 2013 at 6:34 PM by jonturner


jonturner wrote Mar 12, 2013 at 4:57 PM

We're working on a spec for this type of feature which allows you to mix across different types of abstraction, like so:
class Store { }
module Store {
  export class Error { }

LarsCorneliussen wrote Jul 11, 2013 at 9:36 AM

isn't this fixed in 0.9? Declaration merging...?

derekcicerone wrote Oct 13, 2013 at 7:56 PM

This is likely needed for leaflet since it has both L.Icon and L.Icon.Default.

derekcicerone wrote Oct 13, 2013 at 8:03 PM

Whoops, this is already working in with the suggested syntax. I'll fix the definition for leaflet in DefinitelyTyped now.

jonturner wrote Oct 24, 2013 at 6:34 PM

Yes, this should be marked as fixed. Declaration merging is the intended solution now for inner classes.