Is there a way to nest classes in TypeScript. E.g. I'd like to use them like:
var foo = new Foo(); var bar = new Foo.Bar();
Starting with TypeScript 1.6 we have class expressions (reference).
This means you can do the following :
class Foo { static Bar = class { } } // works! var foo = new Foo(); var bar = new Foo.Bar();
2.1m questions
2.1m answers
60 comments
56.9k users