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 closure.generic_function = function<T>(items: core.List<T>, seed: T): core.List<
T> { | 3 closure.generic_function = function(T) { |
4 let strings = items[dartx.map](dart.fn((i: T): string => `${i}`, core.String,
[dart.dynamic]))[dartx.toList](); | 4 return (items: core.List<T>, seed: T): core.List<T> => { |
5 return items; | 5 let strings = items[dartx.map](core.String)(dart.fn((i: T): string => `${i}`
, core.String, [T]))[dartx.toList](); |
| 6 return items; |
| 7 }; |
6 }; | 8 }; |
7 dart.fn(closure.generic_function, core.List, [core.List, dart.dynamic]); | 9 dart.fn(closure.generic_function, T => [core.List$(T), [core.List$(T), T]]); |
8 closure.Callback = dart.typedef('Callback', () => dart.functionType(dart.void, [
], {i: core.int})); | 10 closure.Callback = dart.typedef('Callback', () => dart.functionType(dart.void, [
], {i: core.int})); |
9 closure.Foo$ = dart.generic(T => { | 11 closure.Foo$ = dart.generic(T => { |
10 class Foo<T> extends core.Object { | 12 class Foo<T> extends core.Object { |
11 i: number; | 13 i: number; |
12 b: boolean; | 14 b: boolean; |
13 s: string; | 15 s: string; |
14 v: T; | 16 v: T; |
15 static some_static_constant: string; | 17 static some_static_constant: string; |
16 static some_static_final: string; | 18 static some_static_final: string; |
17 static some_static_var: string; | 19 static some_static_var: string; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 }); | 92 }); |
91 closure.main = function(args): void { | 93 closure.main = function(args): void { |
92 }; | 94 }; |
93 dart.fn(closure.main, dart.void, [dart.dynamic]); | 95 dart.fn(closure.main, dart.void, [dart.dynamic]); |
94 /** @final {string} */ | 96 /** @final {string} */ |
95 closure.some_top_level_constant = "abc"; | 97 closure.some_top_level_constant = "abc"; |
96 /** @final {string} */ | 98 /** @final {string} */ |
97 closure.some_top_level_final = "abc"; | 99 closure.some_top_level_final = "abc"; |
98 /** @type {string} */ | 100 /** @type {string} */ |
99 closure.some_top_level_var = "abc"; | 101 closure.some_top_level_var = "abc"; |
OLD | NEW |