OLD | NEW |
1 dart_library.library('async_helper', null, /* Imports */[ | 1 define(['dart_sdk'], function(dart_sdk) { |
2 'dart_sdk' | |
3 ], function load__async_helper(exports, dart_sdk) { | |
4 'use strict'; | 2 'use strict'; |
5 const core = dart_sdk.core; | 3 const core = dart_sdk.core; |
6 const dart = dart_sdk.dart; | 4 const dart = dart_sdk.dart; |
7 const dartx = dart_sdk.dartx; | 5 const dartx = dart_sdk.dartx; |
8 const async_helper = Object.create(null); | 6 const async_helper = Object.create(null); |
9 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart
.dynamic, [])))(); | 7 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart
.dynamic, [])))(); |
10 let StringToException = () => (StringToException = dart.constFn(dart.definiteF
unctionType(core.Exception, [core.String])))(); | 8 let StringToException = () => (StringToException = dart.constFn(dart.definiteF
unctionType(core.Exception, [core.String])))(); |
11 let _Action0Tovoid = () => (_Action0Tovoid = dart.constFn(dart.definiteFunctio
nType(dart.void, [async_helper._Action0])))(); | 9 let _Action0Tovoid = () => (_Action0Tovoid = dart.constFn(dart.definiteFunctio
nType(dart.void, [async_helper._Action0])))(); |
12 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); | 10 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
13 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionT
ype(dart.void, [dart.dynamic])))(); | 11 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionT
ype(dart.void, [dart.dynamic])))(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 async_helper.asyncSuccess = function(_) { | 63 async_helper.asyncSuccess = function(_) { |
66 return async_helper.asyncEnd(); | 64 return async_helper.asyncEnd(); |
67 }; | 65 }; |
68 dart.fn(async_helper.asyncSuccess, dynamicTovoid()); | 66 dart.fn(async_helper.asyncSuccess, dynamicTovoid()); |
69 async_helper.asyncTest = function(f) { | 67 async_helper.asyncTest = function(f) { |
70 async_helper.asyncStart(); | 68 async_helper.asyncStart(); |
71 dart.dsend(f(), 'then', async_helper.asyncSuccess); | 69 dart.dsend(f(), 'then', async_helper.asyncSuccess); |
72 }; | 70 }; |
73 dart.fn(async_helper.asyncTest, FnTovoid()); | 71 dart.fn(async_helper.asyncTest, FnTovoid()); |
74 // Exports: | 72 // Exports: |
75 exports.async_helper = async_helper; | 73 return { |
| 74 async_helper: async_helper |
| 75 }; |
76 }); | 76 }); |
OLD | NEW |