Mostly internal refactoring needed to make ts2dart and DartAnalyzer happy. Fixes #2415
export var __esModule = true