OLD | NEW |
1 define(['dart_sdk'], function(dart_sdk) { | 1 define(['dart_sdk'], function(dart_sdk) { |
2 'use strict'; | 2 'use strict'; |
3 const core = dart_sdk.core; | 3 const core = dart_sdk.core; |
4 const math = dart_sdk.math; | 4 const math = dart_sdk.math; |
5 const dart = dart_sdk.dart; | 5 const dart = dart_sdk.dart; |
6 const dartx = dart_sdk.dartx; | 6 const dartx = dart_sdk.dartx; |
7 const map_keys = Object.create(null); | 7 const map_keys = Object.create(null); |
8 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 8 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.fnType(dart.dynam
ic, [])))(); |
9 map_keys.main = function() { | 9 map_keys.main = function() { |
10 core.print(dart.map({'1': 2, '3': 4, '5': 6}, core.String, core.int)); | 10 core.print(dart.map({'1': 2, '3': 4, '5': 6}, core.String, core.int)); |
11 core.print(dart.map([1, 2, 3, 4, 5, 6], core.int, core.int)); | 11 core.print(dart.map([1, 2, 3, 4, 5, 6], core.int, core.int)); |
12 core.print(dart.map({'1': 2, [dart.str`${dart.notNull(math.Random.new().next
Int(2)) + 2}`]: 4, '5': 6}, core.String, core.int)); | 12 core.print(dart.map({'1': 2, [dart.str`${dart.notNull(math.Random.new().next
Int(2)) + 2}`]: 4, '5': 6}, core.String, core.int)); |
13 let x = '3'; | 13 let x = '3'; |
14 core.print(dart.map(['1', 2, x, 4, '5', 6], core.String, core.int)); | 14 core.print(dart.map(['1', 2, x, 4, '5', 6], core.String, core.int)); |
15 core.print(dart.map(['1', 2, null, 4, '5', 6], core.String, core.int)); | 15 core.print(dart.map(['1', 2, null, 4, '5', 6], core.String, core.int)); |
16 }; | 16 }; |
17 dart.fn(map_keys.main, VoidTodynamic()); | 17 dart.fn(map_keys.main, VoidTodynamic()); |
18 dart.trackLibraries("map_keys", { | 18 dart.trackLibraries("map_keys", { |
19 "map_keys.dart": map_keys | 19 "map_keys.dart": map_keys |
20 }, null); | 20 }, null); |
21 // Exports: | 21 // Exports: |
22 return { | 22 return { |
23 map_keys: map_keys | 23 map_keys: map_keys |
24 }; | 24 }; |
25 }); | 25 }); |
26 | 26 |
27 //# sourceMappingURL=map_keys.js.map | 27 //# sourceMappingURL=map_keys.js.map |
OLD | NEW |