OLD | NEW |
1 export const closure = Object.create(null); | 1 export const closure = Object.create(null); |
2 import { core, js, dart, dartx } from 'dart_sdk'; | 2 import { core, js, dart, dartx } from 'dart_sdk'; |
| 3 let dynamic__Toint = () => (dynamic__Toint = dart.constFn(dart.functionType(core
.int, [dart.dynamic], [dart.dynamic])))(); |
| 4 let dynamic__Todynamic = () => (dynamic__Todynamic = dart.constFn(dart.functionT
ype(dart.dynamic, [dart.dynamic], {y: core.String, z: dart.dynamic})))(); |
| 5 let StringToList = () => (StringToList = dart.constFn(dart.functionType(core.Lis
t, [core.String])))(); |
| 6 let ListOfint = () => (ListOfint = dart.constFn(core.List$(core.int)))(); |
| 7 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.functionType(
dart.dynamic, [dart.dynamic])))(); |
| 8 let FnToListOfint = () => (FnToListOfint = dart.constFn(dart.functionType(ListOf
int(), [dynamicTodynamic()])))(); |
3 let MapOfMap$Map = () => (MapOfMap$Map = dart.constFn(core.Map$(core.Map, core.M
ap)))(); | 9 let MapOfMap$Map = () => (MapOfMap$Map = dart.constFn(core.Map$(core.Map, core.M
ap)))(); |
4 let Foo = () => (Foo = dart.constFn(closure.Foo$()))(); | 10 let Foo = () => (Foo = dart.constFn(closure.Foo$()))(); |
5 let ListOfTAndTToListOfT = () => (ListOfTAndTToListOfT = dart.constFn(dart.defin
iteFunctionType(T => [core.List$(T), [core.List$(T), T]])))(); | 11 let ListOfTAndTToListOfT = () => (ListOfTAndTToListOfT = dart.constFn(dart.defin
iteFunctionType(T => [core.List$(T), [core.List$(T), T]])))(); |
6 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionTyp
e(dart.void, [dart.dynamic])))(); | 12 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionTyp
e(dart.void, [dart.dynamic])))(); |
7 closure.generic_function = function(T) { | 13 closure.generic_function = function(T) { |
8 return (items: core.List<T>, seed: T): core.List<T> => { | 14 return (items: core.List<T>, seed: T): core.List<T> => { |
9 let strings = items[dartx.map](core.String)(dart.fn((i: T): string => dart.s
tr`${i}`, dart.definiteFunctionType(core.String, [T])))[dartx.toList](); | 15 let strings = items[dartx.map](core.String)(dart.fn((i: T): string => dart.s
tr`${i}`, dart.definiteFunctionType(core.String, [T])))[dartx.toList](); |
10 return items; | 16 return items; |
11 }; | 17 }; |
12 }; | 18 }; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return null; | 60 return null; |
55 } | 61 } |
56 static set staticProp(value: string) {} | 62 static set staticProp(value: string) {} |
57 } | 63 } |
58 dart.addTypeTests(Foo); | 64 dart.addTypeTests(Foo); |
59 dart.setSignature(Foo, { | 65 dart.setSignature(Foo, { |
60 constructors: () => ({ | 66 constructors: () => ({ |
61 new: dart.definiteFunctionType(closure.Foo$(T), [core.int, T]), | 67 new: dart.definiteFunctionType(closure.Foo$(T), [core.int, T]), |
62 build: dart.definiteFunctionType(closure.Foo$(T), []) | 68 build: dart.definiteFunctionType(closure.Foo$(T), []) |
63 }), | 69 }), |
| 70 fields: () => ({ |
| 71 i: core.int, |
| 72 b: core.bool, |
| 73 s: core.String, |
| 74 v: T |
| 75 }), |
| 76 getters: () => ({prop: dart.definiteFunctionType(core.String, [])}), |
| 77 setters: () => ({prop: dart.definiteFunctionType(dart.void, [core.String])})
, |
64 methods: () => ({ | 78 methods: () => ({ |
65 untyped_method: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dar
t.dynamic]), | 79 untyped_method: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dar
t.dynamic]), |
66 pass: dart.definiteFunctionType(T, [T]), | 80 pass: dart.definiteFunctionType(T, [T]), |
67 typed_method: dart.definiteFunctionType(core.String, [closure.Foo, core.Li
st, core.int, core.num, core.double, core.bool, core.String, js.JsArray, js.JsOb
ject, js.JsFunction]), | 81 typed_method: dart.definiteFunctionType(core.String, [closure.Foo, core.Li
st, core.int, core.num, core.double, core.bool, core.String, js.JsArray, js.JsOb
ject, js.JsFunction]), |
68 optional_params: dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [
dart.dynamic, core.int]), | 82 optional_params: dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [
dart.dynamic, core.int]), |
69 nullary_method: dart.definiteFunctionType(dart.dynamic, []), | 83 nullary_method: dart.definiteFunctionType(dart.dynamic, []), |
70 function_params: dart.definiteFunctionType(dart.dynamic, [dart.functionTyp
e(core.int, [dart.dynamic], [dart.dynamic]), dart.functionType(dart.dynamic, [da
rt.dynamic], {y: core.String, z: dart.dynamic}), closure.Callback]), | 84 function_params: dart.definiteFunctionType(dart.dynamic, [dynamic__Toint()
, dynamic__Todynamic(), closure.Callback]), |
71 run: dart.definiteFunctionType(dart.dynamic, [core.List, core.String, dart
.functionType(core.List, [core.String]), dart.functionType(core.List$(core.int),
[dart.functionType(dart.dynamic, [dart.dynamic])])], {h: MapOfMap$Map()}) | 85 run: dart.definiteFunctionType(dart.dynamic, [core.List, core.String, Stri
ngToList(), FnToListOfint()], {h: MapOfMap$Map()}) |
72 }), | 86 }), |
| 87 sfields: () => ({ |
| 88 some_static_constant: core.String, |
| 89 some_static_final: core.String, |
| 90 some_static_var: core.String |
| 91 }), |
| 92 sgetters: () => ({staticProp: dart.definiteFunctionType(core.String, [])}), |
| 93 ssetters: () => ({staticProp: dart.definiteFunctionType(dart.void, [core.Str
ing])}), |
73 statics: () => ({named_params: dart.definiteFunctionType(dart.dynamic, [dart
.dynamic], {b: dart.dynamic, c: core.int})}), | 94 statics: () => ({named_params: dart.definiteFunctionType(dart.dynamic, [dart
.dynamic], {b: dart.dynamic, c: core.int})}), |
74 names: ['named_params'] | 95 names: ['named_params'] |
75 }); | 96 }); |
76 return Foo; | 97 return Foo; |
77 }); | 98 }); |
78 closure.Foo = Foo(); | 99 closure.Foo = Foo(); |
79 /** @final {string} */ | 100 /** @final {string} */ |
80 closure.Foo.some_static_constant = "abc"; | 101 closure.Foo.some_static_constant = "abc"; |
81 /** @final {string} */ | 102 /** @final {string} */ |
82 closure.Foo.some_static_final = "abc"; | 103 closure.Foo.some_static_final = "abc"; |
(...skipping 11 matching lines...) Expand all Loading... |
94 }); | 115 }); |
95 closure.main = function(args): void { | 116 closure.main = function(args): void { |
96 }; | 117 }; |
97 dart.fn(closure.main, dynamicTovoid()); | 118 dart.fn(closure.main, dynamicTovoid()); |
98 /** @final {string} */ | 119 /** @final {string} */ |
99 closure.some_top_level_constant = "abc"; | 120 closure.some_top_level_constant = "abc"; |
100 /** @final {string} */ | 121 /** @final {string} */ |
101 closure.some_top_level_final = "abc"; | 122 closure.some_top_level_final = "abc"; |
102 /** @type {string} */ | 123 /** @type {string} */ |
103 closure.some_top_level_var = "abc"; | 124 closure.some_top_level_var = "abc"; |
OLD | NEW |