Dart2TS is a dart1.x to typescript compiler.
Install the tool :
pub global activate dart2ts
dart2ts build <path_to_your_dart_package>
The package to translate should be in strong mode with all the dependencies resolved.
The stronger it is the better dart2ts can understand it and translate it.
Dart2TS is a new approach of developing with Dart. You can write actual dart code and have it translated to effective typescript code. From there you can continue writing in dart or switch to typescript.
The main advantages of using dart2ts instead of the traditional
dartdevc compilers is a
You can end up writing nodejs packages or webpack application using dart.
Pretty much every constructs from dart1.x:
If you want to help you're welcome. These are some of the things that needs some helps:
Dart core libraries (
dart:async) are been ported to typescript and are
In order to access dart2ts node packages you'll have add the following registers to your configuration:
npm config set @dart2ts.packages:registry=https://npm.dart-polymer.com npm config set @dart2ts:registry=https://npm.dart-polymer.com
You can install the package from the command line:
$ pub global activate dart2ts
The package has the following executables:
Add this to your package's pubspec.yaml file:
dependencies: dart2ts: ^0.9.15
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.9.15||Oct 28, 2018|
|0.9.14||Oct 26, 2018|
|0.9.13||Oct 21, 2018|
|0.9.12||Oct 21, 2018|
|0.9.11||Oct 14, 2018|
|0.9.10||Oct 13, 2018|
|0.9.9||Oct 5, 2018|
|0.9.0||Oct 2, 2018|
|0.0.1||Oct 31, 2017|
|1.0.0-rc.1||Oct 5, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
|Dart SDK||>=1.8.0 <2.0.0|