chore: replace @CONST() with /*@ts2dart_const*/

This commit is contained in:
Misko Hevery 2016-04-25 21:58:48 -07:00 committed by Martin Probst
parent a02614beaa
commit 3aa322a9c6
55 changed files with 240 additions and 246 deletions

View File

@ -34,7 +34,6 @@ import {
import {ReflectionCapabilities} from 'angular2/src/core/reflection/reflection_capabilities'; import {ReflectionCapabilities} from 'angular2/src/core/reflection/reflection_capabilities';
import {XHRImpl} from "angular2/src/platform/browser/xhr_impl"; import {XHRImpl} from "angular2/src/platform/browser/xhr_impl";
import {XHR} from 'angular2/compiler'; import {XHR} from 'angular2/compiler';
import {Provider} from 'angular2/src/core/di';
/** /**
* An array of providers that should be passed into `application()` when bootstrapping a component. * An array of providers that should be passed into `application()` when bootstrapping a component.
@ -42,8 +41,8 @@ import {Provider} from 'angular2/src/core/di';
export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/ [ export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/ [
BROWSER_APP_COMMON_PROVIDERS, BROWSER_APP_COMMON_PROVIDERS,
COMPILER_PROVIDERS, COMPILER_PROVIDERS,
new Provider(XHR, {useClass: XHRImpl}, /*@ts2dart_Provider*/{provide: XHR, useClass: XHRImpl},
]); ];
export function browserPlatform(): PlatformRef { export function browserPlatform(): PlatformRef {
if (isBlank(getPlatform())) { if (isBlank(getPlatform())) {

View File

@ -49,21 +49,21 @@ function createNgZone(): NgZone {
export const TEST_BROWSER_STATIC_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = export const TEST_BROWSER_STATIC_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
/*@ts2dart_const*/ [ /*@ts2dart_const*/ [
PLATFORM_COMMON_PROVIDERS, PLATFORM_COMMON_PROVIDERS,
new Provider(PLATFORM_INITIALIZER, {useValue: initBrowserTests, multi: true} /*@ts2dart_Provider*/{provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true}
]); ];
export const ADDITIONAL_TEST_BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = export const ADDITIONAL_TEST_BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
/*@ts2dart_const*/ [ /*@ts2dart_const*/ [
new Provider(APP_ID, {useValue: 'a'}, /*@ts2dart_Provider*/{provide: APP_ID, useValue: 'a'},
ELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS,
new Provider(DirectiveResolver, {useClass: MockDirectiveResolver}), /*@ts2dart_Provider*/{provide: DirectiveResolver, useClass: MockDirectiveResolver},
new Provider(ViewResolver, {useClass: MockViewResolver}), /*@ts2dart_Provider*/{provide: ViewResolver, useClass: MockViewResolver},
Log, Log,
TestComponentBuilder, TestComponentBuilder,
new Provider(NgZone, {useFactory: createNgZone}), /*@ts2dart_Provider*/{provide: NgZone, useFactory: createNgZone},
new Provider(LocationStrategy, {useClass: MockLocationStrategy}), /*@ts2dart_Provider*/{provide: LocationStrategy, useClass: MockLocationStrategy},
new Provider(AnimationBuilder, {useClass: MockAnimationBuilder}), /*@ts2dart_Provider*/{provide: AnimationBuilder, useClass: MockAnimationBuilder},
]); ];
/** /**
* Default application providers for testing without a compiler. * Default application providers for testing without a compiler.
@ -71,6 +71,6 @@ export const ADDITIONAL_TEST_BROWSER_PROVIDERS: Array<any /*Type | Provider | an
export const TEST_BROWSER_STATIC_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = export const TEST_BROWSER_STATIC_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
/*@ts2dart_const*/ [ /*@ts2dart_const*/ [
BROWSER_APP_COMMON_PROVIDERS, BROWSER_APP_COMMON_PROVIDERS,
new Provider(XHR, {useClass: XHRImpl}, /*@ts2dart_Provider*/{provide: XHR, useClass: XHRImpl},
ADDITIONAL_TEST_BROWSER_PROVIDERS ADDITIONAL_TEST_BROWSER_PROVIDERS
]); ];

View File

@ -1,7 +1,6 @@
import { import {
APP_ID, APP_ID,
NgZone, NgZone,
Provider,
PLATFORM_COMMON_PROVIDERS, PLATFORM_COMMON_PROVIDERS,
PLATFORM_INITIALIZER, PLATFORM_INITIALIZER,
APPLICATION_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS,
@ -52,8 +51,8 @@ function initServerTests() {
export const TEST_SERVER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = export const TEST_SERVER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
/*@ts2dart_const*/ [ /*@ts2dart_const*/ [
PLATFORM_COMMON_PROVIDERS, PLATFORM_COMMON_PROVIDERS,
new Provider(PLATFORM_INITIALIZER, {useValue: initServerTests, multi: true} /*@ts2dart_Provider*/{provide: PLATFORM_INITIALIZER, useValue: initServerTests, multi: true}
]); ];
function appDoc() { function appDoc() {
try { try {
@ -72,21 +71,21 @@ export const TEST_SERVER_APPLICATION_PROVIDERS: Array<any /*Type | Provider | an
// list here. // list here.
APPLICATION_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS,
COMPILER_PROVIDERS, COMPILER_PROVIDERS,
new Provider(DOCUMENT, {useFactory: appDoc}), /*@ts2dart_Provider*/{provide: DOCUMENT, useFactory: appDoc},
new Provider(DomRootRenderer, {useClass: DomRootRenderer_}), /*@ts2dart_Provider*/{provide: DomRootRenderer, useClass: DomRootRenderer_},
new Provider(RootRenderer, {useExisting: DomRootRenderer}), /*@ts2dart_Provider*/{provide: RootRenderer, useExisting: DomRootRenderer},
EventManager, EventManager,
new Provider(EVENT_MANAGER_PLUGINS, {useClass: DomEventsPlugin, multi: true}), /*@ts2dart_Provider*/{provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true},
new Provider(XHR, {useClass: XHR}), /*@ts2dart_Provider*/{provide: XHR, useClass: XHR},
new Provider(APP_ID, {useValue: 'a'}), /*@ts2dart_Provider*/{provide: APP_ID, useValue: 'a'},
new Provider(SharedStylesHost, {useExisting: DomSharedStylesHost}), /*@ts2dart_Provider*/{provide: SharedStylesHost, useExisting: DomSharedStylesHost},
DomSharedStylesHost, DomSharedStylesHost,
ELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS,
new Provider(DirectiveResolver, {useClass: MockDirectiveResolver}), /*@ts2dart_Provider*/{provide: DirectiveResolver, useClass: MockDirectiveResolver},
new Provider(ViewResolver, {useClass: MockViewResolver}), /*@ts2dart_Provider*/{provide: ViewResolver, useClass: MockViewResolver},
Log, Log,
TestComponentBuilder, TestComponentBuilder,
new Provider(NgZone, {useFactory: createNgZone}), /*@ts2dart_Provider*/{provide: NgZone, useFactory: createNgZone},
new Provider(LocationStrategy, {useClass: MockLocationStrategy}), /*@ts2dart_Provider*/{provide: LocationStrategy, useClass: MockLocationStrategy},
new Provider(AnimationBuilder, {useClass: MockAnimationBuilder}), /*@ts2dart_Provider*/{provide: AnimationBuilder, useClass: MockAnimationBuilder},
]); ];

View File

@ -1,11 +1,11 @@
import {CONST, Type, stringify} from "angular2/src/facade/lang"; import {Type, stringify} from "angular2/src/facade/lang";
export abstract class RouteMetadata { export abstract class RouteMetadata {
abstract get path(): string; abstract get path(): string;
abstract get component(): Type; abstract get component(): Type;
} }
@CONST() /* @ts2dart_const */
export class Route implements RouteMetadata { export class Route implements RouteMetadata {
path: string; path: string;
component: Type; component: Type;
@ -16,8 +16,8 @@ export class Route implements RouteMetadata {
toString(): string { return `@Route(${this.path}, ${stringify(this.component)})`; } toString(): string { return `@Route(${this.path}, ${stringify(this.component)})`; }
} }
@CONST() /* @ts2dart_const */
export class RoutesMetadata { export class RoutesMetadata {
constructor(public routes: RouteMetadata[]) {} constructor(public routes: RouteMetadata[]) {}
toString(): string { return `@Routes(${this.routes})`; } toString(): string { return `@Routes(${this.routes})`; }
} }

View File

@ -1,12 +1,10 @@
import {ROUTER_PROVIDERS_COMMON} from './router_providers_common'; import {ROUTER_PROVIDERS_COMMON} from './router_providers_common';
import {Provider} from 'angular2/core';
import { import {
BrowserPlatformLocation BrowserPlatformLocation
} from 'angular2/src/platform/browser/location/browser_platform_location'; } from 'angular2/src/platform/browser/location/browser_platform_location';
import {PlatformLocation} from 'angular2/platform/common'; import {PlatformLocation} from 'angular2/platform/common';
import {CONST_EXPR} from 'angular2/src/facade/lang';
export const ROUTER_PROVIDERS: any[] = CONST_EXPR([ export const ROUTER_PROVIDERS: any[] = /*@ts2dart_const*/[
ROUTER_PROVIDERS_COMMON, ROUTER_PROVIDERS_COMMON,
CONST_EXPR(new Provider(PlatformLocation, {useClass: BrowserPlatformLocation})), /*@ts2dart_Provider*/{provide: PlatformLocation, useClass: BrowserPlatformLocation},
]); ];

View File

@ -2,27 +2,20 @@ import {OpaqueToken, ComponentResolver} from 'angular2/core';
import {LocationStrategy, PathLocationStrategy, Location} from 'angular2/platform/common'; import {LocationStrategy, PathLocationStrategy, Location} from 'angular2/platform/common';
import {Router, RouterOutletMap} from './router'; import {Router, RouterOutletMap} from './router';
import {RouterUrlSerializer, DefaultRouterUrlSerializer} from './router_url_serializer'; import {RouterUrlSerializer, DefaultRouterUrlSerializer} from './router_url_serializer';
import {CONST_EXPR} from 'angular2/src/facade/lang'; import {ApplicationRef} from 'angular2/core';
import {ApplicationRef, Provider} from 'angular2/core';
import {BaseException} from 'angular2/src/facade/exceptions'; import {BaseException} from 'angular2/src/facade/exceptions';
export const ROUTER_PROVIDERS_COMMON: any[] = CONST_EXPR([ export const ROUTER_PROVIDERS_COMMON: any[] = /*@ts2dart_const*/[
RouterOutletMap, RouterOutletMap,
CONST_EXPR(new Provider(RouterUrlSerializer, {useClass: DefaultRouterUrlSerializer})), /*@ts2dart_Provider*/ {provide: RouterUrlSerializer, useClass: DefaultRouterUrlSerializer},
CONST_EXPR(new Provider(LocationStrategy, {useClass: PathLocationStrategy})), /*@ts2dart_Provider*/ {provide: LocationStrategy, useClass: PathLocationStrategy}, Location,
Location, /*@ts2dart_Provider*/ {
CONST_EXPR(new Provider(Router, provide: Router,
{ useFactory: routerFactory,
useFactory: routerFactory, deps: /*@ts2dart_const*/
deps: CONST_EXPR([ [ApplicationRef, ComponentResolver, RouterUrlSerializer, RouterOutletMap, Location],
ApplicationRef, },
ComponentResolver, ];
RouterUrlSerializer,
RouterOutletMap,
Location
])
}))
]);
function routerFactory(app: ApplicationRef, componentResolver: ComponentResolver, function routerFactory(app: ApplicationRef, componentResolver: ComponentResolver,
urlSerializer: RouterUrlSerializer, routerOutletMap: RouterOutletMap, urlSerializer: RouterUrlSerializer, routerOutletMap: RouterOutletMap,

View File

@ -1,9 +1,12 @@
import {Directive, ElementRef, Renderer, Self, forwardRef, Provider} from 'angular2/core'; import {Directive, ElementRef, Renderer, Self, forwardRef} from 'angular2/core';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor'; import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
import {isBlank, NumberWrapper} from 'angular2/src/facade/lang'; import {isBlank, NumberWrapper} from 'angular2/src/facade/lang';
export const NUMBER_VALUE_ACCESSOR = /*@ts2dart_const*/ new Provider( export const NUMBER_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
NG_VALUE_ACCESSOR, {useExisting: forwardRef(( => NumberValueAccessor), multi: true})); provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => NumberValueAccessor),
multi: true
};
/** /**
* The accessor for writing a number value and listening to changes that is used by the * The accessor for writing a number value and listening to changes that is used by the

View File

@ -20,9 +20,11 @@ import {NgControl} from 'angular2/src/common/forms/directives/ng_control';
import {looseIdentical, isPresent} from 'angular2/src/facade/lang'; import {looseIdentical, isPresent} from 'angular2/src/facade/lang';
import {ListWrapper} from 'angular2/src/facade/collection'; import {ListWrapper} from 'angular2/src/facade/collection';
export const RADIO_VALUE_ACCESSOR = /*@ts2dart_const*/ new Provider( export const RADIO_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
NG_VALUE_ACCESSOR, {useExisting: forwardRef(( => RadioControlValueAccessor), multi: true})); povide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => RadioControlValueAccessor),
multi: true
};
/** /**
* Internal class used by Angular to uncheck radio buttons with the matching name. * Internal class used by Angular to uncheck radio buttons with the matching name.

View File

@ -20,8 +20,11 @@ import {
import {MapWrapper} from 'angular2/src/facade/collection'; import {MapWrapper} from 'angular2/src/facade/collection';
export const SELECT_VALUE_ACCESSOR = /*@ts2dart_const*/ new Provider( export const SELECT_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
NG_VALUE_ACCESSOR, {useExisting: forwardRef(( => SelectControlValueAccessor), multi: true})); provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SelectControlValueAccessor),
multi: true
};
function _buildValueString(id: string, value: any): string { function _buildValueString(id: string, value: any): string {
if (isBlank(id)) return `${value}`; if (isBlank(id)) return `${value}`;

View File

@ -1,4 +1,4 @@
import {forwardRef, Provider, Attribute, Directive} from 'angular2/core'; import {forwardRef, Attribute, Directive} from 'angular2/core';
import {NumberWrapper} from 'angular2/src/facade/lang'; import {NumberWrapper} from 'angular2/src/facade/lang';
import {Validators, NG_VALIDATORS} from '../validators'; import {Validators, NG_VALIDATORS} from '../validators';
import {AbstractControl} from '../model'; import {AbstractControl} from '../model';
@ -27,8 +27,11 @@ export interface Validator { validate(c: modelModule.AbstractControl): {[key: st
const REQUIRED = /*@ts2dart_const*/ Validators.required; const REQUIRED = /*@ts2dart_const*/ Validators.required;
export const REQUIRED_VALIDATOR = export const REQUIRED_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
/*@ts2dart_const*/ new Provider(NG_VALIDATORS, {useValue: REQUIRED, multi: true}); provide: NG_VALIDATORS,
useValue: REQUIRED,
multi: true
};
/** /**
* A Directive that adds the `required` validator to any controls marked with the * A Directive that adds the `required` validator to any controls marked with the
@ -59,8 +62,12 @@ export interface AsyncValidatorFn {
* *
* {@example common/forms/ts/validators/validators.ts region='min'} * {@example common/forms/ts/validators/validators.ts region='min'}
*/ */
export const MIN_LENGTH_VALIDATOR = /*@ts2dart_const*/ export const MIN_LENGTH_VALIDATOR: any = /*@ts2dart_const*/
new Provider(NG_VALIDATORS, {useExisting: forwardRef(( => MinLengthValidator), multi: true})); /*@ts2dart_Provider*/ {
provide: NG_VALIDATORS,
useExisting: forwardRef(() => MinLengthValidator),
multi: true
};
/** /**
* A directive which installs the {@link MinLengthValidator} for any `ngControl`, * A directive which installs the {@link MinLengthValidator} for any `ngControl`,
@ -87,8 +94,12 @@ export class MinLengthValidator implements Validator {
* *
* {@example common/forms/ts/validators/validators.ts region='max'} * {@example common/forms/ts/validators/validators.ts region='max'}
*/ */
export const MAX_LENGTH_VALIDATOR = /*@ts2dart_const*/ export const MAX_LENGTH_VALIDATOR: any = /*@ts2dart_const*/
new Provider(NG_VALIDATORS, {useExisting: forwardRef(( => MaxLengthValidator), multi: true})); /*@ts2dart_Provider*/ {
provide: NG_VALIDATORS,
useExisting: forwardRef(() => MaxLengthValidator),
multi: true
};
/** /**
* A directive which installs the {@link MaxLengthValidator} for any `ngControl, `ngFormControl`, * A directive which installs the {@link MaxLengthValidator} for any `ngControl, `ngFormControl`,
@ -121,8 +132,12 @@ export class MaxLengthValidator implements Validator {
* <input [ngControl]="fullName" pattern="[a-zA-Z ]*"> * <input [ngControl]="fullName" pattern="[a-zA-Z ]*">
* ``` * ```
*/ */
export const PATTERN_VALIDATOR = /*@ts2dart_const*/ export const PATTERN_VALIDATOR: any = /*@ts2dart_const*/
new Provider(NG_VALIDATORS, {useExisting: forwardRef(( => PatternValidator), multi: true})); /*@ts2dart_Provider*/ {
provide: NG_VALIDATORS,
useExisting: forwardRef(() => PatternValidator),
multi: true
};
@Directive({ @Directive({
selector: '[pattern][ngControl],[pattern][ngFormControl],[pattern][ngModel]', selector: '[pattern][ngControl],[pattern][ngFormControl],[pattern][ngModel]',
providers: [PATTERN_VALIDATOR] providers: [PATTERN_VALIDATOR]

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, isPromise, CONST} from 'angular2/src/facade/lang'; import {isBlank, isPresent, isPromise} from 'angular2/src/facade/lang';
import {ObservableWrapper, Observable, EventEmitter} from 'angular2/src/facade/async'; import {ObservableWrapper, Observable, EventEmitter} from 'angular2/src/facade/async';
import {Pipe, Injectable, ChangeDetectorRef, OnDestroy, WrappedValue} from 'angular2/core'; import {Pipe, Injectable, ChangeDetectorRef, OnDestroy, WrappedValue} from 'angular2/core';

View File

@ -4,7 +4,6 @@ import {
isPresent, isPresent,
Date, Date,
DateWrapper, DateWrapper,
CONST,
isBlank, isBlank,
FunctionWrapper FunctionWrapper
} from 'angular2/src/facade/lang'; } from 'angular2/src/facade/lang';
@ -84,7 +83,7 @@ var defaultLocale: string = 'en-US';
* *
* {@example core/pipes/ts/date_pipe/date_pipe_example.ts region='DatePipe'} * {@example core/pipes/ts/date_pipe/date_pipe_example.ts region='DatePipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'date', pure: true}) @Pipe({name: 'date', pure: true})
@Injectable() @Injectable()
export class DatePipe implements PipeTransform { export class DatePipe implements PipeTransform {

View File

@ -1,10 +1,4 @@
import { import {isStringMap, StringWrapper, isPresent, RegExpWrapper} from 'angular2/src/facade/lang';
CONST,
isStringMap,
StringWrapper,
isPresent,
RegExpWrapper
} from 'angular2/src/facade/lang';
import {Injectable, PipeTransform, Pipe} from 'angular2/core'; import {Injectable, PipeTransform, Pipe} from 'angular2/core';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception'; import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@ -41,7 +35,7 @@ var interpolationExp: RegExp = RegExpWrapper.create('#');
* ``` * ```
* *
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'i18nPlural', pure: true}) @Pipe({name: 'i18nPlural', pure: true})
@Injectable() @Injectable()
export class I18nPluralPipe implements PipeTransform { export class I18nPluralPipe implements PipeTransform {

View File

@ -1,4 +1,4 @@
import {CONST, isStringMap} from 'angular2/src/facade/lang'; import {isStringMap} from 'angular2/src/facade/lang';
import {StringMapWrapper} from 'angular2/src/facade/collection'; import {StringMapWrapper} from 'angular2/src/facade/collection';
import {Injectable, PipeTransform, Pipe} from 'angular2/core'; import {Injectable, PipeTransform, Pipe} from 'angular2/core';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception'; import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@ -32,7 +32,7 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'i18nSelect', pure: true}) @Pipe({name: 'i18nSelect', pure: true})
@Injectable() @Injectable()
export class I18nSelectPipe implements PipeTransform { export class I18nSelectPipe implements PipeTransform {

View File

@ -1,4 +1,4 @@
import {CONST, Type, stringify} from 'angular2/src/facade/lang'; import {Type, stringify} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
export class InvalidPipeArgumentException extends BaseException { export class InvalidPipeArgumentException extends BaseException {

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, Json, CONST} from 'angular2/src/facade/lang'; import {isBlank, isPresent, Json} from 'angular2/src/facade/lang';
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core'; import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
/** /**
@ -7,7 +7,7 @@ import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
* ### Example * ### Example
* {@example core/pipes/ts/json_pipe/json_pipe_example.ts region='JsonPipe'} * {@example core/pipes/ts/json_pipe/json_pipe_example.ts region='JsonPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'json', pure: false}) @Pipe({name: 'json', pure: false})
@Injectable() @Injectable()
export class JsonPipe implements PipeTransform { export class JsonPipe implements PipeTransform {

View File

@ -1,4 +1,4 @@
import {isString, CONST, isBlank} from 'angular2/src/facade/lang'; import {isString, isBlank} from 'angular2/src/facade/lang';
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core'; import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception'; import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@ -9,7 +9,7 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
* *
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'} * {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'lowercase'}) @Pipe({name: 'lowercase'})
@Injectable() @Injectable()
export class LowerCasePipe implements PipeTransform { export class LowerCasePipe implements PipeTransform {

View File

@ -5,7 +5,6 @@ import {
StringWrapper, StringWrapper,
NumberWrapper, NumberWrapper,
RegExpWrapper, RegExpWrapper,
CONST,
FunctionWrapper FunctionWrapper
} from 'angular2/src/facade/lang'; } from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
@ -20,7 +19,7 @@ var _re = RegExpWrapper.create('^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$');
/** /**
* Internal base class for numeric pipes. * Internal base class for numeric pipes.
*/ */
@CONST() /* @ts2dart_const */
@Injectable() @Injectable()
export class NumberPipe { export class NumberPipe {
/** @internal */ /** @internal */
@ -82,7 +81,7 @@ export class NumberPipe {
* *
* {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='NumberPipe'} * {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='NumberPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'number'}) @Pipe({name: 'number'})
@Injectable() @Injectable()
export class DecimalPipe extends NumberPipe implements PipeTransform { export class DecimalPipe extends NumberPipe implements PipeTransform {
@ -107,7 +106,7 @@ export class DecimalPipe extends NumberPipe implements PipeTransform {
* *
* {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='PercentPipe'} * {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='PercentPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'percent'}) @Pipe({name: 'percent'})
@Injectable() @Injectable()
export class PercentPipe extends NumberPipe implements PipeTransform { export class PercentPipe extends NumberPipe implements PipeTransform {
@ -136,7 +135,7 @@ export class PercentPipe extends NumberPipe implements PipeTransform {
* *
* {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='CurrencyPipe'} * {@example core/pipes/ts/number_pipe/number_pipe_example.ts region='CurrencyPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'currency'}) @Pipe({name: 'currency'})
@Injectable() @Injectable()
export class CurrencyPipe extends NumberPipe implements PipeTransform { export class CurrencyPipe extends NumberPipe implements PipeTransform {

View File

@ -1,4 +1,4 @@
import {isBlank, isString, isArray, StringWrapper, CONST} from 'angular2/src/facade/lang'; import {isBlank, isString, isArray, StringWrapper} from 'angular2/src/facade/lang';
import {ListWrapper} from 'angular2/src/facade/collection'; import {ListWrapper} from 'angular2/src/facade/collection';
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core'; import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception'; import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';

View File

@ -1,4 +1,4 @@
import {isString, CONST, isBlank} from 'angular2/src/facade/lang'; import {isString, isBlank} from 'angular2/src/facade/lang';
import {PipeTransform, WrappedValue, Injectable, Pipe} from 'angular2/core'; import {PipeTransform, WrappedValue, Injectable, Pipe} from 'angular2/core';
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception'; import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
@ -9,7 +9,7 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
* *
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'} * {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
*/ */
@CONST() /* @ts2dart_const */
@Pipe({name: 'uppercase'}) @Pipe({name: 'uppercase'})
@Injectable() @Injectable()
export class UpperCasePipe implements PipeTransform { export class UpperCasePipe implements PipeTransform {

View File

@ -40,7 +40,7 @@ function _createCompilerConfig() {
* A set of providers that provide `RuntimeCompiler` and its dependencies to use for * A set of providers that provide `RuntimeCompiler` and its dependencies to use for
* template compilation. * template compilation.
*/ */
export const COMPILER_PROVIDERS: Array<Type | Provider | any[]> = /*@ts2dart_const*/ [ export const COMPILER_PROVIDERS: Array<any | Type | Provider | any[]> = /*@ts2dart_const*/ [
Lexer, Lexer,
Parser, Parser,
HtmlParser, HtmlParser,
@ -50,13 +50,13 @@ export const COMPILER_PROVIDERS: Array<Type | Provider | any[]> = /*@ts2dart_con
DEFAULT_PACKAGE_URL_PROVIDER, DEFAULT_PACKAGE_URL_PROVIDER,
StyleCompiler, StyleCompiler,
ViewCompiler, ViewCompiler,
new Provider(CompilerConfig, {useFactory: _createCompilerConfig, deps: []}, /*@ts2dart_Provider*/{provide: CompilerConfig, useFactory: _createCompilerConfig, deps: []},
RuntimeCompiler, RuntimeCompiler,
new Provider(ComponentResolver, {useExisting: RuntimeCompiler}), /*@ts2dart_Provider*/{provide: ComponentResolver, useExisting: RuntimeCompiler},
DomElementSchemaRegistry, DomElementSchemaRegistry,
new Provider(ElementSchemaRegistry, {useExisting: DomElementSchemaRegistry}), /*@ts2dart_Provider*/{provide: ElementSchemaRegistry, useExisting: DomElementSchemaRegistry},
UrlResolver, UrlResolver,
ViewResolver, ViewResolver,
DirectiveResolver, DirectiveResolver,
PipeResolver PipeResolver
]); ];

View File

@ -5,7 +5,6 @@ import {
isBlank, isBlank,
isPrimitive, isPrimitive,
isStringMap, isStringMap,
CONST_EXPR,
FunctionWrapper FunctionWrapper
} from 'angular2/src/facade/lang'; } from 'angular2/src/facade/lang';
import { import {
@ -155,7 +154,7 @@ export class StaticReflector implements ReflectorReader {
} }
private registerDecoratorOrConstructor(type: StaticSymbol, ctor: any, private registerDecoratorOrConstructor(type: StaticSymbol, ctor: any,
crossModuleProps: any[] = CONST_EXPR([])): void { crossModuleProps: any[] = []): void {
this.conversionMap.set(type, (moduleContext: ModuleContext, args: any[]) => { this.conversionMap.set(type, (moduleContext: ModuleContext, args: any[]) => {
let argValues = []; let argValues = [];
ListWrapper.forEachWithIndex(args, (arg, index) => { ListWrapper.forEachWithIndex(args, (arg, index) => {

View File

@ -5,7 +5,6 @@ import {
MapWrapper MapWrapper
} from 'angular2/src/facade/collection'; } from 'angular2/src/facade/collection';
import { import {
CONST_EXPR,
RegExpWrapper, RegExpWrapper,
isPresent, isPresent,
StringWrapper, StringWrapper,

View File

@ -12,18 +12,19 @@ import {ViewUtils} from "./linker/view_utils";
import {ComponentResolver, ReflectorComponentResolver} from './linker/component_resolver'; import {ComponentResolver, ReflectorComponentResolver} from './linker/component_resolver';
import {DynamicComponentLoader, DynamicComponentLoader_} from './linker/dynamic_component_loader'; import {DynamicComponentLoader, DynamicComponentLoader_} from './linker/dynamic_component_loader';
var __unused: Type; // avoid unused import when Type union types are erased let __unused: Type; // avoid unused import when Type union types are erased
/** /**
* A default set of providers which should be included in any Angular * A default set of providers which should be included in any Angular
* application, regardless of the platform it runs onto. * application, regardless of the platform it runs onto.
*/ */
export const APPLICATION_COMMON_PROVIDERS: Array<Type | Provider | any[]> = /*@ts2dart_const*/ [ export const APPLICATION_COMMON_PROVIDERS: Array<any | Type | Provider | any[]> =
APPLICATION_CORE_PROVIDERS, /*@ts2dart_const*/[
new Provider(ComponentResolver, {useClass: ReflectorComponentResolver}, APPLICATION_CORE_PROVIDERS,
APP_ID_RANDOM_PROVIDER, /*@ts2dart_const*/ {provide: ComponentResolver, useClass: ReflectorComponentResolver},
ViewUtils, APP_ID_RANDOM_PROVIDER,
new Provider(IterableDiffers, {useValue: defaultIterableDiffers}), ViewUtils,
new Provider(KeyValueDiffers, {useValue: defaultKeyValueDiffers}), /*@ts2dart_const*/ {provide: IterableDiffers, useValue: defaultIterableDiffers},
new Provider(DynamicComponentLoader, {useClass: DynamicComponentLoader_}) /*@ts2dart_const*/ {provide: KeyValueDiffers, useValue: defaultKeyValueDiffers},
]); /*@ts2dart_const*/ {provide: DynamicComponentLoader, useClass: DynamicComponentLoader_},
];

View File

@ -2,7 +2,6 @@ import {BaseException} from 'angular2/src/facade/exceptions';
import {isListLikeIterable, iterateListLike, ListWrapper} from 'angular2/src/facade/collection'; import {isListLikeIterable, iterateListLike, ListWrapper} from 'angular2/src/facade/collection';
import { import {
CONST,
isBlank, isBlank,
isPresent, isPresent,
stringify, stringify,
@ -14,7 +13,7 @@ import {
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
import {IterableDiffer, IterableDifferFactory, TrackByFn} from '../differs/iterable_differs'; import {IterableDiffer, IterableDifferFactory, TrackByFn} from '../differs/iterable_differs';
@CONST() /* @ts2dart_const */
export class DefaultIterableDifferFactory implements IterableDifferFactory { export class DefaultIterableDifferFactory implements IterableDifferFactory {
supports(obj: Object): boolean { return isListLikeIterable(obj); } supports(obj: Object): boolean { return isListLikeIterable(obj); }
create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): DefaultIterableDiffer { create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): DefaultIterableDiffer {

View File

@ -1,5 +1,5 @@
import {MapWrapper, StringMapWrapper} from 'angular2/src/facade/collection'; import {MapWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {stringify, looseIdentical, isJsObject, CONST, isBlank} from 'angular2/src/facade/lang'; import {stringify, looseIdentical, isJsObject, isBlank} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions'; import {BaseException} from 'angular2/src/facade/exceptions';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
import {KeyValueDiffer, KeyValueDifferFactory} from '../differs/keyvalue_differs'; import {KeyValueDiffer, KeyValueDifferFactory} from '../differs/keyvalue_differs';

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, CONST, getTypeNameForDebugging} from 'angular2/src/facade/lang'; import {isBlank, isPresent, getTypeNameForDebugging} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions'; import {BaseException} from 'angular2/src/facade/exceptions';
import {ListWrapper} from 'angular2/src/facade/collection'; import {ListWrapper} from 'angular2/src/facade/collection';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
@ -32,7 +32,7 @@ export interface IterableDifferFactory {
* A repository of different iterable diffing strategies used by NgFor, NgClass, and others. * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
* @ts2dart_const * @ts2dart_const
*/ */
@CONST() /* @ts2dart_const */
export class IterableDiffers { export class IterableDiffers {
constructor(public factories: IterableDifferFactory[]) {} constructor(public factories: IterableDifferFactory[]) {}

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, CONST} from 'angular2/src/facade/lang'; import {isBlank, isPresent} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions'; import {BaseException} from 'angular2/src/facade/exceptions';
import {ListWrapper} from 'angular2/src/facade/collection'; import {ListWrapper} from 'angular2/src/facade/collection';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
@ -24,7 +24,7 @@ export interface KeyValueDifferFactory {
* A repository of different Map diffing strategies used by NgClass, NgStyle, and others. * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
* @ts2dart_const * @ts2dart_const
*/ */
@CONST() /* @ts2dart_const */
export class KeyValueDiffers { export class KeyValueDiffers {
constructor(public factories: KeyValueDifferFactory[]) {} constructor(public factories: KeyValueDifferFactory[]) {}

View File

@ -1,4 +1,4 @@
import {CONST, stringify, isBlank, isPresent} from "angular2/src/facade/lang"; import {stringify, isBlank, isPresent} from "angular2/src/facade/lang";
/** /**
* A parameter metadata that specifies a dependency. * A parameter metadata that specifies a dependency.
@ -40,7 +40,7 @@ import {CONST, stringify, isBlank, isPresent} from "angular2/src/facade/lang";
* expect(injector.get(Car).engine instanceof Engine).toBe(true); * expect(injector.get(Car).engine instanceof Engine).toBe(true);
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class InjectMetadata { export class InjectMetadata {
constructor(public token) {} constructor(public token) {}
toString(): string { return `@Inject(${stringify(this.token)})`; } toString(): string { return `@Inject(${stringify(this.token)})`; }
@ -67,7 +67,7 @@ export class InjectMetadata {
* expect(injector.get(Car).engine).toBeNull(); * expect(injector.get(Car).engine).toBeNull();
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class OptionalMetadata { export class OptionalMetadata {
toString(): string { return `@Optional()`; } toString(): string { return `@Optional()`; }
} }
@ -76,7 +76,7 @@ export class OptionalMetadata {
* `DependencyMetadata` is used by the framework to extend DI. * `DependencyMetadata` is used by the framework to extend DI.
* This is internal to Angular and should not be used directly. * This is internal to Angular and should not be used directly.
*/ */
@CONST() /* @ts2dart_const */
export class DependencyMetadata { export class DependencyMetadata {
get token() { return null; } get token() { return null; }
} }
@ -112,7 +112,7 @@ export class DependencyMetadata {
* expect(() => injector.get(NeedsService)).toThrowError(); * expect(() => injector.get(NeedsService)).toThrowError();
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class InjectableMetadata { export class InjectableMetadata {
constructor() {} constructor() {}
} }
@ -144,7 +144,7 @@ export class InjectableMetadata {
* expect(() => child.get(NeedsDependency)).toThrowError(); * expect(() => child.get(NeedsDependency)).toThrowError();
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class SelfMetadata { export class SelfMetadata {
toString(): string { return `@Self()`; } toString(): string { return `@Self()`; }
} }
@ -174,7 +174,7 @@ export class SelfMetadata {
* expect(() => inj.get(NeedsDependency)).toThrowError(); * expect(() => inj.get(NeedsDependency)).toThrowError();
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class SkipSelfMetadata { export class SkipSelfMetadata {
toString(): string { return `@SkipSelf()`; } toString(): string { return `@SkipSelf()`; }
} }
@ -233,7 +233,7 @@ export class SkipSelfMetadata {
* bootstrap(App); * bootstrap(App);
*``` *```
*/ */
@CONST() /* @ts2dart_const */
export class HostMetadata { export class HostMetadata {
toString(): string { return `@Host()`; } toString(): string { return `@Host()`; }
} }

View File

@ -1,4 +1,3 @@
import {CONST} from 'angular2/src/facade/lang';
/** /**
* Creates a token that can be used in a DI Provider. * Creates a token that can be used in a DI Provider.
@ -21,7 +20,7 @@ import {CONST} from 'angular2/src/facade/lang';
* Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better * Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better
* error messages. * error messages.
*/ */
@CONST() /* @ts2dart_const */
export class OpaqueToken { export class OpaqueToken {
constructor(private _desc: string) {} constructor(private _desc: string) {}

View File

@ -1,7 +1,6 @@
import { import {
normalizeBool, normalizeBool,
Type, Type,
CONST,
isType, isType,
isBlank, isBlank,
isFunction, isFunction,
@ -24,7 +23,7 @@ import {BaseException} from 'angular2/src/facade/exceptions';
* expect(injector.get("message")).toEqual('Hello'); * expect(injector.get("message")).toEqual('Hello');
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class Provider { export class Provider {
/** /**
* Token used when retrieving this provider. Usually, it is a type {@link Type}. * Token used when retrieving this provider. Usually, it is a type {@link Type}.
@ -210,7 +209,7 @@ export class Provider {
* *
* @deprecated * @deprecated
*/ */
@CONST() /* @ts2dart_const */
export class Binding extends Provider { export class Binding extends Provider {
constructor(token, {toClass, toValue, toAlias, toFactory, deps, multi}: { constructor(token, {toClass, toValue, toAlias, toFactory, deps, multi}: {
toClass?: Type, toClass?: Type,

View File

@ -1,4 +1,4 @@
import {stringify, CONST, Type, isBlank} from 'angular2/src/facade/lang'; import {stringify, Type, isBlank} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {resolveForwardRef} from './forward_ref'; import {resolveForwardRef} from './forward_ref';

View File

@ -1,4 +1,4 @@
import {Type, isBlank, isPresent, CONST, isArray, isType} from 'angular2/src/facade/lang'; import {Type, isBlank, isPresent, isArray, isType} from 'angular2/src/facade/lang';
import {MapWrapper, ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection'; import {MapWrapper, ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {reflector} from 'angular2/src/core/reflection/reflection'; import {reflector} from 'angular2/src/core/reflection/reflection';
import {ReflectiveKey} from './reflective_key'; import {ReflectiveKey} from './reflective_key';

View File

@ -1,5 +1,5 @@
import {Injector} from 'angular2/src/core/di'; import {Injector} from 'angular2/src/core/di';
import {Type, CONST, CONST_EXPR, isPresent, isBlank} from 'angular2/src/facade/lang'; import {Type, isPresent, isBlank} from 'angular2/src/facade/lang';
import {unimplemented} from 'angular2/src/facade/exceptions'; import {unimplemented} from 'angular2/src/facade/exceptions';
import {ElementRef} from './element_ref'; import {ElementRef} from './element_ref';
import {ViewRef, ViewRef_} from './view_ref'; import {ViewRef, ViewRef_} from './view_ref';
@ -69,13 +69,8 @@ export class ComponentRef_ extends ComponentRef {
onDestroy(callback: Function): void { this.hostView.onDestroy(callback); } onDestroy(callback: Function): void { this.hostView.onDestroy(callback); }
} }
<<<<<<< HEAD const EMPTY_CONTEXT = /*@ts2dart_const*/new Object();
const EMPTY_CONTEXT = CONST_EXPR(new Object());
@CONST()
=======
/* @ts2dart_const */
>>>>>>> 176ffd8... chore: upgrade to ts2dart@0.9.9
export class ComponentFactory { export class ComponentFactory {
constructor(public selector: string, private _viewFactory: Function, constructor(public selector: string, private _viewFactory: Function,
private _componentType: Type) {} private _componentType: Type) {}

View File

@ -1,11 +1,11 @@
import {isPresent, isBlank, CONST} from 'angular2/src/facade/lang'; import {isPresent, isBlank} from 'angular2/src/facade/lang';
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection'; import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
import {Injector} from 'angular2/src/core/di'; import {Injector} from 'angular2/src/core/di';
import {RenderDebugInfo} from 'angular2/src/core/render/api'; import {RenderDebugInfo} from 'angular2/src/core/render/api';
import {DebugAppView} from './view'; import {DebugAppView} from './view';
import {ViewType} from './view_type'; import {ViewType} from './view_type';
@CONST() /* @ts2dart_const */
export class StaticNodeDebugInfo { export class StaticNodeDebugInfo {
constructor(public providerTokens: any[], public componentToken: any, constructor(public providerTokens: any[], public componentToken: any,
public refTokens: {[key: string]: any}) {} public refTokens: {[key: string]: any}) {}

View File

@ -1,10 +1,10 @@
import {CONST_EXPR, isBlank} from 'angular2/src/facade/lang'; import {isBlank} from 'angular2/src/facade/lang';
import {ElementRef} from './element_ref'; import {ElementRef} from './element_ref';
import {AppElement} from './element'; import {AppElement} from './element';
import {AppView} from './view'; import {AppView} from './view';
import {EmbeddedViewRef} from './view_ref'; import {EmbeddedViewRef} from './view_ref';
const EMPTY_CONTEXT = CONST_EXPR(new Object()); const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object();
/** /**
* Represents an Embedded Template that can be used to instantiate Embedded Views. * Represents an Embedded Template that can be used to instantiate Embedded Views.

View File

@ -16,7 +16,6 @@ import {
Type, Type,
isArray, isArray,
isNumber, isNumber,
CONST,
stringify, stringify,
isPrimitive, isPrimitive,
isString isString

View File

@ -1,4 +1,4 @@
import {CONST, Type, stringify, isPresent, isString} from 'angular2/src/facade/lang'; import {Type, stringify, isPresent, isString} from 'angular2/src/facade/lang';
import {resolveForwardRef} from 'angular2/src/core/di'; import {resolveForwardRef} from 'angular2/src/core/di';
import {DependencyMetadata} from 'angular2/src/core/di/metadata'; import {DependencyMetadata} from 'angular2/src/core/di/metadata';
@ -19,7 +19,7 @@ import {DependencyMetadata} from 'angular2/src/core/di/metadata';
* *
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'} * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
*/ */
@CONST() /* @ts2dart_const */
export class AttributeMetadata extends DependencyMetadata { export class AttributeMetadata extends DependencyMetadata {
constructor(public attributeName: string) { super(); } constructor(public attributeName: string) { super(); }
@ -141,7 +141,7 @@ export class AttributeMetadata extends DependencyMetadata {
* The injected object is an unmodifiable live list. * The injected object is an unmodifiable live list.
* See {@link QueryList} for more details. * See {@link QueryList} for more details.
*/ */
@CONST() /* @ts2dart_const */
export class QueryMetadata extends DependencyMetadata { export class QueryMetadata extends DependencyMetadata {
/** /**
* whether we want to query only direct children (false) or all * whether we want to query only direct children (false) or all
@ -208,7 +208,7 @@ export class QueryMetadata extends DependencyMetadata {
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class ContentChildrenMetadata extends QueryMetadata { export class ContentChildrenMetadata extends QueryMetadata {
constructor(_selector: Type | string, constructor(_selector: Type | string,
{descendants = false, read = null}: {descendants?: boolean, read?: any} = {}) { {descendants = false, read = null}: {descendants?: boolean, read?: any} = {}) {
@ -237,7 +237,7 @@ export class ContentChildrenMetadata extends QueryMetadata {
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class ContentChildMetadata extends QueryMetadata { export class ContentChildMetadata extends QueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) { constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
super(_selector, {descendants: true, first: true, read: read}); super(_selector, {descendants: true, first: true, read: read});
@ -279,7 +279,7 @@ export class ContentChildMetadata extends QueryMetadata {
* The injected object is an iterable and observable live list. * The injected object is an iterable and observable live list.
* See {@link QueryList} for more details. * See {@link QueryList} for more details.
*/ */
@CONST() /* @ts2dart_const */
export class ViewQueryMetadata extends QueryMetadata { export class ViewQueryMetadata extends QueryMetadata {
constructor(_selector: Type | string, constructor(_selector: Type | string,
{descendants = false, first = false, {descendants = false, first = false,
@ -371,7 +371,7 @@ export class ViewQueryMetadata extends QueryMetadata {
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class ViewChildrenMetadata extends ViewQueryMetadata { export class ViewChildrenMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) { constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
super(_selector, {descendants: true, read: read}); super(_selector, {descendants: true, read: read});
@ -448,7 +448,7 @@ export class ViewChildrenMetadata extends ViewQueryMetadata {
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class ViewChildMetadata extends ViewQueryMetadata { export class ViewChildMetadata extends ViewQueryMetadata {
constructor(_selector: Type | string, {read = null}: {read?: any} = {}) { constructor(_selector: Type | string, {read = null}: {read?: any} = {}) {
super(_selector, {descendants: true, first: true, read: read}); super(_selector, {descendants: true, first: true, read: read});

View File

@ -1,4 +1,4 @@
import {isPresent, CONST, Type} from 'angular2/src/facade/lang'; import {isPresent, Type} from 'angular2/src/facade/lang';
import {InjectableMetadata} from 'angular2/src/core/di/metadata'; import {InjectableMetadata} from 'angular2/src/core/di/metadata';
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection'; import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
import {ViewEncapsulation} from 'angular2/src/core/metadata/view'; import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
@ -381,7 +381,7 @@ import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
* the instantiated * the instantiated
* view occurs on the second `<li></li>` which is a sibling to the `<template>` element. * view occurs on the second `<li></li>` which is a sibling to the `<template>` element.
*/ */
@CONST() /* @ts2dart_const */
export class DirectiveMetadata extends InjectableMetadata { export class DirectiveMetadata extends InjectableMetadata {
/** /**
* The CSS selector that triggers the instantiation of a directive. * The CSS selector that triggers the instantiation of a directive.
@ -784,7 +784,7 @@ export class DirectiveMetadata extends InjectableMetadata {
* *
* {@example core/ts/metadata/metadata.ts region='component'} * {@example core/ts/metadata/metadata.ts region='component'}
*/ */
@CONST() /* @ts2dart_const */
export class ComponentMetadata extends DirectiveMetadata { export class ComponentMetadata extends DirectiveMetadata {
/** /**
* Defines the used change detection strategy. * Defines the used change detection strategy.
@ -941,7 +941,7 @@ export class ComponentMetadata extends DirectiveMetadata {
* *
* {@example core/ts/metadata/metadata.ts region='pipe'} * {@example core/ts/metadata/metadata.ts region='pipe'}
*/ */
@CONST() /* @ts2dart_const */
export class PipeMetadata extends InjectableMetadata { export class PipeMetadata extends InjectableMetadata {
name: string; name: string;
/** @internal */ /** @internal */
@ -997,7 +997,7 @@ export class PipeMetadata extends InjectableMetadata {
* bootstrap(App); * bootstrap(App);
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class InputMetadata { export class InputMetadata {
constructor( constructor(
/** /**
@ -1047,7 +1047,7 @@ export class InputMetadata {
* bootstrap(App); * bootstrap(App);
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class OutputMetadata { export class OutputMetadata {
constructor(public bindingPropertyName?: string) {} constructor(public bindingPropertyName?: string) {}
} }
@ -1087,7 +1087,7 @@ export class OutputMetadata {
* bootstrap(App); * bootstrap(App);
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class HostBindingMetadata { export class HostBindingMetadata {
constructor(public hostPropertyName?: string) {} constructor(public hostPropertyName?: string) {}
} }
@ -1126,7 +1126,7 @@ export class HostBindingMetadata {
* bootstrap(App); * bootstrap(App);
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class HostListenerMetadata { export class HostListenerMetadata {
constructor(public eventName: string, public args?: string[]) {} constructor(public eventName: string, public args?: string[]) {}
} }

View File

@ -1,4 +1,4 @@
import {CONST, Type} from 'angular2/src/facade/lang'; import {Type} from 'angular2/src/facade/lang';
/** /**
* Defines template and style encapsulation options available for Component's {@link View}. * Defines template and style encapsulation options available for Component's {@link View}.
@ -61,7 +61,7 @@ export var VIEW_ENCAPSULATION_VALUES =
* } * }
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class ViewMetadata { export class ViewMetadata {
/** /**
* Specifies a template URL for an Angular component. * Specifies a template URL for an Angular component.

View File

@ -10,13 +10,15 @@ function _reflector(): Reflector {
return reflector; return reflector;
} }
var __unused: Type; // prevent missing use Dart warning.
/** /**
* A default set of providers which should be included in any Angular platform. * A default set of providers which should be included in any Angular platform.
*/ */
export const PLATFORM_COMMON_PROVIDERS: Array<Type | Provider | any[]> = /*@ts2dart_const*/ [ export const PLATFORM_COMMON_PROVIDERS: Array<any | Type | Provider | any[]> = /*@ts2dart_const*/[
PLATFORM_CORE_PROVIDERS, PLATFORM_CORE_PROVIDERS,
new Provider(Reflector, {useFactory: _reflector, deps: []}, /*@ts2dart_Provider*/ {provide: Reflector, useFactory: _reflector, deps: []},
new Provider(ReflectorReader, {useExisting: Reflector}), /*@ts2dart_Provider*/ {provide: ReflectorReader, useExisting: Reflector},
TestabilityRegistry, TestabilityRegistry,
Console Console
]); ];

View File

@ -1,6 +1,6 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {CONST, scheduleMicroTask} from 'angular2/src/facade/lang'; import {scheduleMicroTask} from 'angular2/src/facade/lang';
import {BaseException} from 'angular2/src/facade/exceptions'; import {BaseException} from 'angular2/src/facade/exceptions';
import {NgZone} from '../zone/ng_zone'; import {NgZone} from '../zone/ng_zone';
import {ObservableWrapper} from 'angular2/src/facade/async'; import {ObservableWrapper} from 'angular2/src/facade/async';
@ -134,7 +134,7 @@ export interface GetTestability {
findInAncestors: boolean): Testability; findInAncestors: boolean): Testability;
} }
@CONST() /* @ts2dart_const */
class _NoopGetTestability implements GetTestability { class _NoopGetTestability implements GetTestability {
addToWindow(registry: TestabilityRegistry): void {} addToWindow(registry: TestabilityRegistry): void {}
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findTestabilityInTree(registry: TestabilityRegistry, elem: any,

View File

@ -14,10 +14,6 @@ class Math {
static num min(num a, num b) => math.min(a, b); static num min(num a, num b) => math.min(a, b);
} }
class CONST {
const CONST();
}
const IS_DART = true; const IS_DART = true;
scheduleMicroTask(Function fn) { scheduleMicroTask(Function fn) {
@ -398,4 +394,4 @@ num bitWiseAnd(List values) {
String escape(String s) { String escape(String s) {
return Uri.encodeComponent(s); return Uri.encodeComponent(s);
} }

View File

@ -106,10 +106,6 @@ _global.assert = function assert(condition) {
// TODO: to be fixed properly via #2830, noop for now // TODO: to be fixed properly via #2830, noop for now
}; };
export function CONST(): ClassDecorator & PropertyDecorator {
return (target) => target;
}
export function isPresent(obj: any): boolean { export function isPresent(obj: any): boolean {
return obj !== undefined && obj !== null; return obj !== undefined && obj !== null;
} }

View File

@ -1,5 +1,5 @@
import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
import {CONST, global, isPresent} from 'angular2/src/facade/lang'; import {global, isPresent} from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
import {PromiseWrapper, ObservableWrapper} from 'angular2/src/facade/async'; import {PromiseWrapper, ObservableWrapper} from 'angular2/src/facade/async';

View File

@ -1,5 +1,5 @@
import {IS_DART} from 'angular2/src/facade/lang'; import {IS_DART} from 'angular2/src/facade/lang';
import {provide, Provider, Injector, OpaqueToken} from 'angular2/src/core/di'; import {provide, Injector, OpaqueToken} from 'angular2/src/core/di';
import {XHR} from 'angular2/src/compiler/xhr'; import {XHR} from 'angular2/src/compiler/xhr';
import { import {
PLATFORM_INITIALIZER, PLATFORM_INITIALIZER,
@ -55,10 +55,10 @@ export const BROWSER_PLATFORM_MARKER =
* Used automatically by `bootstrap`, or can be passed to {@link platform}. * Used automatically by `bootstrap`, or can be passed to {@link platform}.
*/ */
export const BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/ [ export const BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/ [
new Provider(BROWSER_PLATFORM_MARKER, {useValue: true}, /*@ts2dart_Provider*/{provide: BROWSER_PLATFORM_MARKER, useValue: true},
PLATFORM_COMMON_PROVIDERS, PLATFORM_COMMON_PROVIDERS,
new Provider(PLATFORM_INITIALIZER, {useValue: initDomAdapter, multi: true}), /*@ts2dart_Provider*/{provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},
]); ];
function _exceptionHandler(): ExceptionHandler { function _exceptionHandler(): ExceptionHandler {
// !IS_DART is required because we must rethrow exceptions in JS, // !IS_DART is required because we must rethrow exceptions in JS,
@ -79,27 +79,27 @@ export const BROWSER_APP_COMMON_PROVIDERS: Array<any /*Type | Provider | any[]*/
/*@ts2dart_const*/ [ /*@ts2dart_const*/ [
APPLICATION_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS,
FORM_PROVIDERS, FORM_PROVIDERS,
new Provider(PLATFORM_PIPES, {useValue: COMMON_PIPES, multi: true}, /*@ts2dart_Provider*/{provide: PLATFORM_PIPES, useValue: COMMON_PIPES, multi: true},
new Provider(PLATFORM_DIRECTIVES, {useValue: COMMON_DIRECTIVES, multi: true}), /*@ts2dart_Provider*/{provide: PLATFORM_DIRECTIVES, useValue: COMMON_DIRECTIVES, multi: true},
new Provider(ExceptionHandler, {useFactory: _exceptionHandler, deps: []}), /*@ts2dart_Provider*/{provide: ExceptionHandler, useFactory: _exceptionHandler, deps: []},
new Provider(DOCUMENT, {useFactory: _document, deps: []}), /*@ts2dart_Provider*/{provide: DOCUMENT, useFactory: _document, deps: []},
new Provider(EVENT_MANAGER_PLUGINS, {useClass: DomEventsPlugin, multi: true}), /*@ts2dart_Provider*/{provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true},
new Provider(EVENT_MANAGER_PLUGINS, {useClass: KeyEventsPlugin, multi: true}), /*@ts2dart_Provider*/{provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true},
new Provider(EVENT_MANAGER_PLUGINS, {useClass: HammerGesturesPlugin, multi: true}), /*@ts2dart_Provider*/{provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true},
new Provider(HAMMER_GESTURE_CONFIG, {useClass: HammerGestureConfig}), /*@ts2dart_Provider*/{provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig},
new Provider(DomRootRenderer, {useClass: DomRootRenderer_}), /*@ts2dart_Provider*/{provide: DomRootRenderer, useClass: DomRootRenderer_},
new Provider(RootRenderer, {useExisting: DomRootRenderer}), /*@ts2dart_Provider*/{provide: RootRenderer, useExisting: DomRootRenderer},
new Provider(SharedStylesHost, {useExisting: DomSharedStylesHost}), /*@ts2dart_Provider*/{provide: SharedStylesHost, useExisting: DomSharedStylesHost},
DomSharedStylesHost, DomSharedStylesHost,
Testability, Testability,
BrowserDetails, BrowserDetails,
AnimationBuilder, AnimationBuilder,
EventManager, EventManager,
ELEMENT_PROBE_PROVIDERS ELEMENT_PROBE_PROVIDERS
]); ];
export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> = export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =
/*@ts2dart_const*/ [new Provider(XHR, {useClass: CachedXHR}]); /*@ts2dart_const*/ [/*@ts2dart_Provider*/{provide: XHR, useClass: CachedXHR}];
export function initDomAdapter() { export function initDomAdapter() {
BrowserDomAdapter.makeCurrent(); BrowserDomAdapter.makeCurrent();

View File

@ -1,5 +1,5 @@
import {assertionsEnabled, isPresent} from 'angular2/src/facade/lang'; import {assertionsEnabled, isPresent} from 'angular2/src/facade/lang';
import {Injectable, provide, Provider} from 'angular2/src/core/di'; import {Injectable, provide} from 'angular2/src/core/di';
import {DOM} from 'angular2/src/platform/dom/dom_adapter'; import {DOM} from 'angular2/src/platform/dom/dom_adapter';
import {DebugNode, getDebugNode} from 'angular2/src/core/debug/debug_node'; import {DebugNode, getDebugNode} from 'angular2/src/core/debug/debug_node';
import {DomRootRenderer} from 'angular2/src/platform/dom/dom_renderer'; import {DomRootRenderer} from 'angular2/src/platform/dom/dom_renderer';
@ -36,10 +36,18 @@ function _createRootRenderer(rootRenderer) {
/** /**
* Providers which support debugging Angular applications (e.g. via `ng.probe`). * Providers which support debugging Angular applications (e.g. via `ng.probe`).
*/ */
export const ELEMENT_PROBE_PROVIDERS: any[] = /*@ts2dart_const*/ [ export const ELEMENT_PROBE_PROVIDERS: any[] = /*@ts2dart_const*/[
new Provider(RootRenderer, /*@ts2dart_Provider*/ {
{useFactory: _createConditionalRootRenderer, deps: [DomRootRenderer]} provide: RootRenderer,
]); useFactory: _createConditionalRootRenderer,
deps: [DomRootRenderer]
}
];
export const ELEMENT_PROBE_PROVIDERS_PROD_MODE: any[] = /*@ts2dart_const*/ export const ELEMENT_PROBE_PROVIDERS_PROD_MODE: any[] = /*@ts2dart_const*/[
[new Provider(RootRenderer, {useFactory: _createRootRenderer, deps: [DomRootRenderer]}]); /*@ts2dart_Provider*/ {
provide: RootRenderer,
useFactory: _createRootRenderer,
deps: [DomRootRenderer]
}
];

View File

@ -35,19 +35,20 @@ export class WebWorkerInstance {
/** /**
* An array of providers that should be passed into `application()` when initializing a new Worker. * An array of providers that should be passed into `application()` when initializing a new Worker.
*/ */
export const WORKER_RENDER_APPLICATION: Array<any /*Type | Provider | any[]*/> = export const WORKER_RENDER_APPLICATION: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/[
/*@ts2dart_const*/ [ WORKER_RENDER_APPLICATION_COMMON, WebWorkerInstance,
WORKER_RENDER_APPLICATION_COMMON, /*@ts2dart_Provider*/ {
WebWorkerInstance, provide: APP_INITIALIZER,
new Provider(APP_INITIALIZER, useFactory: (injector => () => initWebWorkerApplication(injector)),
{ multi: true,
useFactory: (injector => () => initWebWorkerApplication(injector), deps: [Injector]
multi: true, },
deps: [Injector] /*@ts2dart_Provider*/ {
}), provide: MessageBus,
new Provider(MessageBus, useFactory: (instance) => instance.bus,
{useFactory: (instance) => instance.bus, deps: [WebWorkerInstance]}) deps: [WebWorkerInstance]
]); }
];
function initWebWorkerApplication(injector: Injector): void { function initWebWorkerApplication(injector: Injector): void {
var scriptUri: string; var scriptUri: string;

View File

@ -1,11 +1,10 @@
import {CONST} from 'angular2/src/facade/lang';
@CONST() /* @ts2dart_const */
export class RouteLifecycleHook { export class RouteLifecycleHook {
constructor(public name: string) {} constructor(public name: string) {}
} }
@CONST() /* @ts2dart_const */
export class CanActivate { export class CanActivate {
constructor(public fn: Function) {} constructor(public fn: Function) {}
} }

View File

@ -1,4 +1,4 @@
import {CONST, Type, isPresent} from 'angular2/src/facade/lang'; import {Type, isPresent} from 'angular2/src/facade/lang';
import {RouteDefinition} from '../route_definition'; import {RouteDefinition} from '../route_definition';
import {RegexSerializer} from '../rules/route_paths/regex_route_path'; import {RegexSerializer} from '../rules/route_paths/regex_route_path';
@ -11,12 +11,12 @@ var __make_dart_analyzer_happy: Promise<any> = null;
* *
* It takes an array of {@link RouteDefinition}s. * It takes an array of {@link RouteDefinition}s.
*/ */
@CONST() /* @ts2dart_const */
export class RouteConfig { export class RouteConfig {
constructor(public configs: RouteDefinition[]) {} constructor(public configs: RouteDefinition[]) {}
} }
@CONST() /* @ts2dart_const */
export abstract class AbstractRoute implements RouteDefinition { export abstract class AbstractRoute implements RouteDefinition {
name: string; name: string;
useAsDefault: boolean; useAsDefault: boolean;
@ -57,7 +57,7 @@ export abstract class AbstractRoute implements RouteDefinition {
* class MyApp {} * class MyApp {}
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class Route extends AbstractRoute { export class Route extends AbstractRoute {
component: any; component: any;
aux: string = null; aux: string = null;
@ -95,7 +95,7 @@ export class Route extends AbstractRoute {
* class MyApp {} * class MyApp {}
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class AuxRoute extends AbstractRoute { export class AuxRoute extends AbstractRoute {
component: any; component: any;
@ -136,7 +136,7 @@ export class AuxRoute extends AbstractRoute {
* class MyApp {} * class MyApp {}
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class AsyncRoute extends AbstractRoute { export class AsyncRoute extends AbstractRoute {
loader: () => Promise<Type>; loader: () => Promise<Type>;
aux: string = null; aux: string = null;
@ -175,7 +175,7 @@ export class AsyncRoute extends AbstractRoute {
* class MyApp {} * class MyApp {}
* ``` * ```
*/ */
@CONST() /* @ts2dart_const */
export class Redirect extends AbstractRoute { export class Redirect extends AbstractRoute {
redirectTo: any[]; redirectTo: any[];

View File

@ -1,4 +1,4 @@
import {CONST, Type} from 'angular2/src/facade/lang'; import {Type} from 'angular2/src/facade/lang';
import {RegexSerializer} from './rules/route_paths/regex_route_path'; import {RegexSerializer} from './rules/route_paths/regex_route_path';
/** /**

View File

@ -1072,7 +1072,7 @@ export function main() {
} }
const ALL_DIRECTIVES = /*@ts2dart_const*/ [ const ALL_DIRECTIVES = /*@ts2dart_const*/ [
forwardRef(( => TestDirective), forwardRef(() => TestDirective),
forwardRef(() => TestComponent), forwardRef(() => TestComponent),
forwardRef(() => AnotherComponent), forwardRef(() => AnotherComponent),
forwardRef(() => TestLocals), forwardRef(() => TestLocals),
@ -1082,17 +1082,17 @@ const ALL_DIRECTIVES = /*@ts2dart_const*/ [
forwardRef(() => OrderCheckDirective2), forwardRef(() => OrderCheckDirective2),
forwardRef(() => OrderCheckDirective0), forwardRef(() => OrderCheckDirective0),
forwardRef(() => OrderCheckDirective1), forwardRef(() => OrderCheckDirective1),
]); ];
const ALL_PIPES = /*@ts2dart_const*/ [ const ALL_PIPES = /*@ts2dart_const*/ [
forwardRef(( => CountingPipe), forwardRef(() => CountingPipe),
forwardRef(() => CountingImpurePipe), forwardRef(() => CountingImpurePipe),
forwardRef(() => MultiArgPipe), forwardRef(() => MultiArgPipe),
forwardRef(() => PipeWithOnDestroy), forwardRef(() => PipeWithOnDestroy),
forwardRef(() => IdentityPipe), forwardRef(() => IdentityPipe),
forwardRef(() => WrappedPipe), forwardRef(() => WrappedPipe),
AsyncPipe AsyncPipe
]); ];
@Injectable() @Injectable()
class RenderLog { class RenderLog {

View File

@ -31,7 +31,6 @@ import {
global, global,
stringify, stringify,
isBlank, isBlank,
CONST,
IS_DART IS_DART
} from 'angular2/src/facade/lang'; } from 'angular2/src/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
@ -2408,7 +2407,7 @@ class DirectiveConsumingInjectableUnbounded {
} }
@CONST() /* @ts2dart_const */
class EventBus { class EventBus {
parentEventBus: EventBus; parentEventBus: EventBus;
name: string; name: string;

View File

@ -50,7 +50,7 @@ import {NgIf} from 'angular2/common';
import {DOM} from 'angular2/src/platform/dom/dom_adapter'; import {DOM} from 'angular2/src/platform/dom/dom_adapter';
const ALL_DIRECTIVES = /*@ts2dart_const*/ [ const ALL_DIRECTIVES = /*@ts2dart_const*/ [
forwardRef(( => SimpleDirective), forwardRef(() => SimpleDirective),
forwardRef(() => CycleDirective), forwardRef(() => CycleDirective),
forwardRef(() => SimpleComponent), forwardRef(() => SimpleComponent),
forwardRef(() => SomeOtherDirective), forwardRef(() => SomeOtherDirective),
@ -81,16 +81,16 @@ const ALL_DIRECTIVES = /*@ts2dart_const*/ [
forwardRef(() => PushComponentNeedsChangeDetectorRef), forwardRef(() => PushComponentNeedsChangeDetectorRef),
forwardRef(() => NeedsHostAppService), forwardRef(() => NeedsHostAppService),
NgIf NgIf
]); ];
const ALL_PIPES = /*@ts2dart_const*/ [ const ALL_PIPES = /*@ts2dart_const*/ [
forwardRef(( => PipeNeedsChangeDetectorRef), forwardRef(() => PipeNeedsChangeDetectorRef),
forwardRef(() => PipeNeedsService), forwardRef(() => PipeNeedsService),
forwardRef(() => PurePipe), forwardRef(() => PurePipe),
forwardRef(() => ImpurePipe), forwardRef(() => ImpurePipe),
forwardRef(() => DuplicatePipe1), forwardRef(() => DuplicatePipe1),
forwardRef(() => DuplicatePipe2), forwardRef(() => DuplicatePipe2),
]); ];
@Directive({selector: '[simpleDirective]'}) @Directive({selector: '[simpleDirective]'})
class SimpleDirective { class SimpleDirective {

View File

@ -17,7 +17,6 @@ import {
ComponentFixtureNoNgZone ComponentFixtureNoNgZone
} from 'angular2/testing_internal'; } from 'angular2/testing_internal';
import {CONST_EXPR} from 'angular2/src/facade/lang';
import {Injectable, provide} from 'angular2/core'; import {Injectable, provide} from 'angular2/core';
import {NgIf} from 'angular2/common'; import {NgIf} from 'angular2/common';
import {Directive, Component, ViewMetadata, Input} from 'angular2/src/core/metadata'; import {Directive, Component, ViewMetadata, Input} from 'angular2/src/core/metadata';
@ -152,7 +151,7 @@ class ListDir1Alt {
class ListDir2 { class ListDir2 {
} }
const LIST_CHILDREN = CONST_EXPR([ListDir1, ListDir2]); const LIST_CHILDREN = /*@ts2dart_const*/[ListDir1, ListDir2];
@Component( @Component(
{selector: 'directive-list-comp', template: `(<li1></li1>)(<li2></li2>)`, directives: [LIST_CHILDREN]}) {selector: 'directive-list-comp', template: `(<li1></li1>)(<li2></li2>)`, directives: [LIST_CHILDREN]})