News for hackers. Stuff that matters.
Re:If TypeScript is so great, how come all notable ReactJS p... by markdog12 on Tuesday September 20, 2016 @09:23AM (#12539285)
Sorry for my ignorance, but does that amount to loading a library on demand? If so, yes, Dart can do this:

  import 'package:deferred/hello.dart' deferred as hello;
  // When you need the library, invoke loadLibrary() using   the library’s identifier.

  greet() async {
    await hello.loadLibrary();
    hello.printGreeting();
  }
Re:If TypeScript is so great, how come all notable ReactJS p... by wstrange on Tuesday September 20, 2016 @02:36PM (#12542027)
Also worth pointing out that Dart can do tree shaking at compile time, to eliminate library code that is never called
Re:If TypeScript is so great, how come all notable ReactJS p... by Touche on Tuesday September 20, 2016 @09:45AM (#12539411)
That does indeed work. I just tried it, and it works beautifully.

The only problem is that the main output js file is still 107kb, quite large.

Re:If TypeScript is so great, how come all notable ReactJS p... by markdog12 on Tuesday September 20, 2016 @11:19AM (#12540173)
When I test this out, I get a 94KB file. That's reasonable depending on what you're doing.