diff --git a/modules/@angular/common/src/common_directives.ts b/modules/@angular/common/src/common_directives.ts index dc54725474..194e439331 100644 --- a/modules/@angular/common/src/common_directives.ts +++ b/modules/@angular/common/src/common_directives.ts @@ -55,4 +55,4 @@ import {CORE_DIRECTIVES} from './directives'; * * @experimental Contains forms which are experimental. */ -export const COMMON_DIRECTIVES: Type[][] = /*@ts2dart_const*/[CORE_DIRECTIVES]; +export const COMMON_DIRECTIVES: Type[][] = [CORE_DIRECTIVES]; diff --git a/modules/@angular/common/src/directives/core_directives.ts b/modules/@angular/common/src/directives/core_directives.ts index 34c2ae7bfd..3c4255003a 100644 --- a/modules/@angular/common/src/directives/core_directives.ts +++ b/modules/@angular/common/src/directives/core_directives.ts @@ -58,7 +58,7 @@ import {NgTemplateOutlet} from './ng_template_outlet'; * * @stable */ -export const CORE_DIRECTIVES: Type[] = /*@ts2dart_const*/[ +export const CORE_DIRECTIVES: Type[] = [ NgClass, NgFor, NgIf, diff --git a/modules/@angular/common/src/forms-deprecated.ts b/modules/@angular/common/src/forms-deprecated.ts index a8f4c4dd11..24cdb06747 100644 --- a/modules/@angular/common/src/forms-deprecated.ts +++ b/modules/@angular/common/src/forms-deprecated.ts @@ -57,7 +57,7 @@ export {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './forms-deprecated * * @experimental */ -export const FORM_PROVIDERS: Type[] = /*@ts2dart_const*/[FormBuilder, RadioControlRegistry]; +export const FORM_PROVIDERS: Type[] = [FormBuilder, RadioControlRegistry]; /** diff --git a/modules/@angular/common/src/forms-deprecated/directives.ts b/modules/@angular/common/src/forms-deprecated/directives.ts index 7365af7449..7b9c63c872 100644 --- a/modules/@angular/common/src/forms-deprecated/directives.ts +++ b/modules/@angular/common/src/forms-deprecated/directives.ts @@ -58,7 +58,7 @@ export {MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValida * ``` * @experimental */ -export const FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/[ +export const FORM_DIRECTIVES: Type[] = [ NgControlName, NgControlGroup, diff --git a/modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts index f6232a980d..ea014ecf03 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts @@ -10,7 +10,7 @@ import {Directive, ElementRef, Renderer, forwardRef} from '@angular/core'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor'; -export const CHECKBOX_VALUE_ACCESSOR: any = /*@ts2dart_const*/ { +export const CHECKBOX_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CheckboxControlValueAccessor), multi: true diff --git a/modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts index e5b9491a06..475a51ebee 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts @@ -41,5 +41,4 @@ export interface ControlValueAccessor { * See {@link DefaultValueAccessor} for how to implement one. * @experimental */ -export const NG_VALUE_ACCESSOR: OpaqueToken = - /*@ts2dart_const*/ new OpaqueToken('NgValueAccessor'); +export const NG_VALUE_ACCESSOR: OpaqueToken = new OpaqueToken('NgValueAccessor'); diff --git a/modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts index 41199e565c..9764b8143d 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts @@ -12,12 +12,11 @@ import {isBlank} from '../../facade/lang'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor'; -export const DEFAULT_VALUE_ACCESSOR: any = /*@ts2dart_const*/ - /* @ts2dart_Provider */ { - provide: NG_VALUE_ACCESSOR, - useExisting: forwardRef(() => DefaultValueAccessor), - multi: true - }; +export const DEFAULT_VALUE_ACCESSOR: any = { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => DefaultValueAccessor), + multi: true +}; /** * The default accessor for writing a value and listening to changes that is used by the diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts index 0ce824b8f6..3203fe6874 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts @@ -16,11 +16,10 @@ import {Form} from './form_interface'; import {composeAsyncValidators, composeValidators, controlPath} from './shared'; import {AsyncValidatorFn, ValidatorFn} from './validators'; -export const controlGroupProvider: any = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: ControlContainer, - useExisting: forwardRef(() => NgControlGroup) - }; +export const controlGroupProvider: any = { + provide: ControlContainer, + useExisting: forwardRef(() => NgControlGroup) +}; /** * Creates and binds a control group to a DOM element. diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts index bf6f62341d..89aea96e99 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts @@ -19,11 +19,10 @@ import {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdate import {AsyncValidatorFn, ValidatorFn} from './validators'; -export const controlNameBinding: any = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: NgControl, - useExisting: forwardRef(() => NgControlName) - }; +export const controlNameBinding: any = { + provide: NgControl, + useExisting: forwardRef(() => NgControlName) +}; /** * Creates and binds a control with a specified name to a DOM element. diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_form.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form.ts index 20568df028..23d7f3dd9f 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_form.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_form.ts @@ -20,8 +20,10 @@ import {NgControl} from './ng_control'; import {NgControlGroup} from './ng_control_group'; import {composeAsyncValidators, composeValidators, setUpControl, setUpControlGroup} from './shared'; -export const formDirectiveProvider: any = - /*@ts2dart_const*/ {provide: ControlContainer, useExisting: forwardRef(() => NgForm)}; +export const formDirectiveProvider: any = { + provide: ControlContainer, + useExisting: forwardRef(() => NgForm) +}; let _formWarningDisplayed: boolean = false; diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts index 3a7f4fbd45..c003f1d562 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts @@ -18,11 +18,10 @@ import {NgControl} from './ng_control'; import {composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared'; import {AsyncValidatorFn, ValidatorFn} from './validators'; -export const formControlBinding: any = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: NgControl, - useExisting: forwardRef(() => NgFormControl) - }; +export const formControlBinding: any = { + provide: NgControl, + useExisting: forwardRef(() => NgFormControl) +}; /** * Binds an existing {@link Control} to a DOM element. diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts index 8f2c37297c..b987b521d0 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts @@ -21,11 +21,10 @@ import {NgControl} from './ng_control'; import {NgControlGroup} from './ng_control_group'; import {composeAsyncValidators, composeValidators, setUpControl, setUpControlGroup} from './shared'; -export const formDirectiveProvider: any = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: ControlContainer, - useExisting: forwardRef(() => NgFormModel) - }; +export const formDirectiveProvider: any = { + provide: ControlContainer, + useExisting: forwardRef(() => NgFormModel) +}; let _formModelWarningDisplayed: boolean = false; diff --git a/modules/@angular/common/src/forms-deprecated/directives/ng_model.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_model.ts index c9e7205621..86ce0ec797 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/ng_model.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/ng_model.ts @@ -17,11 +17,10 @@ import {NgControl} from './ng_control'; import {composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared'; import {AsyncValidatorFn, ValidatorFn} from './validators'; -export const formControlBinding: any = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: NgControl, - useExisting: forwardRef(() => NgModel) - }; +export const formControlBinding: any = { + provide: NgControl, + useExisting: forwardRef(() => NgModel) +}; /** * Binds a domain model to a form control. diff --git a/modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts index cba506a9ef..39c34e9207 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts @@ -12,7 +12,7 @@ import {NumberWrapper, isBlank} from '../../facade/lang'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor'; -export const NUMBER_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const NUMBER_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NumberValueAccessor), multi: true diff --git a/modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts index e9994b689b..6e7849cbff 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts @@ -14,7 +14,7 @@ import {isPresent} from '../../facade/lang'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor'; import {NgControl} from './ng_control'; -export const RADIO_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const RADIO_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RadioControlValueAccessor), multi: true diff --git a/modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts index 1a7e938b5e..d9825d93c4 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts @@ -13,7 +13,7 @@ import {StringWrapper, isBlank, isPresent, isPrimitive, looseIdentical} from '.. import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor'; -export const SELECT_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const SELECT_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectControlValueAccessor), multi: true diff --git a/modules/@angular/common/src/forms-deprecated/directives/validators.ts b/modules/@angular/common/src/forms-deprecated/directives/validators.ts index 2ac9dcf5e5..6292b47878 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/validators.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/validators.ts @@ -35,9 +35,9 @@ import {NG_VALIDATORS, Validators} from '../validators'; */ export interface Validator { validate(c: AbstractControl): {[key: string]: any}; } -const REQUIRED = /*@ts2dart_const*/ Validators.required; +const REQUIRED = Validators.required; -export const REQUIRED_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const REQUIRED_VALIDATOR: any = { provide: NG_VALIDATORS, useValue: REQUIRED, multi: true @@ -74,7 +74,7 @@ export interface AsyncValidatorFn { * * {@example common/forms/ts/validators/validators.ts region='min'} */ -export const MIN_LENGTH_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const MIN_LENGTH_VALIDATOR: any = { provide: NG_VALIDATORS, useExisting: forwardRef(() => MinLengthValidator), multi: true @@ -107,7 +107,7 @@ export class MinLengthValidator implements Validator { * * {@example common/forms/ts/validators/validators.ts region='max'} */ -export const MAX_LENGTH_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const MAX_LENGTH_VALIDATOR: any = { provide: NG_VALIDATORS, useExisting: forwardRef(() => MaxLengthValidator), multi: true @@ -134,7 +134,7 @@ export class MaxLengthValidator implements Validator { } -export const PATTERN_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ { +export const PATTERN_VALIDATOR: any = { provide: NG_VALIDATORS, useExisting: forwardRef(() => PatternValidator), multi: true diff --git a/modules/@angular/common/src/forms-deprecated/validators.ts b/modules/@angular/common/src/forms-deprecated/validators.ts index 803f7ec2fb..bbcb8765a2 100644 --- a/modules/@angular/common/src/forms-deprecated/validators.ts +++ b/modules/@angular/common/src/forms-deprecated/validators.ts @@ -24,7 +24,7 @@ import {AbstractControl} from './model'; * {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'} * @experimental */ -export const NG_VALIDATORS: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken('NgValidators'); +export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators'); /** * Providers for asynchronous validators to be used for {@link Control}s @@ -36,8 +36,7 @@ export const NG_VALIDATORS: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken('Ng * * @experimental */ -export const NG_ASYNC_VALIDATORS: OpaqueToken = - /*@ts2dart_const*/ new OpaqueToken('NgAsyncValidators'); +export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidators'); /** * Provides a set of validators used by form controls. diff --git a/modules/@angular/common/src/location/location_strategy.ts b/modules/@angular/common/src/location/location_strategy.ts index 4a3f5f423b..8ee122cf9f 100644 --- a/modules/@angular/common/src/location/location_strategy.ts +++ b/modules/@angular/common/src/location/location_strategy.ts @@ -69,4 +69,4 @@ export abstract class LocationStrategy { * ``` * @stable */ -export const APP_BASE_HREF: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken('appBaseHref'); +export const APP_BASE_HREF: OpaqueToken = new OpaqueToken('appBaseHref'); diff --git a/modules/@angular/common/src/pipes/common_pipes.ts b/modules/@angular/common/src/pipes/common_pipes.ts index daac2ef618..610a55a43b 100644 --- a/modules/@angular/common/src/pipes/common_pipes.ts +++ b/modules/@angular/common/src/pipes/common_pipes.ts @@ -32,7 +32,7 @@ import {UpperCasePipe} from './uppercase_pipe'; * * @experimental Contains i18n pipes which are experimental */ -export const COMMON_PIPES = /*@ts2dart_const*/[ +export const COMMON_PIPES = [ AsyncPipe, UpperCasePipe, LowerCasePipe, diff --git a/modules/@angular/common/test/forms-deprecated/integration_spec.ts b/modules/@angular/common/test/forms-deprecated/integration_spec.ts index 59e2b5f083..28c285635f 100644 --- a/modules/@angular/common/test/forms-deprecated/integration_spec.ts +++ b/modules/@angular/common/test/forms-deprecated/integration_spec.ts @@ -1519,13 +1519,7 @@ function loginIsEmptyGroupValidator(c: ControlGroup) { @Directive({ selector: '[login-is-empty-validator]', - providers: [ - /* @ts2dart_Provider */ { - provide: NG_VALIDATORS, - useValue: loginIsEmptyGroupValidator, - multi: true - } - ] + providers: [{provide: NG_VALIDATORS, useValue: loginIsEmptyGroupValidator, multi: true}] }) class LoginIsEmptyValidator { } diff --git a/modules/@angular/common/test/forms-deprecated/model_spec.ts b/modules/@angular/common/test/forms-deprecated/model_spec.ts index 0a1462ee7b..6d3d0b0db5 100644 --- a/modules/@angular/common/test/forms-deprecated/model_spec.ts +++ b/modules/@angular/common/test/forms-deprecated/model_spec.ts @@ -14,7 +14,7 @@ import {PromiseWrapper} from '../../src/facade/promise'; import {TimerWrapper, ObservableWrapper, EventEmitter} from '../../src/facade/async'; export function main() { - function asyncValidator(expected: any /** TODO #9100 */, timeouts = /*@ts2dart_const*/ {}) { + function asyncValidator(expected: any /** TODO #9100 */, timeouts = {}) { return (c: any /** TODO #9100 */) => { var completer = PromiseWrapper.completer(); var t = isPresent((timeouts as any /** TODO #9100 */)[c.value]) ? diff --git a/modules/@angular/compiler/src/compiler.ts b/modules/@angular/compiler/src/compiler.ts index 4009dd4dd2..b6dc031502 100644 --- a/modules/@angular/compiler/src/compiler.ts +++ b/modules/@angular/compiler/src/compiler.ts @@ -52,32 +52,31 @@ const _NO_XHR: XHR = { * A set of providers that provide `RuntimeCompiler` and its dependencies to use for * template compilation. */ -export const COMPILER_PROVIDERS: Array = - /*@ts2dart_const*/[ - {provide: Reflector, useValue: reflector}, - {provide: ReflectorReader, useExisting: Reflector}, - {provide: XHR, useValue: _NO_XHR}, - Console, - Lexer, - Parser, - HtmlParser, - TemplateParser, - DirectiveNormalizer, - CompileMetadataResolver, - DEFAULT_PACKAGE_URL_PROVIDER, - StyleCompiler, - ViewCompiler, - NgModuleCompiler, - /*@ts2dart_Provider*/ {provide: CompilerConfig, useValue: new CompilerConfig()}, - RuntimeCompiler, - /*@ts2dart_Provider*/ {provide: Compiler, useExisting: RuntimeCompiler}, - DomElementSchemaRegistry, - /*@ts2dart_Provider*/ {provide: ElementSchemaRegistry, useExisting: DomElementSchemaRegistry}, - UrlResolver, - DirectiveResolver, - PipeResolver, - NgModuleResolver - ]; +export const COMPILER_PROVIDERS: Array = [ + {provide: Reflector, useValue: reflector}, + {provide: ReflectorReader, useExisting: Reflector}, + {provide: XHR, useValue: _NO_XHR}, + Console, + Lexer, + Parser, + HtmlParser, + TemplateParser, + DirectiveNormalizer, + CompileMetadataResolver, + DEFAULT_PACKAGE_URL_PROVIDER, + StyleCompiler, + ViewCompiler, + NgModuleCompiler, + {provide: CompilerConfig, useValue: new CompilerConfig()}, + RuntimeCompiler, + {provide: Compiler, useExisting: RuntimeCompiler}, + DomElementSchemaRegistry, + {provide: ElementSchemaRegistry, useExisting: DomElementSchemaRegistry}, + UrlResolver, + DirectiveResolver, + PipeResolver, + NgModuleResolver +]; export function analyzeAppProvidersForDeprecatedConfiguration(appProviders: any[] = []): diff --git a/modules/@angular/compiler/src/output/output_ast.ts b/modules/@angular/compiler/src/output/output_ast.ts index 45a534caf3..0f87bf9765 100644 --- a/modules/@angular/compiler/src/output/output_ast.ts +++ b/modules/@angular/compiler/src/output/output_ast.ts @@ -567,7 +567,7 @@ export class ClassStmt extends Statement { export class IfStmt extends Statement { constructor( public condition: Expression, public trueCase: Statement[], - public falseCase: Statement[] = /*@ts2dart_const*/[]) { + public falseCase: Statement[] = []) { super(); } visitStatement(visitor: StatementVisitor, context: any): any { diff --git a/modules/@angular/compiler/src/schema/dom_element_schema_registry.ts b/modules/@angular/compiler/src/schema/dom_element_schema_registry.ts index 07e4d6e5be..99d3199a32 100644 --- a/modules/@angular/compiler/src/schema/dom_element_schema_registry.ts +++ b/modules/@angular/compiler/src/schema/dom_element_schema_registry.ts @@ -75,154 +75,153 @@ const OBJECT = 'object'; // // ================================================================================================= -const SCHEMA: string[] = - /*@ts2dart_const*/ ([ - '*|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop', - '^*|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*autocomplete,*autocompleteerror,*beforecopy,*beforecut,*beforepaste,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*message,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*paste,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*search,*seeked,*seeking,*select,*selectstart,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate', - 'media|!autoplay,!controls,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,#playbackRate,preload,src,#volume', - ':svg:^*|*abort,*autocomplete,*autocompleteerror,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex', - ':svg:graphics^:svg:|', - ':svg:animation^:svg:|*begin,*end,*repeat', - ':svg:geometry^:svg:|', - ':svg:componentTransferFunction^:svg:|', - ':svg:gradient^:svg:|', - ':svg:textContent^:svg:graphics|', - ':svg:textPositioning^:svg:textContent|', - 'a|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerpolicy,rel,rev,search,shape,target,text,type,username', - 'area|alt,coords,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerpolicy,search,shape,target,username', - 'audio^media|', - 'br|clear', - 'base|href,target', - 'body|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink', - 'button|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value', - 'canvas|#height,#width', - 'content|select', - 'dl|!compact', - 'datalist|', - 'details|!open', - 'dialog|!open,returnValue', - 'dir|!compact', - 'div|align', - 'embed|align,height,name,src,type,width', - 'fieldset|!disabled,name', - 'font|color,face,size', - 'form|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target', - 'frame|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src', - 'frameset|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows', - 'hr|align,color,!noShade,size,width', - 'head|', - 'h1,h2,h3,h4,h5,h6|align', - 'html|version', - 'iframe|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerpolicy,%sandbox,scrolling,src,srcdoc,width', - 'img|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerpolicy,sizes,src,srcset,useMap,#vspace,#width', - 'input|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width', - 'keygen|!autofocus,challenge,!disabled,keytype,name', - 'li|type,#value', - 'label|htmlFor', - 'legend|align', - 'link|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,rel,%relList,rev,%sizes,target,type', - 'map|name', - 'marquee|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width', - 'menu|!compact', - 'meta|content,httpEquiv,name,scheme', - 'meter|#high,#low,#max,#min,#optimum,#value', - 'ins,del|cite,dateTime', - 'ol|!compact,!reversed,#start,type', - 'object|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width', - 'optgroup|!disabled,label', - 'option|!defaultSelected,!disabled,label,!selected,text,value', - 'output|defaultValue,%htmlFor,name,value', - 'p|align', - 'param|name,type,value,valueType', - 'picture|', - 'pre|#width', - 'progress|#max,#value', - 'q,blockquote,cite|', - 'script|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type', - 'select|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value', - 'shadow|', - 'source|media,sizes,src,srcset,type', - 'span|', - 'style|!disabled,media,type', - 'caption|align', - 'th,td|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width', - 'col,colgroup|align,ch,chOff,#span,vAlign,width', - 'table|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width', - 'tr|align,bgColor,ch,chOff,vAlign', - 'tfoot,thead,tbody|align,ch,chOff,vAlign', - 'template|', - 'textarea|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap', - 'title|text', - 'track|!default,kind,label,src,srclang', - 'ul|!compact,type', - 'unknown|', - 'video^media|#height,poster,#width', - ':svg:a^:svg:graphics|', - ':svg:animate^:svg:animation|', - ':svg:animateMotion^:svg:animation|', - ':svg:animateTransform^:svg:animation|', - ':svg:circle^:svg:geometry|', - ':svg:clipPath^:svg:graphics|', - ':svg:cursor^:svg:|', - ':svg:defs^:svg:graphics|', - ':svg:desc^:svg:|', - ':svg:discard^:svg:|', - ':svg:ellipse^:svg:geometry|', - ':svg:feBlend^:svg:|', - ':svg:feColorMatrix^:svg:|', - ':svg:feComponentTransfer^:svg:|', - ':svg:feComposite^:svg:|', - ':svg:feConvolveMatrix^:svg:|', - ':svg:feDiffuseLighting^:svg:|', - ':svg:feDisplacementMap^:svg:|', - ':svg:feDistantLight^:svg:|', - ':svg:feDropShadow^:svg:|', - ':svg:feFlood^:svg:|', - ':svg:feFuncA^:svg:componentTransferFunction|', - ':svg:feFuncB^:svg:componentTransferFunction|', - ':svg:feFuncG^:svg:componentTransferFunction|', - ':svg:feFuncR^:svg:componentTransferFunction|', - ':svg:feGaussianBlur^:svg:|', - ':svg:feImage^:svg:|', - ':svg:feMerge^:svg:|', - ':svg:feMergeNode^:svg:|', - ':svg:feMorphology^:svg:|', - ':svg:feOffset^:svg:|', - ':svg:fePointLight^:svg:|', - ':svg:feSpecularLighting^:svg:|', - ':svg:feSpotLight^:svg:|', - ':svg:feTile^:svg:|', - ':svg:feTurbulence^:svg:|', - ':svg:filter^:svg:|', - ':svg:foreignObject^:svg:graphics|', - ':svg:g^:svg:graphics|', - ':svg:image^:svg:graphics|', - ':svg:line^:svg:geometry|', - ':svg:linearGradient^:svg:gradient|', - ':svg:mpath^:svg:|', - ':svg:marker^:svg:|', - ':svg:mask^:svg:|', - ':svg:metadata^:svg:|', - ':svg:path^:svg:geometry|', - ':svg:pattern^:svg:|', - ':svg:polygon^:svg:geometry|', - ':svg:polyline^:svg:geometry|', - ':svg:radialGradient^:svg:gradient|', - ':svg:rect^:svg:geometry|', - ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan', - ':svg:script^:svg:|type', - ':svg:set^:svg:animation|', - ':svg:stop^:svg:|', - ':svg:style^:svg:|!disabled,media,title,type', - ':svg:switch^:svg:graphics|', - ':svg:symbol^:svg:|', - ':svg:tspan^:svg:textPositioning|', - ':svg:text^:svg:textPositioning|', - ':svg:textPath^:svg:textContent|', - ':svg:title^:svg:|', - ':svg:use^:svg:graphics|', - ':svg:view^:svg:|#zoomAndPan', - ]); +const SCHEMA: string[] = ([ + '*|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop', + '^*|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*autocomplete,*autocompleteerror,*beforecopy,*beforecut,*beforepaste,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*message,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*paste,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*search,*seeked,*seeking,*select,*selectstart,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate', + 'media|!autoplay,!controls,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,#playbackRate,preload,src,#volume', + ':svg:^*|*abort,*autocomplete,*autocompleteerror,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex', + ':svg:graphics^:svg:|', + ':svg:animation^:svg:|*begin,*end,*repeat', + ':svg:geometry^:svg:|', + ':svg:componentTransferFunction^:svg:|', + ':svg:gradient^:svg:|', + ':svg:textContent^:svg:graphics|', + ':svg:textPositioning^:svg:textContent|', + 'a|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerpolicy,rel,rev,search,shape,target,text,type,username', + 'area|alt,coords,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerpolicy,search,shape,target,username', + 'audio^media|', + 'br|clear', + 'base|href,target', + 'body|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink', + 'button|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value', + 'canvas|#height,#width', + 'content|select', + 'dl|!compact', + 'datalist|', + 'details|!open', + 'dialog|!open,returnValue', + 'dir|!compact', + 'div|align', + 'embed|align,height,name,src,type,width', + 'fieldset|!disabled,name', + 'font|color,face,size', + 'form|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target', + 'frame|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src', + 'frameset|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows', + 'hr|align,color,!noShade,size,width', + 'head|', + 'h1,h2,h3,h4,h5,h6|align', + 'html|version', + 'iframe|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerpolicy,%sandbox,scrolling,src,srcdoc,width', + 'img|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerpolicy,sizes,src,srcset,useMap,#vspace,#width', + 'input|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width', + 'keygen|!autofocus,challenge,!disabled,keytype,name', + 'li|type,#value', + 'label|htmlFor', + 'legend|align', + 'link|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,rel,%relList,rev,%sizes,target,type', + 'map|name', + 'marquee|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width', + 'menu|!compact', + 'meta|content,httpEquiv,name,scheme', + 'meter|#high,#low,#max,#min,#optimum,#value', + 'ins,del|cite,dateTime', + 'ol|!compact,!reversed,#start,type', + 'object|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width', + 'optgroup|!disabled,label', + 'option|!defaultSelected,!disabled,label,!selected,text,value', + 'output|defaultValue,%htmlFor,name,value', + 'p|align', + 'param|name,type,value,valueType', + 'picture|', + 'pre|#width', + 'progress|#max,#value', + 'q,blockquote,cite|', + 'script|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type', + 'select|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value', + 'shadow|', + 'source|media,sizes,src,srcset,type', + 'span|', + 'style|!disabled,media,type', + 'caption|align', + 'th,td|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width', + 'col,colgroup|align,ch,chOff,#span,vAlign,width', + 'table|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width', + 'tr|align,bgColor,ch,chOff,vAlign', + 'tfoot,thead,tbody|align,ch,chOff,vAlign', + 'template|', + 'textarea|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap', + 'title|text', + 'track|!default,kind,label,src,srclang', + 'ul|!compact,type', + 'unknown|', + 'video^media|#height,poster,#width', + ':svg:a^:svg:graphics|', + ':svg:animate^:svg:animation|', + ':svg:animateMotion^:svg:animation|', + ':svg:animateTransform^:svg:animation|', + ':svg:circle^:svg:geometry|', + ':svg:clipPath^:svg:graphics|', + ':svg:cursor^:svg:|', + ':svg:defs^:svg:graphics|', + ':svg:desc^:svg:|', + ':svg:discard^:svg:|', + ':svg:ellipse^:svg:geometry|', + ':svg:feBlend^:svg:|', + ':svg:feColorMatrix^:svg:|', + ':svg:feComponentTransfer^:svg:|', + ':svg:feComposite^:svg:|', + ':svg:feConvolveMatrix^:svg:|', + ':svg:feDiffuseLighting^:svg:|', + ':svg:feDisplacementMap^:svg:|', + ':svg:feDistantLight^:svg:|', + ':svg:feDropShadow^:svg:|', + ':svg:feFlood^:svg:|', + ':svg:feFuncA^:svg:componentTransferFunction|', + ':svg:feFuncB^:svg:componentTransferFunction|', + ':svg:feFuncG^:svg:componentTransferFunction|', + ':svg:feFuncR^:svg:componentTransferFunction|', + ':svg:feGaussianBlur^:svg:|', + ':svg:feImage^:svg:|', + ':svg:feMerge^:svg:|', + ':svg:feMergeNode^:svg:|', + ':svg:feMorphology^:svg:|', + ':svg:feOffset^:svg:|', + ':svg:fePointLight^:svg:|', + ':svg:feSpecularLighting^:svg:|', + ':svg:feSpotLight^:svg:|', + ':svg:feTile^:svg:|', + ':svg:feTurbulence^:svg:|', + ':svg:filter^:svg:|', + ':svg:foreignObject^:svg:graphics|', + ':svg:g^:svg:graphics|', + ':svg:image^:svg:graphics|', + ':svg:line^:svg:geometry|', + ':svg:linearGradient^:svg:gradient|', + ':svg:mpath^:svg:|', + ':svg:marker^:svg:|', + ':svg:mask^:svg:|', + ':svg:metadata^:svg:|', + ':svg:path^:svg:geometry|', + ':svg:pattern^:svg:|', + ':svg:polygon^:svg:geometry|', + ':svg:polyline^:svg:geometry|', + ':svg:radialGradient^:svg:gradient|', + ':svg:rect^:svg:geometry|', + ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan', + ':svg:script^:svg:|type', + ':svg:set^:svg:animation|', + ':svg:stop^:svg:|', + ':svg:style^:svg:|!disabled,media,title,type', + ':svg:switch^:svg:graphics|', + ':svg:symbol^:svg:|', + ':svg:tspan^:svg:textPositioning|', + ':svg:text^:svg:textPositioning|', + ':svg:textPath^:svg:textContent|', + ':svg:title^:svg:|', + ':svg:use^:svg:graphics|', + ':svg:view^:svg:|#zoomAndPan', +]); var attrToPropMap: {[name: string]: string} = { 'class': 'className', diff --git a/modules/@angular/compiler/src/selector.ts b/modules/@angular/compiler/src/selector.ts index 22faf58ea0..c6924a5a93 100644 --- a/modules/@angular/compiler/src/selector.ts +++ b/modules/@angular/compiler/src/selector.ts @@ -10,7 +10,7 @@ import {ListWrapper} from './facade/collection'; import {BaseException} from './facade/exceptions'; import {RegExpMatcherWrapper, RegExpWrapper, StringWrapper, isBlank, isPresent} from './facade/lang'; -const _EMPTY_ATTR_VALUE = /*@ts2dart_const*/ ''; +const _EMPTY_ATTR_VALUE = ''; // TODO: Can't use `const` here as // in Dart this is not transpiled into `final` yet... diff --git a/modules/@angular/compiler/src/template_parser/template_parser.ts b/modules/@angular/compiler/src/template_parser/template_parser.ts index 8e4ed27b43..207184a8ac 100644 --- a/modules/@angular/compiler/src/template_parser/template_parser.ts +++ b/modules/@angular/compiler/src/template_parser/template_parser.ts @@ -63,7 +63,7 @@ const TEXT_CSS_SELECTOR = CssSelector.parse('*')[0]; * * This is currently an internal-only feature and not meant for general use. */ -export const TEMPLATE_TRANSFORMS: any = /*@ts2dart_const*/ new OpaqueToken('TemplateTransforms'); +export const TEMPLATE_TRANSFORMS: any = new OpaqueToken('TemplateTransforms'); export class TemplateParseError extends ParseError { constructor(message: string, span: ParseSourceSpan, level: ParseErrorLevel) { diff --git a/modules/@angular/compiler/test/test_component_builder_spec.ts b/modules/@angular/compiler/test/test_component_builder_spec.ts index 04bb0bd6a7..e0a417968d 100644 --- a/modules/@angular/compiler/test/test_component_builder_spec.ts +++ b/modules/@angular/compiler/test/test_component_builder_spec.ts @@ -163,7 +163,7 @@ class ListDir1Alt { class ListDir2 { } -const LIST_CHILDREN = /*@ts2dart_const*/[ListDir1, ListDir2]; +const LIST_CHILDREN = [ListDir1, ListDir2]; @Component({ selector: 'directive-list-comp', diff --git a/modules/@angular/core/src/application_tokens.ts b/modules/@angular/core/src/application_tokens.ts index 51f2d82e32..776d9ca508 100644 --- a/modules/@angular/core/src/application_tokens.ts +++ b/modules/@angular/core/src/application_tokens.ts @@ -21,7 +21,7 @@ import {OpaqueToken} from './di'; * using this token. * @experimental */ -export const APP_ID: any = /*@ts2dart_const*/ new OpaqueToken('AppId'); +export const APP_ID: any = new OpaqueToken('AppId'); export function _appIdRandomProviderFactory() { return `${_randomChar()}${_randomChar()}${_randomChar()}`; @@ -31,12 +31,11 @@ export function _appIdRandomProviderFactory() { * Providers that will generate a random APP_ID_TOKEN. * @experimental */ -export const APP_ID_RANDOM_PROVIDER = - /*@ts2dart_const*/ /* @ts2dart_Provider */ { - provide: APP_ID, - useFactory: _appIdRandomProviderFactory, - deps: [] - }; +export const APP_ID_RANDOM_PROVIDER = { + provide: APP_ID, + useFactory: _appIdRandomProviderFactory, + deps: [] +}; function _randomChar(): string { return StringWrapper.fromCharCode(97 + Math.floor(Math.random() * 25)); @@ -46,19 +45,16 @@ function _randomChar(): string { * A function that will be executed when a platform is initialized. * @experimental */ -export const PLATFORM_INITIALIZER: any = - /*@ts2dart_const*/ new OpaqueToken('Platform Initializer'); +export const PLATFORM_INITIALIZER: any = new OpaqueToken('Platform Initializer'); /** * A function that will be executed when an application is initialized. * @experimental */ -export const APP_INITIALIZER: any = - /*@ts2dart_const*/ new OpaqueToken('Application Initializer'); +export const APP_INITIALIZER: any = new OpaqueToken('Application Initializer'); /** * A token which indicates the root directory of the application * @experimental */ -export const PACKAGE_ROOT_URL: any = - /*@ts2dart_const*/ new OpaqueToken('Application Packages Root URL'); +export const PACKAGE_ROOT_URL: any = new OpaqueToken('Application Packages Root URL'); diff --git a/modules/@angular/core/src/change_detection/change_detection.ts b/modules/@angular/core/src/change_detection/change_detection.ts index 6e7a64de0e..56f8a26571 100644 --- a/modules/@angular/core/src/change_detection/change_detection.ts +++ b/modules/@angular/core/src/change_detection/change_detection.ts @@ -27,15 +27,13 @@ export {PipeTransform} from './pipe_transform'; /** * Structural diffing for `Object`s and `Map`s. */ -export const keyValDiff: KeyValueDifferFactory[] = - /*@ts2dart_const*/[new DefaultKeyValueDifferFactory()]; +export const keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()]; /** * Structural diffing for `Iterable` types such as `Array`s. */ -export const iterableDiff: IterableDifferFactory[] = - /*@ts2dart_const*/[new DefaultIterableDifferFactory()]; +export const iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()]; -export const defaultIterableDiffers = /*@ts2dart_const*/ new IterableDiffers(iterableDiff); +export const defaultIterableDiffers = new IterableDiffers(iterableDiff); -export const defaultKeyValueDiffers = /*@ts2dart_const*/ new KeyValueDiffers(keyValDiff); +export const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff); diff --git a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts index 945c2d3456..1bec7d125a 100644 --- a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts +++ b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts @@ -14,7 +14,6 @@ import {ChangeDetectorRef} from '../change_detector_ref'; import {IterableDiffer, IterableDifferFactory, TrackByFn} from './iterable_differs'; -/* @ts2dart_const */ export class DefaultIterableDifferFactory implements IterableDifferFactory { constructor() {} supports(obj: Object): boolean { return isListLikeIterable(obj); } diff --git a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts index e17b87a55d..106152a078 100644 --- a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts @@ -45,11 +45,9 @@ export interface IterableDifferFactory { /** * A repository of different iterable diffing strategies used by NgFor, NgClass, and others. - * @ts2dart_const * @stable */ export class IterableDiffers { - /*@ts2dart_const*/ constructor(public factories: IterableDifferFactory[]) {} static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers { diff --git a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts index 17a414296c..f5bb58640f 100644 --- a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts @@ -35,11 +35,9 @@ export interface KeyValueDifferFactory { /** * A repository of different Map diffing strategies used by NgClass, NgStyle, and others. - * @ts2dart_const * @stable */ export class KeyValueDiffers { - /*@ts2dart_const*/ constructor(public factories: KeyValueDifferFactory[]) {} static create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers { diff --git a/modules/@angular/core/src/di/injector.ts b/modules/@angular/core/src/di/injector.ts index df56e4c7b8..a5454857a2 100644 --- a/modules/@angular/core/src/di/injector.ts +++ b/modules/@angular/core/src/di/injector.ts @@ -9,8 +9,8 @@ import {BaseException, unimplemented} from '../facade/exceptions'; import {stringify} from '../facade/lang'; -const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object(); -export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND; +const _THROW_IF_NOT_FOUND = new Object(); +export const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; class _NullInjector implements Injector { get(token: any, notFoundValue: any = _THROW_IF_NOT_FOUND): any { diff --git a/modules/@angular/core/src/di/metadata.ts b/modules/@angular/core/src/di/metadata.ts index ced5720557..ee727aa181 100644 --- a/modules/@angular/core/src/di/metadata.ts +++ b/modules/@angular/core/src/di/metadata.ts @@ -47,7 +47,6 @@ import {stringify} from '../facade/lang'; * var injector = Injector.resolveAndCreate([Engine, Car]); * expect(injector.get(Car).engine instanceof Engine).toBe(true); * ``` - * @ts2dart_const * @stable */ export class InjectMetadata { @@ -75,7 +74,6 @@ export class InjectMetadata { * var injector = Injector.resolveAndCreate([Car]); * expect(injector.get(Car).engine).toBeNull(); * ``` - * @ts2dart_const * @stable */ export class OptionalMetadata { @@ -85,7 +83,6 @@ export class OptionalMetadata { /** * `DependencyMetadata` is used by the framework to extend DI. * This is internal to Angular and should not be used directly. - * @ts2dart_const * @stable */ export class DependencyMetadata { @@ -122,7 +119,6 @@ export class DependencyMetadata { * var injector = Injector.resolveAndCreate([NeedsService, UsefulService]); * expect(() => injector.get(NeedsService)).toThrowError(); * ``` - * @ts2dart_const * @stable */ export class InjectableMetadata { @@ -155,7 +151,6 @@ export class InjectableMetadata { * var child = inj.resolveAndCreateChild([NeedsDependency]); * expect(() => child.get(NeedsDependency)).toThrowError(); * ``` - * @ts2dart_const * @stable */ export class SelfMetadata { @@ -186,7 +181,6 @@ export class SelfMetadata { * var inj = Injector.resolveAndCreate([Dependency, NeedsDependency]); * expect(() => inj.get(NeedsDependency)).toThrowError(); * ``` - * @ts2dart_const * @stable */ export class SkipSelfMetadata { @@ -246,7 +240,6 @@ export class SkipSelfMetadata { * * bootstrap(App); *``` - * @ts2dart_const * @stable */ export class HostMetadata { diff --git a/modules/@angular/core/src/di/opaque_token.ts b/modules/@angular/core/src/di/opaque_token.ts index b049b58834..40ef480138 100644 --- a/modules/@angular/core/src/di/opaque_token.ts +++ b/modules/@angular/core/src/di/opaque_token.ts @@ -26,7 +26,6 @@ * * Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better * error messages. - * @ts2dart_const * @stable */ export class OpaqueToken { diff --git a/modules/@angular/core/src/di/provider.ts b/modules/@angular/core/src/di/provider.ts index ab44021431..5f205b0bfb 100644 --- a/modules/@angular/core/src/di/provider.ts +++ b/modules/@angular/core/src/di/provider.ts @@ -24,7 +24,6 @@ import {Type, isBlank, isFunction, isType, normalizeBool, stringify} from '../fa * * expect(injector.get("message")).toEqual('Hello'); * ``` - * @ts2dart_const * @deprecated */ export class Provider { @@ -211,7 +210,6 @@ export class Provider { * See {@link Provider} instead. * * @deprecated - * @ts2dart_const */ export class Binding extends Provider { constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: { diff --git a/modules/@angular/core/src/di/reflective_injector.ts b/modules/@angular/core/src/di/reflective_injector.ts index 1a5a353623..77cf75855d 100644 --- a/modules/@angular/core/src/di/reflective_injector.ts +++ b/modules/@angular/core/src/di/reflective_injector.ts @@ -21,7 +21,7 @@ var __unused: Type; // avoid unused import when Type union types are erased // Threshold for the dynamic version const _MAX_CONSTRUCTION_COUNTER = 10; -const UNDEFINED = /*@ts2dart_const*/ new Object(); +const UNDEFINED = new Object(); export interface ReflectiveProtoInjectorStrategy { getProviderAtIndex(index: number): ResolvedReflectiveProvider; @@ -629,7 +629,7 @@ export class ReflectiveInjector_ implements ReflectiveInjector { */ debugContext(): any { return this._debugContext(); } - get(token: any, notFoundValue: any = /*@ts2dart_const*/ THROW_IF_NOT_FOUND): any { + get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any { return this._getByKey(ReflectiveKey.get(token), null, null, notFoundValue); } diff --git a/modules/@angular/core/src/di/reflective_provider.ts b/modules/@angular/core/src/di/reflective_provider.ts index a2a5f304f4..0bef6e6c57 100644 --- a/modules/@angular/core/src/di/reflective_provider.ts +++ b/modules/@angular/core/src/di/reflective_provider.ts @@ -30,7 +30,7 @@ export class ReflectiveDependency { } } -const _EMPTY_LIST: any[] = /*@ts2dart_const*/[]; +const _EMPTY_LIST: any[] = []; /** * An internal resolved representation of a {@link Provider} used by the {@link Injector}. diff --git a/modules/@angular/core/src/linker/component_factory.ts b/modules/@angular/core/src/linker/component_factory.ts index fc7647151d..9115e39410 100644 --- a/modules/@angular/core/src/linker/component_factory.ts +++ b/modules/@angular/core/src/linker/component_factory.ts @@ -81,7 +81,6 @@ export class ComponentRef_ extends ComponentRef { /** * @experimental - * @ts2dart_const */ const EMPTY_CONTEXT = new Object(); diff --git a/modules/@angular/core/src/linker/debug_context.ts b/modules/@angular/core/src/linker/debug_context.ts index ee229c9a6e..a196488028 100644 --- a/modules/@angular/core/src/linker/debug_context.ts +++ b/modules/@angular/core/src/linker/debug_context.ts @@ -15,7 +15,6 @@ import {DebugAppView} from './view'; import {ViewType} from './view_type'; -/* @ts2dart_const */ export class StaticNodeDebugInfo { constructor( public providerTokens: any[], public componentToken: any, diff --git a/modules/@angular/core/src/linker/element_injector.ts b/modules/@angular/core/src/linker/element_injector.ts index 7741a3c456..a736e9409b 100644 --- a/modules/@angular/core/src/linker/element_injector.ts +++ b/modules/@angular/core/src/linker/element_injector.ts @@ -9,7 +9,7 @@ import {Injector, THROW_IF_NOT_FOUND} from '../di/injector'; import {AppView} from './view'; -const _UNDEFINED = /*@ts2dart_const*/ new Object(); +const _UNDEFINED = new Object(); export class ElementInjector extends Injector { constructor(private _view: AppView, private _nodeIndex: number) { super(); } diff --git a/modules/@angular/core/src/linker/template_ref.ts b/modules/@angular/core/src/linker/template_ref.ts index f93bb07189..7d5bb7d0a8 100644 --- a/modules/@angular/core/src/linker/template_ref.ts +++ b/modules/@angular/core/src/linker/template_ref.ts @@ -12,7 +12,7 @@ import {ElementRef} from './element_ref'; import {AppView} from './view'; import {EmbeddedViewRef} from './view_ref'; -const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); +const EMPTY_CONTEXT = new Object(); /** * Represents an Embedded Template that can be used to instantiate Embedded Views. diff --git a/modules/@angular/core/src/linker/view_utils.ts b/modules/@angular/core/src/linker/view_utils.ts index f7bbd07a35..b7ff12e116 100644 --- a/modules/@angular/core/src/linker/view_utils.ts +++ b/modules/@angular/core/src/linker/view_utils.ts @@ -70,7 +70,7 @@ function _flattenNestedViewRenderNodes(nodes: any[], renderNodes: any[]): any[] return renderNodes; } -const EMPTY_ARR: any[] = /*@ts2dart_const*/[]; +const EMPTY_ARR: any[] = []; export function ensureSlotCount(projectableNodes: any[][], expectedSlotCount: number): any[][] { var res: any[][]; diff --git a/modules/@angular/core/src/metadata/di.ts b/modules/@angular/core/src/metadata/di.ts index bed7eb97cc..36107e1a86 100644 --- a/modules/@angular/core/src/metadata/di.ts +++ b/modules/@angular/core/src/metadata/di.ts @@ -63,7 +63,6 @@ export const ANALYZE_FOR_ENTRY_COMPONENTS = new OpaqueToken('AnalyzeForEntryComp * A decorator can inject string literal `text` like so: * * {@example core/ts/metadata/metadata.ts region='attributeMetadata'} - * @ts2dart_const * @stable */ export class AttributeMetadata extends DependencyMetadata { @@ -186,7 +185,6 @@ export class AttributeMetadata extends DependencyMetadata { * * The injected object is an unmodifiable live list. * See {@link QueryList} for more details. - * @ts2dart_const * @deprecated */ export class QueryMetadata extends DependencyMetadata { @@ -256,7 +254,6 @@ export class QueryMetadata extends DependencyMetadata { * } * } * ``` - * @ts2dart_const * @stable */ export class ContentChildrenMetadata extends QueryMetadata { @@ -287,7 +284,6 @@ export class ContentChildrenMetadata extends QueryMetadata { * } * } * ``` - * @ts2dart_const * @stable */ export class ContentChildMetadata extends QueryMetadata { @@ -330,7 +326,6 @@ export class ContentChildMetadata extends QueryMetadata { * * The injected object is an iterable and observable live list. * See {@link QueryList} for more details. - * @ts2dart_const * @deprecated */ export class ViewQueryMetadata extends QueryMetadata { @@ -423,7 +418,6 @@ export class ViewQueryMetadata extends QueryMetadata { * } * } * ``` - * @ts2dart_const * @stable */ export class ViewChildrenMetadata extends ViewQueryMetadata { @@ -501,7 +495,6 @@ export class ViewChildrenMetadata extends ViewQueryMetadata { * } * } * ``` - * @ts2dart_const * @stable */ export class ViewChildMetadata extends ViewQueryMetadata { diff --git a/modules/@angular/core/src/metadata/directives.ts b/modules/@angular/core/src/metadata/directives.ts index 673ef3e67c..aa21fdc7d8 100644 --- a/modules/@angular/core/src/metadata/directives.ts +++ b/modules/@angular/core/src/metadata/directives.ts @@ -408,7 +408,6 @@ export interface DirectiveMetadataType { * Note also that although the `
  • ` template still exists inside the ``, * the instantiated * view occurs on the second `
  • ` which is a sibling to the `