chore: audit @angular/core API classification (#8808)
This commit is contained in:
		
							parent
							
								
									5e0f8cf3f0
								
							
						
					
					
						commit
						39ecd01b86
					
				| @ -58,7 +58,8 @@ export var pureProxy10: typeof t.pureProxy10 = r.pureProxy10; | |||||||
| export var castByValue: typeof t.castByValue = r.castByValue; | export var castByValue: typeof t.castByValue = r.castByValue; | ||||||
| export type Console = t.Console; | export type Console = t.Console; | ||||||
| export var Console: typeof t.Console = r.Console; | export var Console: typeof t.Console = r.Console; | ||||||
| 
 | export var reflector: t.Reflector = r.reflector; | ||||||
|  | export type Reflector = t.Reflector; | ||||||
| export type NoOpAnimationPlayer = t.NoOpAnimationPlayer; | export type NoOpAnimationPlayer = t.NoOpAnimationPlayer; | ||||||
| export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer; | export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer; | ||||||
| export type AnimationPlayer = t.AnimationPlayer; | export type AnimationPlayer = t.AnimationPlayer; | ||||||
|  | |||||||
| @ -1,4 +1,5 @@ | |||||||
| import {ChangeDetectionStrategy, ViewEncapsulation, reflector} from '@angular/core'; | import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; | ||||||
|  | import {reflector} from '../core_private'; | ||||||
| import { | import { | ||||||
|   CHANGE_DETECTION_STRATEGY_VALUES, |   CHANGE_DETECTION_STRATEGY_VALUES, | ||||||
|   VIEW_ENCAPSULATION_VALUES, |   VIEW_ENCAPSULATION_VALUES, | ||||||
|  | |||||||
| @ -7,9 +7,8 @@ import { | |||||||
|   AfterContentChecked, |   AfterContentChecked, | ||||||
|   AfterViewInit, |   AfterViewInit, | ||||||
|   AfterViewChecked, |   AfterViewChecked, | ||||||
|   reflector |  | ||||||
| } from '@angular/core'; | } from '@angular/core'; | ||||||
| import {LifecycleHooks} from '../core_private'; | import {reflector, LifecycleHooks} from '../core_private'; | ||||||
| 
 | 
 | ||||||
| import {Type} from '../src/facade/lang'; | import {Type} from '../src/facade/lang'; | ||||||
| import {MapWrapper} from '../src/facade/collection'; | import {MapWrapper} from '../src/facade/collection'; | ||||||
|  | |||||||
| @ -11,9 +11,8 @@ import { | |||||||
|   ViewChildrenMetadata, |   ViewChildrenMetadata, | ||||||
|   ContentChildMetadata, |   ContentChildMetadata, | ||||||
|   ViewChildMetadata, |   ViewChildMetadata, | ||||||
|   reflector |  | ||||||
| } from '@angular/core'; | } from '@angular/core'; | ||||||
| import {ReflectorReader} from '../core_private'; | import {ReflectorReader, reflector} from '../core_private'; | ||||||
| 
 | 
 | ||||||
| import {Type, isPresent, stringify} from '../src/facade/lang'; | import {Type, isPresent, stringify} from '../src/facade/lang'; | ||||||
| import {BaseException} from '../src/facade/exceptions'; | import {BaseException} from '../src/facade/exceptions'; | ||||||
|  | |||||||
| @ -1,6 +1,5 @@ | |||||||
| import { | import { | ||||||
|   AttributeMetadata, |   AttributeMetadata, | ||||||
|   ReflectiveDependency, |  | ||||||
|   OptionalMetadata, |   OptionalMetadata, | ||||||
|   ComponentMetadata, |   ComponentMetadata, | ||||||
|   SelfMetadata, |   SelfMetadata, | ||||||
| @ -9,18 +8,16 @@ import { | |||||||
|   Provider, |   Provider, | ||||||
|   PLATFORM_DIRECTIVES, |   PLATFORM_DIRECTIVES, | ||||||
|   PLATFORM_PIPES, |   PLATFORM_PIPES, | ||||||
|   reflector, |  | ||||||
|   Injectable, |   Injectable, | ||||||
|   Inject, |   Inject, | ||||||
|   Optional, |   Optional, | ||||||
|   ViewMetadata, |   ViewMetadata, | ||||||
|   NoAnnotationError, |  | ||||||
|   QueryMetadata, |   QueryMetadata, | ||||||
|   resolveForwardRef, |   resolveForwardRef, | ||||||
|   InjectMetadata, |   InjectMetadata, | ||||||
|   ViewQueryMetadata |   ViewQueryMetadata | ||||||
| } from '@angular/core'; | } from '@angular/core'; | ||||||
| import {constructDependencies, LIFECYCLE_HOOKS_VALUES, ReflectorReader} from '../core_private'; | import {LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector} from '../core_private'; | ||||||
| import { | import { | ||||||
|   Type, |   Type, | ||||||
|   isBlank, |   isBlank, | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| import {reflector} from '@angular/core'; | import {reflector} from '../../core_private'; | ||||||
| import {isPresent, IS_DART, FunctionWrapper} from '../../src/facade/lang'; | import {isPresent, IS_DART, FunctionWrapper} from '../../src/facade/lang'; | ||||||
| import {ObservableWrapper} from '../../src/facade/async'; | import {ObservableWrapper} from '../../src/facade/async'; | ||||||
| import {BaseException, unimplemented} from '../../src/facade/exceptions'; | import {BaseException, unimplemented} from '../../src/facade/exceptions'; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import {resolveForwardRef, Injectable, PipeMetadata, reflector} from '@angular/core'; | import {resolveForwardRef, Injectable, PipeMetadata} from '@angular/core'; | ||||||
| 
 | 
 | ||||||
| import {ReflectorReader} from '../core_private'; | import {ReflectorReader, reflector} from '../core_private'; | ||||||
| 
 | 
 | ||||||
| import {Type, isPresent, stringify} from '../src/facade/lang'; | import {Type, isPresent, stringify} from '../src/facade/lang'; | ||||||
| import {BaseException} from '../src/facade/exceptions'; | import {BaseException} from '../src/facade/exceptions'; | ||||||
|  | |||||||
| @ -2,10 +2,9 @@ import { | |||||||
|   Injectable, |   Injectable, | ||||||
|   ViewMetadata, |   ViewMetadata, | ||||||
|   ComponentMetadata, |   ComponentMetadata, | ||||||
|   reflector, |  | ||||||
| } from '@angular/core'; | } from '@angular/core'; | ||||||
| 
 | 
 | ||||||
| import {ReflectorReader} from '../core_private'; | import {ReflectorReader, reflector} from '../core_private'; | ||||||
| 
 | 
 | ||||||
| import {Type, stringify, isBlank, isPresent} from '../src/facade/lang'; | import {Type, stringify, isBlank, isPresent} from '../src/facade/lang'; | ||||||
| import {BaseException} from '../src/facade/exceptions'; | import {BaseException} from '../src/facade/exceptions'; | ||||||
|  | |||||||
| @ -5,3 +5,5 @@ export var ReflectorReader: typeof t.ReflectorReader = r.ReflectorReader; | |||||||
| 
 | 
 | ||||||
| export type ReflectionCapabilities = t.ReflectionCapabilities; | export type ReflectionCapabilities = t.ReflectionCapabilities; | ||||||
| export var ReflectionCapabilities: typeof t.ReflectionCapabilities = r.ReflectionCapabilities; | export var ReflectionCapabilities: typeof t.ReflectionCapabilities = r.ReflectionCapabilities; | ||||||
|  | 
 | ||||||
|  | export var reflector: typeof t.reflector = r.reflector; | ||||||
|  | |||||||
| @ -1,5 +1,4 @@ | |||||||
| import {reflector} from '@angular/core'; | import {ReflectionCapabilities, reflector} from './core_private'; | ||||||
| import {ReflectionCapabilities} from './core_private'; |  | ||||||
| import {StaticReflector} from './static_reflector'; | import {StaticReflector} from './static_reflector'; | ||||||
| 
 | 
 | ||||||
| export class StaticAndDynamicReflectionCapabilities { | export class StaticAndDynamicReflectionCapabilities { | ||||||
|  | |||||||
| @ -32,7 +32,6 @@ export * from './src/change_detection'; | |||||||
| export * from './src/platform_directives_and_pipes'; | export * from './src/platform_directives_and_pipes'; | ||||||
| export * from './src/platform_common_providers'; | export * from './src/platform_common_providers'; | ||||||
| export * from './src/application_common_providers'; | export * from './src/application_common_providers'; | ||||||
| export * from './src/reflection/reflection'; |  | ||||||
| export { | export { | ||||||
|   wtfCreateScope, |   wtfCreateScope, | ||||||
|   wtfLeave, |   wtfLeave, | ||||||
|  | |||||||
| @ -20,6 +20,8 @@ import * as debug from './src/debug/debug_renderer'; | |||||||
| import * as provider_util from './src/di/provider_util'; | import * as provider_util from './src/di/provider_util'; | ||||||
| import * as console from './src/console'; | import * as console from './src/console'; | ||||||
| import {Provider} from './index'; | import {Provider} from './index'; | ||||||
|  | import * as reflection from './src/reflection/reflection'; | ||||||
|  | import {Reflector} from './src/reflection/reflection'; | ||||||
| 
 | 
 | ||||||
| import { | import { | ||||||
|   NoOpAnimationPlayer as NoOpAnimationPlayer_, |   NoOpAnimationPlayer as NoOpAnimationPlayer_, | ||||||
| @ -103,6 +105,9 @@ export declare namespace __core_private_types__ { | |||||||
|   export var castByValue: typeof view_utils.castByValue; |   export var castByValue: typeof view_utils.castByValue; | ||||||
|   export type Console = console.Console; |   export type Console = console.Console; | ||||||
|   export var Console: typeof console.Console; |   export var Console: typeof console.Console; | ||||||
|  |   export var reflector: typeof reflection.reflector; | ||||||
|  |   export type Reflector = reflection.Reflector; | ||||||
|  |   export var Reflector: typeof reflection.Reflector; | ||||||
|   export type NoOpAnimationPlayer = NoOpAnimationPlayer_; |   export type NoOpAnimationPlayer = NoOpAnimationPlayer_; | ||||||
|   export var NoOpAnimationPlayer: typeof NoOpAnimationPlayer_; |   export var NoOpAnimationPlayer: typeof NoOpAnimationPlayer_; | ||||||
|   export type AnimationPlayer = AnimationPlayer_; |   export type AnimationPlayer = AnimationPlayer_; | ||||||
| @ -178,6 +183,8 @@ export var __core_private__ = { | |||||||
|   pureProxy10: view_utils.pureProxy10, |   pureProxy10: view_utils.pureProxy10, | ||||||
|   castByValue: view_utils.castByValue, |   castByValue: view_utils.castByValue, | ||||||
|   Console: console.Console, |   Console: console.Console, | ||||||
|  |   reflector: reflection.reflector, | ||||||
|  |   Reflector: reflection.Reflector, | ||||||
|   NoOpAnimationPlayer: NoOpAnimationPlayer_, |   NoOpAnimationPlayer: NoOpAnimationPlayer_, | ||||||
|   AnimationPlayer: AnimationPlayer_, |   AnimationPlayer: AnimationPlayer_, | ||||||
|   NoOpAnimationDriver: NoOpAnimationDriver_, |   NoOpAnimationDriver: NoOpAnimationDriver_, | ||||||
|  | |||||||
| @ -16,6 +16,7 @@ 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. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export const APPLICATION_COMMON_PROVIDERS: Array<Type | {[k: string]: any} | any[]> = | export const APPLICATION_COMMON_PROVIDERS: Array<Type | {[k: string]: any} | any[]> = | ||||||
|     /*@ts2dart_const*/[ |     /*@ts2dart_const*/[ | ||||||
|  | |||||||
| @ -14,6 +14,7 @@ import {ChangeDetectorRef} from './change_detection/change_detector_ref'; | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Create an Angular zone. |  * Create an Angular zone. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function createNgZone(): NgZone { | export function createNgZone(): NgZone { | ||||||
|   return new NgZone({enableLongStackTrace: assertionsEnabled()}); |   return new NgZone({enableLongStackTrace: assertionsEnabled()}); | ||||||
| @ -25,6 +26,7 @@ var _inPlatformCreate: boolean = false; | |||||||
| /** | /** | ||||||
|  * Creates a platform. |  * Creates a platform. | ||||||
|  * Platforms have to be eagerly created via this function. |  * Platforms have to be eagerly created via this function. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function createPlatform(injector: Injector): PlatformRef { | export function createPlatform(injector: Injector): PlatformRef { | ||||||
|   if (_inPlatformCreate) { |   if (_inPlatformCreate) { | ||||||
| @ -47,6 +49,7 @@ export function createPlatform(injector: Injector): PlatformRef { | |||||||
| /** | /** | ||||||
|  * Checks that there currently is a platform |  * Checks that there currently is a platform | ||||||
|  * which contains the given token as a provider. |  * which contains the given token as a provider. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function assertPlatform(requiredToken: any): PlatformRef { | export function assertPlatform(requiredToken: any): PlatformRef { | ||||||
|   var platform = getPlatform(); |   var platform = getPlatform(); | ||||||
| @ -62,6 +65,7 @@ export function assertPlatform(requiredToken: any): PlatformRef { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Dispose the existing platform. |  * Dispose the existing platform. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function disposePlatform(): void { | export function disposePlatform(): void { | ||||||
|   if (isPresent(_platform) && !_platform.disposed) { |   if (isPresent(_platform) && !_platform.disposed) { | ||||||
| @ -71,6 +75,7 @@ export function disposePlatform(): void { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Returns the current platform. |  * Returns the current platform. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function getPlatform(): PlatformRef { | export function getPlatform(): PlatformRef { | ||||||
|   return isPresent(_platform) && !_platform.disposed ? _platform : null; |   return isPresent(_platform) && !_platform.disposed ? _platform : null; | ||||||
| @ -79,6 +84,7 @@ export function getPlatform(): PlatformRef { | |||||||
| /** | /** | ||||||
|  * Shortcut for ApplicationRef.bootstrap. |  * Shortcut for ApplicationRef.bootstrap. | ||||||
|  * Requires a platform to be created first. |  * Requires a platform to be created first. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function coreBootstrap<C>(componentFactory: ComponentFactory<C>, | export function coreBootstrap<C>(componentFactory: ComponentFactory<C>, | ||||||
|                                  injector: Injector): ComponentRef<C> { |                                  injector: Injector): ComponentRef<C> { | ||||||
| @ -90,6 +96,7 @@ export function coreBootstrap<C>(componentFactory: ComponentFactory<C>, | |||||||
|  * Resolves the componentFactory for the given component, |  * Resolves the componentFactory for the given component, | ||||||
|  * waits for asynchronous initializers and bootstraps the component. |  * waits for asynchronous initializers and bootstraps the component. | ||||||
|  * Requires a platform to be created first. |  * Requires a platform to be created first. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function coreLoadAndBootstrap(componentType: Type, | export function coreLoadAndBootstrap(componentType: Type, | ||||||
|                                      injector: Injector): Promise<ComponentRef<any>> { |                                      injector: Injector): Promise<ComponentRef<any>> { | ||||||
| @ -109,6 +116,7 @@ export function coreLoadAndBootstrap(componentType: Type, | |||||||
|  * |  * | ||||||
|  * A page's platform is initialized implicitly when {@link bootstrap}() is called, or |  * A page's platform is initialized implicitly when {@link bootstrap}() is called, or | ||||||
|  * explicitly by calling {@link createPlatform}(). |  * explicitly by calling {@link createPlatform}(). | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class PlatformRef { | export abstract class PlatformRef { | ||||||
|   /** |   /** | ||||||
| @ -170,6 +178,7 @@ export class PlatformRef_ extends PlatformRef { | |||||||
|  * A reference to an Angular application running on a page. |  * A reference to an Angular application running on a page. | ||||||
|  * |  * | ||||||
|  * For more about Angular applications, see the documentation for {@link bootstrap}. |  * For more about Angular applications, see the documentation for {@link bootstrap}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class ApplicationRef { | export abstract class ApplicationRef { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -9,6 +9,7 @@ import {Math, StringWrapper} from '../src/facade/lang'; | |||||||
|  * If you need to avoid randomly generated value to be used as an application id, you can provide |  * If you need to avoid randomly generated value to be used as an application id, you can provide | ||||||
|  * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector} |  * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector} | ||||||
|  * using this token. |  * using this token. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const APP_ID: any = /*@ts2dart_const*/ new OpaqueToken('AppId'); | export const APP_ID: any = /*@ts2dart_const*/ new OpaqueToken('AppId'); | ||||||
| 
 | 
 | ||||||
| @ -18,6 +19,7 @@ function _appIdRandomProviderFactory() { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Providers that will generate a random APP_ID_TOKEN. |  * Providers that will generate a random APP_ID_TOKEN. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const APP_ID_RANDOM_PROVIDER = | export const APP_ID_RANDOM_PROVIDER = | ||||||
|     /*@ts2dart_const*/ /* @ts2dart_Provider */ { |     /*@ts2dart_const*/ /* @ts2dart_Provider */ { | ||||||
| @ -32,18 +34,21 @@ function _randomChar(): string { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * A function that will be executed when a platform is initialized. |  * A function that will be executed when a platform is initialized. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const PLATFORM_INITIALIZER: any = | export const PLATFORM_INITIALIZER: any = | ||||||
|     /*@ts2dart_const*/ new OpaqueToken("Platform Initializer"); |     /*@ts2dart_const*/ new OpaqueToken("Platform Initializer"); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * A function that will be executed when an application is initialized. |  * A function that will be executed when an application is initialized. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const APP_INITIALIZER: any = | export const APP_INITIALIZER: any = | ||||||
|     /*@ts2dart_const*/ new OpaqueToken("Application Initializer"); |     /*@ts2dart_const*/ new OpaqueToken("Application Initializer"); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * A token which indicates the root directory of the application |  * A token which indicates the root directory of the application | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const PACKAGE_ROOT_URL: any = | export const PACKAGE_ROOT_URL: any = | ||||||
|     /*@ts2dart_const*/ new OpaqueToken("Application Packages Root URL"); |     /*@ts2dart_const*/ new OpaqueToken("Application Packages Root URL"); | ||||||
|  | |||||||
| @ -34,6 +34,7 @@ export function devModeEqual(a: any, b: any): boolean { | |||||||
|  *    return WrappedValue.wrap(this._latestValue); // this will force update
 |  *    return WrappedValue.wrap(this._latestValue); // this will force update
 | ||||||
|  *  } |  *  } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class WrappedValue { | export class WrappedValue { | ||||||
|   constructor(public wrapped: any) {} |   constructor(public wrapped: any) {} | ||||||
| @ -60,6 +61,7 @@ export class ValueUnwrapper { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Represents a basic change from a previous to a new value. |  * Represents a basic change from a previous to a new value. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class SimpleChange { | export class SimpleChange { | ||||||
|   constructor(public previousValue: any, public currentValue: any) {} |   constructor(public previousValue: any, public currentValue: any) {} | ||||||
|  | |||||||
| @ -1,3 +1,6 @@ | |||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export abstract class ChangeDetectorRef { | export abstract class ChangeDetectorRef { | ||||||
|   /** |   /** | ||||||
|    * Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked. |    * Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked. | ||||||
|  | |||||||
| @ -28,6 +28,7 @@ export enum ChangeDetectorState { | |||||||
| /** | /** | ||||||
|  * Describes within the change detector which strategy will be used the next time change |  * Describes within the change detector which strategy will be used the next time change | ||||||
|  * detection is triggered. |  * detection is triggered. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export enum ChangeDetectionStrategy { | export enum ChangeDetectionStrategy { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -24,6 +24,9 @@ export class DefaultIterableDifferFactory implements IterableDifferFactory { | |||||||
| 
 | 
 | ||||||
| var trackByIdentity = (index: number, item: any) => item; | var trackByIdentity = (index: number, item: any) => item; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export class DefaultIterableDiffer implements IterableDiffer { | export class DefaultIterableDiffer implements IterableDiffer { | ||||||
|   private _length: number = null; |   private _length: number = null; | ||||||
|   private _collection = null; |   private _collection = null; | ||||||
| @ -532,6 +535,9 @@ export class DefaultIterableDiffer implements IterableDiffer { | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export class CollectionChangeRecord { | export class CollectionChangeRecord { | ||||||
|   currentIndex: number = null; |   currentIndex: number = null; | ||||||
|   previousIndex: number = null; |   previousIndex: number = null; | ||||||
|  | |||||||
| @ -335,6 +335,9 @@ export class DefaultKeyValueDiffer implements KeyValueDiffer { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export class KeyValueChangeRecord { | export class KeyValueChangeRecord { | ||||||
|   previousValue: any = null; |   previousValue: any = null; | ||||||
|   currentValue: any = null; |   currentValue: any = null; | ||||||
|  | |||||||
| @ -7,6 +7,8 @@ import {Provider, SkipSelfMetadata, OptionalMetadata} from '../../di'; | |||||||
| /** | /** | ||||||
|  * A strategy for tracking changes over time to an iterable. Used for {@link NgFor} to |  * A strategy for tracking changes over time to an iterable. Used for {@link NgFor} to | ||||||
|  * respond to changes in an iterable by effecting equivalent changes in the DOM. |  * respond to changes in an iterable by effecting equivalent changes in the DOM. | ||||||
|  |  *  | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface IterableDiffer { | export interface IterableDiffer { | ||||||
|   diff(object: any): any; |   diff(object: any): any; | ||||||
| @ -31,6 +33,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 | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class IterableDiffers { | export class IterableDiffers { | ||||||
|   /*@ts2dart_const*/ |   /*@ts2dart_const*/ | ||||||
|  | |||||||
| @ -23,6 +23,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 | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class KeyValueDiffers { | export class KeyValueDiffers { | ||||||
|   /*@ts2dart_const*/ |   /*@ts2dart_const*/ | ||||||
|  | |||||||
| @ -5,6 +5,9 @@ import {RenderDebugInfo} from '../render/api'; | |||||||
| 
 | 
 | ||||||
| export class EventListener { constructor(public name: string, public callback: Function){}; } | export class EventListener { constructor(public name: string, public callback: Function){}; } | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export class DebugNode { | export class DebugNode { | ||||||
|   nativeNode: any; |   nativeNode: any; | ||||||
|   listeners: EventListener[]; |   listeners: EventListener[]; | ||||||
| @ -46,6 +49,9 @@ export class DebugNode { | |||||||
|   inject(token: any): any { return this.injector.get(token); } |   inject(token: any): any { return this.injector.get(token); } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export class DebugElement extends DebugNode { | export class DebugElement extends DebugNode { | ||||||
|   name: string; |   name: string; | ||||||
|   properties: {[key: string]: string}; |   properties: {[key: string]: string}; | ||||||
| @ -129,6 +135,9 @@ export class DebugElement extends DebugNode { | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export function asNativeElements(debugEls: DebugElement[]): any { | export function asNativeElements(debugEls: DebugElement[]): any { | ||||||
|   return debugEls.map((el) => el.nativeElement); |   return debugEls.map((el) => el.nativeElement); | ||||||
| } | } | ||||||
| @ -162,6 +171,9 @@ function _queryNodeChildren(parentNode: DebugNode, predicate: Predicate<DebugNod | |||||||
| // Need to keep the nodes in a global Map so that multiple angular apps are supported.
 | // Need to keep the nodes in a global Map so that multiple angular apps are supported.
 | ||||||
| var _nativeNodeToDebugNode = new Map<any, DebugNode>(); | var _nativeNodeToDebugNode = new Map<any, DebugNode>(); | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export function getDebugNode(nativeNode: any): DebugNode { | export function getDebugNode(nativeNode: any): DebugNode { | ||||||
|   return _nativeNodeToDebugNode.get(nativeNode); |   return _nativeNodeToDebugNode.get(nativeNode); | ||||||
| } | } | ||||||
|  | |||||||
| @ -10,8 +10,7 @@ export { | |||||||
|   InjectableMetadata, |   InjectableMetadata, | ||||||
|   SelfMetadata, |   SelfMetadata, | ||||||
|   HostMetadata, |   HostMetadata, | ||||||
|   SkipSelfMetadata, |   SkipSelfMetadata | ||||||
|   DependencyMetadata |  | ||||||
| } from './di/metadata'; | } from './di/metadata'; | ||||||
| 
 | 
 | ||||||
| // we have to reexport * because Dart and TS export two different sets of types
 | // we have to reexport * because Dart and TS export two different sets of types
 | ||||||
| @ -25,15 +24,12 @@ export { | |||||||
|   Binding, |   Binding, | ||||||
|   ProviderBuilder, |   ProviderBuilder, | ||||||
|   bind, |   bind, | ||||||
| 
 |  | ||||||
|   Provider, |   Provider, | ||||||
|   provide |   provide | ||||||
| } from './di/provider'; | } from './di/provider'; | ||||||
| export { | export { | ||||||
|   ResolvedReflectiveBinding, |   ResolvedReflectiveBinding, | ||||||
|   ResolvedReflectiveFactory, |   ResolvedReflectiveFactory, | ||||||
|   ReflectiveDependency, |  | ||||||
| 
 |  | ||||||
|   ResolvedReflectiveProvider |   ResolvedReflectiveProvider | ||||||
| } from './di/reflective_provider'; | } from './di/reflective_provider'; | ||||||
| export {ReflectiveKey} from './di/reflective_key'; | export {ReflectiveKey} from './di/reflective_key'; | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ export 'metadata.dart'; | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link InjectMetadata}. |  * {@link InjectMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Inject extends InjectMetadata { | class Inject extends InjectMetadata { | ||||||
|   const Inject(dynamic token) : super(token); |   const Inject(dynamic token) : super(token); | ||||||
| @ -12,6 +13,7 @@ class Inject extends InjectMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link OptionalMetadata}. |  * {@link OptionalMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Optional extends OptionalMetadata { | class Optional extends OptionalMetadata { | ||||||
|   const Optional() : super(); |   const Optional() : super(); | ||||||
| @ -19,6 +21,7 @@ class Optional extends OptionalMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link InjectableMetadata}. |  * {@link InjectableMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Injectable extends InjectableMetadata { | class Injectable extends InjectableMetadata { | ||||||
|   const Injectable() : super(); |   const Injectable() : super(); | ||||||
| @ -26,6 +29,7 @@ class Injectable extends InjectableMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link SelfMetadata}. |  * {@link SelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Self extends SelfMetadata { | class Self extends SelfMetadata { | ||||||
|   const Self() : super(); |   const Self() : super(); | ||||||
| @ -33,6 +37,7 @@ class Self extends SelfMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link HostMetadata}. |  * {@link HostMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Host extends HostMetadata { | class Host extends HostMetadata { | ||||||
|   const Host() : super(); |   const Host() : super(); | ||||||
| @ -40,6 +45,7 @@ class Host extends HostMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link SkipSelfMetadata}. |  * {@link SkipSelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class SkipSelf extends SkipSelfMetadata { | class SkipSelf extends SkipSelfMetadata { | ||||||
|   const SkipSelf() : super(); |   const SkipSelf() : super(); | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ import {makeDecorator, makeParamDecorator} from '../util/decorators'; | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link InjectMetadata}. |  * Factory for creating {@link InjectMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface InjectMetadataFactory { | export interface InjectMetadataFactory { | ||||||
|   (token: any): any; |   (token: any): any; | ||||||
| @ -18,6 +19,7 @@ export interface InjectMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link OptionalMetadata}. |  * Factory for creating {@link OptionalMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface OptionalMetadataFactory { | export interface OptionalMetadataFactory { | ||||||
|   (): any; |   (): any; | ||||||
| @ -26,6 +28,7 @@ export interface OptionalMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link InjectableMetadata}. |  * Factory for creating {@link InjectableMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface InjectableMetadataFactory { | export interface InjectableMetadataFactory { | ||||||
|   (): any; |   (): any; | ||||||
| @ -34,6 +37,7 @@ export interface InjectableMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link SelfMetadata}. |  * Factory for creating {@link SelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface SelfMetadataFactory { | export interface SelfMetadataFactory { | ||||||
|   (): any; |   (): any; | ||||||
| @ -42,6 +46,7 @@ export interface SelfMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link HostMetadata}. |  * Factory for creating {@link HostMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface HostMetadataFactory { | export interface HostMetadataFactory { | ||||||
|   (): any; |   (): any; | ||||||
| @ -50,6 +55,7 @@ export interface HostMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link SkipSelfMetadata}. |  * Factory for creating {@link SkipSelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface SkipSelfMetadataFactory { | export interface SkipSelfMetadataFactory { | ||||||
|   (): any; |   (): any; | ||||||
| @ -58,31 +64,37 @@ export interface SkipSelfMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link InjectMetadata}. |  * Factory for creating {@link InjectMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Inject: InjectMetadataFactory = makeParamDecorator(InjectMetadata); | export var Inject: InjectMetadataFactory = makeParamDecorator(InjectMetadata); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link OptionalMetadata}. |  * Factory for creating {@link OptionalMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Optional: OptionalMetadataFactory = makeParamDecorator(OptionalMetadata); | export var Optional: OptionalMetadataFactory = makeParamDecorator(OptionalMetadata); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link InjectableMetadata}. |  * Factory for creating {@link InjectableMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Injectable: InjectableMetadataFactory = | export var Injectable: InjectableMetadataFactory = | ||||||
|     <InjectableMetadataFactory>makeDecorator(InjectableMetadata); |     <InjectableMetadataFactory>makeDecorator(InjectableMetadata); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link SelfMetadata}. |  * Factory for creating {@link SelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Self: SelfMetadataFactory = makeParamDecorator(SelfMetadata); | export var Self: SelfMetadataFactory = makeParamDecorator(SelfMetadata); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link HostMetadata}. |  * Factory for creating {@link HostMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata); | export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata); | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for creating {@link SkipSelfMetadata}. |  * Factory for creating {@link SkipSelfMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata); | export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata); | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ export interface ForwardRefFn { (): any; } | |||||||
|  * |  * | ||||||
|  * ### Example |  * ### Example | ||||||
|  * {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'} |  * {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'} | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function forwardRef(forwardRefFn: ForwardRefFn): Type { | export function forwardRef(forwardRefFn: ForwardRefFn): Type { | ||||||
|   (<any>forwardRefFn).__forward_ref__ = forwardRef; |   (<any>forwardRefFn).__forward_ref__ = forwardRef; | ||||||
| @ -40,6 +41,7 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type { | |||||||
|  * ``` |  * ``` | ||||||
|  * |  * | ||||||
|  * See: {@link forwardRef} |  * See: {@link forwardRef} | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function resolveForwardRef(type: any): any { | export function resolveForwardRef(type: any): any { | ||||||
|   if (isFunction(type) && type.hasOwnProperty('__forward_ref__') && |   if (isFunction(type) && type.hasOwnProperty('__forward_ref__') && | ||||||
|  | |||||||
| @ -3,6 +3,9 @@ import {unimplemented} from '../../src/facade/exceptions'; | |||||||
| const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object(); | const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object(); | ||||||
| export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND; | export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export abstract class Injector { | export abstract class Injector { | ||||||
|   static THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; |   static THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -40,6 +40,7 @@ import {stringify} from '../../src/facade/lang'; | |||||||
|  * expect(injector.get(Car).engine instanceof Engine).toBe(true); |  * expect(injector.get(Car).engine instanceof Engine).toBe(true); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class InjectMetadata { | export class InjectMetadata { | ||||||
|   constructor(public token) {} |   constructor(public token) {} | ||||||
| @ -67,6 +68,7 @@ export class InjectMetadata { | |||||||
|  * expect(injector.get(Car).engine).toBeNull(); |  * expect(injector.get(Car).engine).toBeNull(); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class OptionalMetadata { | export class OptionalMetadata { | ||||||
|   toString(): string { return `@Optional()`; } |   toString(): string { return `@Optional()`; } | ||||||
| @ -76,6 +78,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. | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class DependencyMetadata { | export class DependencyMetadata { | ||||||
|   get token() { return null; } |   get token() { return null; } | ||||||
| @ -112,6 +115,7 @@ export class DependencyMetadata { | |||||||
|  * expect(() => injector.get(NeedsService)).toThrowError(); |  * expect(() => injector.get(NeedsService)).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class InjectableMetadata { | export class InjectableMetadata { | ||||||
|   constructor() {} |   constructor() {} | ||||||
| @ -144,6 +148,7 @@ export class InjectableMetadata { | |||||||
|  * expect(() => child.get(NeedsDependency)).toThrowError(); |  * expect(() => child.get(NeedsDependency)).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class SelfMetadata { | export class SelfMetadata { | ||||||
|   toString(): string { return `@Self()`; } |   toString(): string { return `@Self()`; } | ||||||
| @ -174,6 +179,7 @@ export class SelfMetadata { | |||||||
|  * expect(() => inj.get(NeedsDependency)).toThrowError(); |  * expect(() => inj.get(NeedsDependency)).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class SkipSelfMetadata { | export class SkipSelfMetadata { | ||||||
|   toString(): string { return `@SkipSelf()`; } |   toString(): string { return `@SkipSelf()`; } | ||||||
| @ -233,6 +239,7 @@ export class SkipSelfMetadata { | |||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  *``` |  *``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class HostMetadata { | export class HostMetadata { | ||||||
|   toString(): string { return `@Host()`; } |   toString(): string { return `@Host()`; } | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ | |||||||
|  * 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. | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class OpaqueToken { | export class OpaqueToken { | ||||||
|   constructor(private _desc: string) {} |   constructor(private _desc: string) {} | ||||||
|  | |||||||
| @ -16,6 +16,7 @@ import {BaseException} from '../../src/facade/exceptions'; | |||||||
|  * expect(injector.get("message")).toEqual('Hello'); |  * expect(injector.get("message")).toEqual('Hello'); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class Provider { | export class Provider { | ||||||
|   /** |   /** | ||||||
| @ -259,6 +260,7 @@ export function bind(token): ProviderBuilder { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Helper class for the {@link bind} function. |  * Helper class for the {@link bind} function. | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class ProviderBuilder { | export class ProviderBuilder { | ||||||
|   constructor(public token) {} |   constructor(public token) {} | ||||||
| @ -384,6 +386,7 @@ export class ProviderBuilder { | |||||||
|  * See {@link Provider} for more details. |  * See {@link Provider} for more details. | ||||||
|  * |  * | ||||||
|  * <!-- TODO: improve the docs --> |  * <!-- TODO: improve the docs --> | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export function provide(token, {useClass, useValue, useExisting, useFactory, deps, multi}: { | export function provide(token, {useClass, useValue, useExisting, useFactory, deps, multi}: { | ||||||
|   useClass?: Type, |   useClass?: Type, | ||||||
|  | |||||||
| @ -30,6 +30,7 @@ function constructResolvingPath(keys: any[]): string { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Base class for all errors arising from misconfigured providers. |  * Base class for all errors arising from misconfigured providers. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class AbstractProviderError extends BaseException { | export class AbstractProviderError extends BaseException { | ||||||
|   /** @internal */ |   /** @internal */ | ||||||
| @ -75,6 +76,7 @@ export class AbstractProviderError extends BaseException { | |||||||
|  * |  * | ||||||
|  * expect(() => Injector.resolveAndCreate([A])).toThrowError(); |  * expect(() => Injector.resolveAndCreate([A])).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class NoProviderError extends AbstractProviderError { | export class NoProviderError extends AbstractProviderError { | ||||||
|   constructor(injector: ReflectiveInjector, key: ReflectiveKey) { |   constructor(injector: ReflectiveInjector, key: ReflectiveKey) { | ||||||
| @ -100,6 +102,7 @@ export class NoProviderError extends AbstractProviderError { | |||||||
|  * ``` |  * ``` | ||||||
|  * |  * | ||||||
|  * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. |  * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class CyclicDependencyError extends AbstractProviderError { | export class CyclicDependencyError extends AbstractProviderError { | ||||||
|   constructor(injector: ReflectiveInjector, key: ReflectiveKey) { |   constructor(injector: ReflectiveInjector, key: ReflectiveKey) { | ||||||
| @ -134,6 +137,7 @@ export class CyclicDependencyError extends AbstractProviderError { | |||||||
|  *   expect(e.originalStack).toBeDefined(); |  *   expect(e.originalStack).toBeDefined(); | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class InstantiationError extends WrappedException { | export class InstantiationError extends WrappedException { | ||||||
|   /** @internal */ |   /** @internal */ | ||||||
| @ -172,6 +176,7 @@ export class InstantiationError extends WrappedException { | |||||||
|  * ```typescript
 |  * ```typescript
 | ||||||
|  * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError(); |  * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class InvalidProviderError extends BaseException { | export class InvalidProviderError extends BaseException { | ||||||
|   constructor(provider) { |   constructor(provider) { | ||||||
| @ -206,6 +211,7 @@ export class InvalidProviderError extends BaseException { | |||||||
|  * |  * | ||||||
|  * expect(() => Injector.resolveAndCreate([A,B])).toThrowError(); |  * expect(() => Injector.resolveAndCreate([A,B])).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class NoAnnotationError extends BaseException { | export class NoAnnotationError extends BaseException { | ||||||
|   constructor(typeOrFunc, params: any[][]) { |   constructor(typeOrFunc, params: any[][]) { | ||||||
| @ -241,6 +247,7 @@ export class NoAnnotationError extends BaseException { | |||||||
|  * |  * | ||||||
|  * expect(() => injector.getAt(100)).toThrowError(); |  * expect(() => injector.getAt(100)).toThrowError(); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class OutOfBoundsError extends BaseException { | export class OutOfBoundsError extends BaseException { | ||||||
|   constructor(index) { super(`Index ${index} is out-of-bounds.`); } |   constructor(index) { super(`Index ${index} is out-of-bounds.`); } | ||||||
|  | |||||||
| @ -448,6 +448,7 @@ export abstract class ReflectiveInjector implements Injector { | |||||||
|    * var injector = ReflectiveInjector.fromResolvedProviders(providers); |    * var injector = ReflectiveInjector.fromResolvedProviders(providers); | ||||||
|    * expect(injector.get(Car) instanceof Car).toBe(true); |    * expect(injector.get(Car) instanceof Car).toBe(true); | ||||||
|    * ``` |    * ``` | ||||||
|  |    * @experimental | ||||||
|    */ |    */ | ||||||
|   static fromResolvedProviders(providers: ResolvedReflectiveProvider[], |   static fromResolvedProviders(providers: ResolvedReflectiveProvider[], | ||||||
|                                parent: Injector = null): ReflectiveInjector { |                                parent: Injector = null): ReflectiveInjector { | ||||||
|  | |||||||
| @ -16,6 +16,7 @@ import {resolveForwardRef} from './forward_ref'; | |||||||
|  * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when |  * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when | ||||||
|  * resolving |  * resolving | ||||||
|  * providers. |  * providers. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export class ReflectiveKey { | export class ReflectiveKey { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -88,6 +88,7 @@ export class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * An internal resolved representation of a factory function created by resolving {@link Provider}. |  * An internal resolved representation of a factory function created by resolving {@link Provider}. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export class ResolvedReflectiveFactory { | export class ResolvedReflectiveFactory { | ||||||
|   constructor( |   constructor( | ||||||
|  | |||||||
| @ -13,6 +13,7 @@ import {Injector} from '../di/injector'; | |||||||
|  * `ComponentRef` provides access to the Component Instance as well other objects related to this |  * `ComponentRef` provides access to the Component Instance as well other objects related to this | ||||||
|  * Component Instance and allows you to destroy the Component Instance via the {@link #destroy} |  * Component Instance and allows you to destroy the Component Instance via the {@link #destroy} | ||||||
|  * method. |  * method. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class ComponentRef<C> { | export abstract class ComponentRef<C> { | ||||||
|   /** |   /** | ||||||
| @ -69,9 +70,12 @@ export class ComponentRef_<C> extends ComponentRef<C> { | |||||||
|   onDestroy(callback: Function): void { this.hostView.onDestroy(callback); } |   onDestroy(callback: Function): void { this.hostView.onDestroy(callback); } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); |  | ||||||
| 
 | 
 | ||||||
| /*@ts2dart_const*/ | /** | ||||||
|  |  * @experimental | ||||||
|  |  * @ts2dart_const | ||||||
|  |  */ | ||||||
|  | const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); | ||||||
| export class ComponentFactory<C> { | export class ComponentFactory<C> { | ||||||
|   constructor(public selector: string, private _viewFactory: Function, |   constructor(public selector: string, private _viewFactory: Function, | ||||||
|               private _componentType: Type) {} |               private _componentType: Type) {} | ||||||
|  | |||||||
| @ -8,6 +8,7 @@ import {Injectable} from '../di/decorators'; | |||||||
| /** | /** | ||||||
|  * Low-level service for loading {@link ComponentFactory}s, which |  * Low-level service for loading {@link ComponentFactory}s, which | ||||||
|  * can later be used to create and render a Component instance. |  * can later be used to create and render a Component instance. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export abstract class ComponentResolver { | export abstract class ComponentResolver { | ||||||
|   abstract resolveComponent(component: Type|string): Promise<ComponentFactory<any>>; |   abstract resolveComponent(component: Type|string): Promise<ComponentFactory<any>>; | ||||||
|  | |||||||
| @ -26,6 +26,7 @@ export class ElementRef { | |||||||
|    *    web worker. |    *    web worker. | ||||||
|    *   </p> |    *   </p> | ||||||
|    * </div> |    * </div> | ||||||
|  |    * @stable | ||||||
|    */ |    */ | ||||||
|   public nativeElement: any; |   public nativeElement: any; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -32,6 +32,7 @@ import {BaseException, WrappedException} from '../../src/facade/exceptions'; | |||||||
|  *   } |  *   } | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ExpressionChangedAfterItHasBeenCheckedException extends BaseException { | export class ExpressionChangedAfterItHasBeenCheckedException extends BaseException { | ||||||
|   constructor(oldValue: any, currValue: any, context: any) { |   constructor(oldValue: any, currValue: any, context: any) { | ||||||
| @ -45,6 +46,7 @@ export class ExpressionChangedAfterItHasBeenCheckedException extends BaseExcepti | |||||||
|  * |  * | ||||||
|  * This error wraps the original exception to attach additional contextual information that can |  * This error wraps the original exception to attach additional contextual information that can | ||||||
|  * be useful for debugging. |  * be useful for debugging. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ViewWrappedException extends WrappedException { | export class ViewWrappedException extends WrappedException { | ||||||
|   constructor(originalException: any, originalStack: any, context: any) { |   constructor(originalException: any, originalStack: any, context: any) { | ||||||
| @ -58,6 +60,7 @@ export class ViewWrappedException extends WrappedException { | |||||||
|  * This error indicates a bug in the framework. |  * This error indicates a bug in the framework. | ||||||
|  * |  * | ||||||
|  * This is an internal Angular error. |  * This is an internal Angular error. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ViewDestroyedException extends BaseException { | export class ViewDestroyedException extends BaseException { | ||||||
|   constructor(details: string) { super(`Attempt to use a destroyed view: ${details}`); } |   constructor(details: string) { super(`Attempt to use a destroyed view: ${details}`); } | ||||||
|  | |||||||
| @ -26,6 +26,7 @@ import {Observable, EventEmitter} from '../../src/facade/async'; | |||||||
|  *   } |  *   } | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class QueryList<T> { | export class QueryList<T> { | ||||||
|   private _dirty = true; |   private _dirty = true; | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ import { ComponentFactory } from './component_factory'; | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Component resolver that can load components lazily |  * Component resolver that can load components lazily | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export class SystemJsComponentResolver implements ComponentResolver { | export class SystemJsComponentResolver implements ComponentResolver { | ||||||
|   constructor(private _resolver: ComponentResolver) {} |   constructor(private _resolver: ComponentResolver) {} | ||||||
|  | |||||||
| @ -17,6 +17,7 @@ const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); | |||||||
|  * To instantiate Embedded Views based on a Template, use |  * To instantiate Embedded Views based on a Template, use | ||||||
|  * {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the |  * {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the | ||||||
|  * View Container. |  * View Container. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class TemplateRef<C> { | export abstract class TemplateRef<C> { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -27,6 +27,7 @@ import {ComponentFactory, ComponentRef} from './component_factory'; | |||||||
|  * |  * | ||||||
|  * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected |  * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected | ||||||
|  * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query. |  * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class ViewContainerRef { | export abstract class ViewContainerRef { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -3,6 +3,9 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref'; | |||||||
| import {AppView} from './view'; | import {AppView} from './view'; | ||||||
| import {ChangeDetectionStrategy} from '../change_detection/constants'; | import {ChangeDetectionStrategy} from '../change_detection/constants'; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export abstract class ViewRef { | export abstract class ViewRef { | ||||||
|   get destroyed(): boolean { return <boolean>unimplemented(); } |   get destroyed(): boolean { return <boolean>unimplemented(); } | ||||||
| 
 | 
 | ||||||
| @ -61,6 +64,7 @@ export abstract class ViewRef { | |||||||
|  * </ul> |  * </ul> | ||||||
|  * <!-- /ViewRef: outer-0 --> |  * <!-- /ViewRef: outer-0 --> | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export abstract class EmbeddedViewRef<C> extends ViewRef { | export abstract class EmbeddedViewRef<C> extends ViewRef { | ||||||
|   get context(): C { return unimplemented(); } |   get context(): C { return unimplemented(); } | ||||||
|  | |||||||
| @ -22,6 +22,7 @@ export './metadata/lifecycle_hooks.dart' show | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [DirectiveMetadata] for docs. |  * See: [DirectiveMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Directive extends DirectiveMetadata { | class Directive extends DirectiveMetadata { | ||||||
|   const Directive( |   const Directive( | ||||||
| @ -50,6 +51,7 @@ class Directive extends DirectiveMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ComponentMetadata] for docs. |  * See: [ComponentMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Component extends ComponentMetadata { | class Component extends ComponentMetadata { | ||||||
|   const Component( |   const Component( | ||||||
| @ -100,6 +102,7 @@ class Component extends ComponentMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ViewMetadata] for docs. |  * See: [ViewMetadata] for docs. | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| class View extends ViewMetadata { | class View extends ViewMetadata { | ||||||
|   const View( |   const View( | ||||||
| @ -124,6 +127,7 @@ class View extends ViewMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [PipeMetadata] for docs. |  * See: [PipeMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Pipe extends PipeMetadata { | class Pipe extends PipeMetadata { | ||||||
|   const Pipe({name, pure}) : super(name: name, pure: pure); |   const Pipe({name, pure}) : super(name: name, pure: pure); | ||||||
| @ -131,6 +135,7 @@ class Pipe extends PipeMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [AttributeMetadata] for docs. |  * See: [AttributeMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Attribute extends AttributeMetadata { | class Attribute extends AttributeMetadata { | ||||||
|   const Attribute(String attributeName) : super(attributeName); |   const Attribute(String attributeName) : super(attributeName); | ||||||
| @ -138,8 +143,8 @@ class Attribute extends AttributeMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [QueryMetadata] for docs. |  * See: [QueryMetadata] for docs. | ||||||
|  |  * @deprecated Use ContentChildren/ContentChild instead | ||||||
|  */ |  */ | ||||||
| @Deprecated("Use ContentChildren/ContentChild instead") |  | ||||||
| class Query extends QueryMetadata { | class Query extends QueryMetadata { | ||||||
|   const Query(dynamic /*Type | string*/ selector, |   const Query(dynamic /*Type | string*/ selector, | ||||||
|       {bool descendants: false, dynamic read: null}) |       {bool descendants: false, dynamic read: null}) | ||||||
| @ -148,6 +153,7 @@ class Query extends QueryMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ContentChildrenMetadata] for docs. |  * See: [ContentChildrenMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class ContentChildren extends ContentChildrenMetadata { | class ContentChildren extends ContentChildrenMetadata { | ||||||
|   const ContentChildren(dynamic /*Type | string*/ selector, |   const ContentChildren(dynamic /*Type | string*/ selector, | ||||||
| @ -157,6 +163,7 @@ class ContentChildren extends ContentChildrenMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ContentChildMetadata] for docs. |  * See: [ContentChildMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class ContentChild extends ContentChildMetadata { | class ContentChild extends ContentChildMetadata { | ||||||
|   const ContentChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); |   const ContentChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); | ||||||
| @ -164,8 +171,8 @@ class ContentChild extends ContentChildMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ViewQueryMetadata] for docs. |  * See: [ViewQueryMetadata] for docs. | ||||||
|  |  * @deprecated Use ViewChildren/ViewChild instead | ||||||
|  */ |  */ | ||||||
| @Deprecated("Use ViewChildren/ViewChild instead") |  | ||||||
| class ViewQuery extends ViewQueryMetadata { | class ViewQuery extends ViewQueryMetadata { | ||||||
|   const ViewQuery(dynamic /*Type | string*/ selector, {dynamic read: null}) |   const ViewQuery(dynamic /*Type | string*/ selector, {dynamic read: null}) | ||||||
|       : super(selector, descendants: true, read: read); |       : super(selector, descendants: true, read: read); | ||||||
| @ -173,6 +180,7 @@ class ViewQuery extends ViewQueryMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ViewChildrenMetadata] for docs. |  * See: [ViewChildrenMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class ViewChildren extends ViewChildrenMetadata { | class ViewChildren extends ViewChildrenMetadata { | ||||||
|   const ViewChildren(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); |   const ViewChildren(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); | ||||||
| @ -180,6 +188,7 @@ class ViewChildren extends ViewChildrenMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [ViewChildMetadata] for docs. |  * See: [ViewChildMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class ViewChild extends ViewChildMetadata { | class ViewChild extends ViewChildMetadata { | ||||||
|   const ViewChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); |   const ViewChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); | ||||||
| @ -187,6 +196,7 @@ class ViewChild extends ViewChildMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [InputMetadata] for docs. |  * See: [InputMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Input extends InputMetadata { | class Input extends InputMetadata { | ||||||
|   const Input([String bindingPropertyName]) : super(bindingPropertyName); |   const Input([String bindingPropertyName]) : super(bindingPropertyName); | ||||||
| @ -194,6 +204,7 @@ class Input extends InputMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [OutputMetadata] for docs. |  * See: [OutputMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class Output extends OutputMetadata { | class Output extends OutputMetadata { | ||||||
|   const Output([String bindingPropertyName]) : super(bindingPropertyName); |   const Output([String bindingPropertyName]) : super(bindingPropertyName); | ||||||
| @ -201,6 +212,7 @@ class Output extends OutputMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [HostBindingMetadata] for docs. |  * See: [HostBindingMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class HostBinding extends HostBindingMetadata { | class HostBinding extends HostBindingMetadata { | ||||||
|   const HostBinding([String hostPropertyName]) : super(hostPropertyName); |   const HostBinding([String hostPropertyName]) : super(hostPropertyName); | ||||||
| @ -208,6 +220,7 @@ class HostBinding extends HostBindingMetadata { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * See: [HostListenerMetadata] for docs. |  * See: [HostListenerMetadata] for docs. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| class HostListener extends HostListenerMetadata { | class HostListener extends HostListenerMetadata { | ||||||
|   const HostListener(String eventName, [List<String> args]) |   const HostListener(String eventName, [List<String> args]) | ||||||
|  | |||||||
| @ -397,6 +397,7 @@ export interface AttributeMetadataFactory { | |||||||
|  *   [new ng.Query(SomeType)] |  *   [new ng.Query(SomeType)] | ||||||
|  * ] |  * ] | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export interface QueryMetadataFactory { | export interface QueryMetadataFactory { | ||||||
|   (selector: Type | string, |   (selector: Type | string, | ||||||
| @ -407,6 +408,7 @@ export interface QueryMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for {@link ContentChildren}. |  * Factory for {@link ContentChildren}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface ContentChildrenMetadataFactory { | export interface ContentChildrenMetadataFactory { | ||||||
|   (selector: Type | string, {descendants, read}?: {descendants?: boolean, read?: any}): any; |   (selector: Type | string, {descendants, read}?: {descendants?: boolean, read?: any}): any; | ||||||
| @ -416,6 +418,7 @@ export interface ContentChildrenMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for {@link ContentChild}. |  * Factory for {@link ContentChild}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface ContentChildMetadataFactory { | export interface ContentChildMetadataFactory { | ||||||
|   (selector: Type | string, {read}?: {read?: any}): any; |   (selector: Type | string, {read}?: {read?: any}): any; | ||||||
| @ -424,6 +427,7 @@ export interface ContentChildMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for {@link ViewChildren}. |  * Factory for {@link ViewChildren}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface ViewChildrenMetadataFactory { | export interface ViewChildrenMetadataFactory { | ||||||
|   (selector: Type | string, {read}?: {read?: any}): any; |   (selector: Type | string, {read}?: {read?: any}): any; | ||||||
| @ -432,6 +436,7 @@ export interface ViewChildrenMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Factory for {@link ViewChild}. |  * Factory for {@link ViewChild}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface ViewChildMetadataFactory { | export interface ViewChildMetadataFactory { | ||||||
|   (selector: Type | string, {read}?: {read?: any}): any; |   (selector: Type | string, {read}?: {read?: any}): any; | ||||||
| @ -445,6 +450,7 @@ export interface ViewChildMetadataFactory { | |||||||
|  * ### Example |  * ### Example | ||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='pipe'} |  * {@example core/ts/metadata/metadata.ts region='pipe'} | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface PipeMetadataFactory { | export interface PipeMetadataFactory { | ||||||
|   (obj: {name: string, pure?: boolean}): any; |   (obj: {name: string, pure?: boolean}): any; | ||||||
| @ -455,6 +461,7 @@ export interface PipeMetadataFactory { | |||||||
|  * {@link InputMetadata} factory for creating decorators. |  * {@link InputMetadata} factory for creating decorators. | ||||||
|  * |  * | ||||||
|  * See {@link InputMetadata}. |  * See {@link InputMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface InputMetadataFactory { | export interface InputMetadataFactory { | ||||||
|   (bindingPropertyName?: string): any; |   (bindingPropertyName?: string): any; | ||||||
| @ -465,6 +472,7 @@ export interface InputMetadataFactory { | |||||||
|  * {@link OutputMetadata} factory for creating decorators. |  * {@link OutputMetadata} factory for creating decorators. | ||||||
|  * |  * | ||||||
|  * See {@link OutputMetadata}. |  * See {@link OutputMetadata}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface OutputMetadataFactory { | export interface OutputMetadataFactory { | ||||||
|   (bindingPropertyName?: string): any; |   (bindingPropertyName?: string): any; | ||||||
| @ -473,6 +481,7 @@ export interface OutputMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link HostBindingMetadata} factory function. |  * {@link HostBindingMetadata} factory function. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface HostBindingMetadataFactory { | export interface HostBindingMetadataFactory { | ||||||
|   (hostPropertyName?: string): any; |   (hostPropertyName?: string): any; | ||||||
| @ -481,6 +490,7 @@ export interface HostBindingMetadataFactory { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * {@link HostListenerMetadata} factory function. |  * {@link HostListenerMetadata} factory function. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface HostListenerMetadataFactory { | export interface HostListenerMetadataFactory { | ||||||
|   (eventName: string, args?: string[]): any; |   (eventName: string, args?: string[]): any; | ||||||
| @ -510,6 +520,7 @@ export interface HostListenerMetadataFactory { | |||||||
|  * ### Example |  * ### Example | ||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='component'} |  * {@example core/ts/metadata/metadata.ts region='component'} | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Component: ComponentMetadataFactory = | export var Component: ComponentMetadataFactory = | ||||||
|     <ComponentMetadataFactory>makeDecorator(ComponentMetadata, (fn: any) => fn.View = View); |     <ComponentMetadataFactory>makeDecorator(ComponentMetadata, (fn: any) => fn.View = View); | ||||||
| @ -892,6 +903,7 @@ export var Component: ComponentMetadataFactory = | |||||||
|  * Note also that although the `<li></li>` template still exists inside the `<template></template>`, |  * Note also that although the `<li></li>` template still exists inside the `<template></template>`, | ||||||
|  * 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. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Directive: DirectiveMetadataFactory = | export var Directive: DirectiveMetadataFactory = | ||||||
|     <DirectiveMetadataFactory>makeDecorator(DirectiveMetadata); |     <DirectiveMetadataFactory>makeDecorator(DirectiveMetadata); | ||||||
| @ -925,6 +937,7 @@ export var Directive: DirectiveMetadataFactory = | |||||||
|  *   } |  *   } | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| var View: ViewMetadataFactory = | var View: ViewMetadataFactory = | ||||||
|     <ViewMetadataFactory>makeDecorator(ViewMetadata, (fn: any) => fn.View = View); |     <ViewMetadataFactory>makeDecorator(ViewMetadata, (fn: any) => fn.View = View); | ||||||
| @ -945,6 +958,7 @@ var View: ViewMetadataFactory = | |||||||
|  * A decorator can inject string literal `text` like so: |  * A decorator can inject string literal `text` like so: | ||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='attributeMetadata'} |  * {@example core/ts/metadata/metadata.ts region='attributeMetadata'} | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMetadata); | export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1055,6 +1069,7 @@ export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMet | |||||||
|  * |  * | ||||||
|  * 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. | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata); | export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1078,6 +1093,7 @@ export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata); | |||||||
|  *   } |  *   } | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var ContentChildren: ContentChildrenMetadataFactory = | export var ContentChildren: ContentChildrenMetadataFactory = | ||||||
|     makePropDecorator(ContentChildrenMetadata); |     makePropDecorator(ContentChildrenMetadata); | ||||||
| @ -1111,6 +1127,7 @@ export var ContentChildren: ContentChildrenMetadataFactory = | |||||||
|  *   <item>b</item> |  *   <item>b</item> | ||||||
|  * </container> |  * </container> | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var ContentChild: ContentChildMetadataFactory = makePropDecorator(ContentChildMetadata); | export var ContentChild: ContentChildMetadataFactory = makePropDecorator(ContentChildMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1193,6 +1210,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content | |||||||
|  * ``` |  * ``` | ||||||
|  * |  * | ||||||
|  * See also: [ViewChildrenMetadata] |  * See also: [ViewChildrenMetadata] | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChildrenMetadata); | export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChildrenMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1266,6 +1284,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi | |||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  * See also: [ViewChildMetadata] |  * See also: [ViewChildMetadata] | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMetadata); | export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1304,6 +1323,7 @@ export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMeta | |||||||
|  * |  * | ||||||
|  * 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. | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadata); | export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1314,6 +1334,7 @@ export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadat | |||||||
|  * ### Example |  * ### Example | ||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='pipe'} |  * {@example core/ts/metadata/metadata.ts region='pipe'} | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator(PipeMetadata); | export var Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator(PipeMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1358,6 +1379,7 @@ export var Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator(PipeMe | |||||||
|  * |  * | ||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Input: InputMetadataFactory = makePropDecorator(InputMetadata); | export var Input: InputMetadataFactory = makePropDecorator(InputMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1402,6 +1424,7 @@ export var Input: InputMetadataFactory = makePropDecorator(InputMetadata); | |||||||
|  * } |  * } | ||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata); | export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1440,6 +1463,7 @@ export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata); | |||||||
|  * |  * | ||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindingMetadata); | export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindingMetadata); | ||||||
| 
 | 
 | ||||||
| @ -1477,5 +1501,6 @@ export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindi | |||||||
|  * |  * | ||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export var HostListener: HostListenerMetadataFactory = makePropDecorator(HostListenerMetadata); | export var HostListener: HostListenerMetadataFactory = makePropDecorator(HostListenerMetadata); | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ import {resolveForwardRef} from '../di/forward_ref'; | |||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='attributeMetadata'} |  * {@example core/ts/metadata/metadata.ts region='attributeMetadata'} | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class AttributeMetadata extends DependencyMetadata { | export class AttributeMetadata extends DependencyMetadata { | ||||||
|   constructor(public attributeName: string) { super(); } |   constructor(public attributeName: string) { super(); } | ||||||
| @ -141,6 +142,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. | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class QueryMetadata extends DependencyMetadata { | export class QueryMetadata extends DependencyMetadata { | ||||||
|   /** |   /** | ||||||
| @ -208,6 +210,7 @@ export class QueryMetadata extends DependencyMetadata { | |||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ContentChildrenMetadata extends QueryMetadata { | export class ContentChildrenMetadata extends QueryMetadata { | ||||||
|   constructor(_selector: Type | string, |   constructor(_selector: Type | string, | ||||||
| @ -237,6 +240,7 @@ export class ContentChildrenMetadata extends QueryMetadata { | |||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| 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} = {}) { | ||||||
| @ -279,6 +283,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. | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class ViewQueryMetadata extends QueryMetadata { | export class ViewQueryMetadata extends QueryMetadata { | ||||||
|   constructor(_selector: Type | string, |   constructor(_selector: Type | string, | ||||||
| @ -371,6 +376,7 @@ export class ViewQueryMetadata extends QueryMetadata { | |||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| 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} = {}) { | ||||||
| @ -448,6 +454,7 @@ export class ViewChildrenMetadata extends ViewQueryMetadata { | |||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| 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} = {}) { | ||||||
|  | |||||||
| @ -382,6 +382,7 @@ import {AnimationEntryMetadata} from '../animation/metadata'; | |||||||
|  * 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. | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class DirectiveMetadata extends InjectableMetadata { | export class DirectiveMetadata extends InjectableMetadata { | ||||||
|   /** |   /** | ||||||
| @ -789,6 +790,7 @@ export class DirectiveMetadata extends InjectableMetadata { | |||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='component'} |  * {@example core/ts/metadata/metadata.ts region='component'} | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ComponentMetadata extends DirectiveMetadata { | export class ComponentMetadata extends DirectiveMetadata { | ||||||
|   /** |   /** | ||||||
| @ -943,6 +945,7 @@ export class ComponentMetadata extends DirectiveMetadata { | |||||||
|  * |  * | ||||||
|  * {@example core/ts/metadata/metadata.ts region='pipe'} |  * {@example core/ts/metadata/metadata.ts region='pipe'} | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class PipeMetadata extends InjectableMetadata { | export class PipeMetadata extends InjectableMetadata { | ||||||
|   name: string; |   name: string; | ||||||
| @ -999,6 +1002,7 @@ export class PipeMetadata extends InjectableMetadata { | |||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class InputMetadata { | export class InputMetadata { | ||||||
|   constructor( |   constructor( | ||||||
| @ -1049,6 +1053,7 @@ export class InputMetadata { | |||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class OutputMetadata { | export class OutputMetadata { | ||||||
|   constructor(public bindingPropertyName?: string) {} |   constructor(public bindingPropertyName?: string) {} | ||||||
| @ -1089,6 +1094,7 @@ export class OutputMetadata { | |||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class HostBindingMetadata { | export class HostBindingMetadata { | ||||||
|   constructor(public hostPropertyName?: string) {} |   constructor(public hostPropertyName?: string) {} | ||||||
| @ -1128,6 +1134,7 @@ export class HostBindingMetadata { | |||||||
|  * bootstrap(App); |  * bootstrap(App); | ||||||
|  * ``` |  * ``` | ||||||
|  * @ts2dart_const |  * @ts2dart_const | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class HostListenerMetadata { | export class HostListenerMetadata { | ||||||
|   constructor(public eventName: string, public args?: string[]) {} |   constructor(public eventName: string, public args?: string[]) {} | ||||||
|  | |||||||
| @ -1,5 +1,8 @@ | |||||||
| import {SimpleChange} from '../change_detection/change_detection_util'; | import {SimpleChange} from '../change_detection/change_detection_util'; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export enum LifecycleHooks { | export enum LifecycleHooks { | ||||||
|   OnInit, |   OnInit, | ||||||
|   OnDestroy, |   OnDestroy, | ||||||
| @ -14,6 +17,7 @@ export enum LifecycleHooks { | |||||||
| /** | /** | ||||||
|  * A `changes` object whose keys are property names and |  * A `changes` object whose keys are property names and | ||||||
|  * values are instances of {@link SimpleChange}. See {@link OnChanges} |  * values are instances of {@link SimpleChange}. See {@link OnChanges} | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export interface SimpleChanges {[propName: string]: SimpleChange} | export interface SimpleChanges {[propName: string]: SimpleChange} | ||||||
| 
 | 
 | ||||||
| @ -77,6 +81,7 @@ export var LIFECYCLE_HOOKS_VALUES = [ | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges); } | export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges); } | ||||||
| 
 | 
 | ||||||
| @ -120,6 +125,7 @@ export abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges); | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  *  ``` |  *  ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class OnInit { abstract ngOnInit(); } | export abstract class OnInit { abstract ngOnInit(); } | ||||||
| 
 | 
 | ||||||
| @ -187,6 +193,7 @@ export abstract class OnInit { abstract ngOnInit(); } | |||||||
|  *   list = []; |  *   list = []; | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class DoCheck { abstract ngDoCheck(); } | export abstract class DoCheck { abstract ngDoCheck(); } | ||||||
| 
 | 
 | ||||||
| @ -278,6 +285,7 @@ export abstract class DoCheck { abstract ngDoCheck(); } | |||||||
|  * Invoking `{{ 10000 | countdown }}` would cause the value to be decremented by 50, |  * Invoking `{{ 10000 | countdown }}` would cause the value to be decremented by 50, | ||||||
|  * every 50ms, until it reaches 0. |  * every 50ms, until it reaches 0. | ||||||
|  * |  * | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class OnDestroy { abstract ngOnDestroy(); } | export abstract class OnDestroy { abstract ngOnDestroy(); } | ||||||
| 
 | 
 | ||||||
| @ -331,6 +339,7 @@ export abstract class OnDestroy { abstract ngOnDestroy(); } | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class AfterContentInit { abstract ngAfterContentInit(); } | export abstract class AfterContentInit { abstract ngAfterContentInit(); } | ||||||
| 
 | 
 | ||||||
| @ -379,6 +388,7 @@ export abstract class AfterContentInit { abstract ngAfterContentInit(); } | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class AfterContentChecked { abstract ngAfterContentChecked(); } | export abstract class AfterContentChecked { abstract ngAfterContentChecked(); } | ||||||
| 
 | 
 | ||||||
| @ -426,6 +436,7 @@ export abstract class AfterContentChecked { abstract ngAfterContentChecked(); } | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class AfterViewInit { abstract ngAfterViewInit(); } | export abstract class AfterViewInit { abstract ngAfterViewInit(); } | ||||||
| 
 | 
 | ||||||
| @ -476,5 +487,6 @@ export abstract class AfterViewInit { abstract ngAfterViewInit(); } | |||||||
|  * |  * | ||||||
|  * bootstrap(App).catch(err => console.error(err)); |  * bootstrap(App).catch(err => console.error(err)); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export abstract class AfterViewChecked { abstract ngAfterViewChecked(); } | export abstract class AfterViewChecked { abstract ngAfterViewChecked(); } | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ import {AnimationEntryMetadata} from '../animation/metadata'; | |||||||
|  * Defines template and style encapsulation options available for Component's {@link View}. |  * Defines template and style encapsulation options available for Component's {@link View}. | ||||||
|  * |  * | ||||||
|  * See {@link ViewMetadata#encapsulation}. |  * See {@link ViewMetadata#encapsulation}. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export enum ViewEncapsulation { | export enum ViewEncapsulation { | ||||||
|   /** |   /** | ||||||
|  | |||||||
| @ -14,6 +14,7 @@ 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. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export const PLATFORM_COMMON_PROVIDERS: Array<any | Type | Provider | any[]> = /*@ts2dart_const*/[ | export const PLATFORM_COMMON_PROVIDERS: Array<any | Type | Provider | any[]> = /*@ts2dart_const*/[ | ||||||
|   PLATFORM_CORE_PROVIDERS, |   PLATFORM_CORE_PROVIDERS, | ||||||
|  | |||||||
| @ -23,6 +23,7 @@ import {OpaqueToken} from './di'; | |||||||
|  * |  * | ||||||
|  * bootstrap(MyComponent, [provide(PLATFORM_DIRECTIVES, {useValue: [OtherDirective], multi:true})]); |  * bootstrap(MyComponent, [provide(PLATFORM_DIRECTIVES, {useValue: [OtherDirective], multi:true})]); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export const PLATFORM_DIRECTIVES: OpaqueToken = | export const PLATFORM_DIRECTIVES: OpaqueToken = | ||||||
|     /*@ts2dart_const*/ new OpaqueToken("Platform Directives"); |     /*@ts2dart_const*/ new OpaqueToken("Platform Directives"); | ||||||
| @ -49,5 +50,6 @@ export const PLATFORM_DIRECTIVES: OpaqueToken = | |||||||
|  * |  * | ||||||
|  * bootstrap(MyComponent, [provide(PLATFORM_PIPES, {useValue: [OtherPipe], multi:true})]); |  * bootstrap(MyComponent, [provide(PLATFORM_PIPES, {useValue: [OtherPipe], multi:true})]); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export const PLATFORM_PIPES: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken("Platform Pipes"); | export const PLATFORM_PIPES: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken("Platform Pipes"); | ||||||
|  | |||||||
| @ -41,6 +41,7 @@ function noopScope(arg0?: any, arg1?: any): any { | |||||||
|  * needs to be fixed before the app should be profiled. Add try-finally only when you expect that |  * needs to be fixed before the app should be profiled. Add try-finally only when you expect that | ||||||
|  * an exception is expected during normal execution while profiling. |  * an exception is expected during normal execution while profiling. | ||||||
|  * |  * | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export var wtfCreateScope: (signature: string, flags?: any) => impl.WtfScopeFn = | export var wtfCreateScope: (signature: string, flags?: any) => impl.WtfScopeFn = | ||||||
|     wtfEnabled ? impl.createScope : (signature: string, flags?: any) => noopScope; |     wtfEnabled ? impl.createScope : (signature: string, flags?: any) => noopScope; | ||||||
| @ -52,6 +53,7 @@ export var wtfCreateScope: (signature: string, flags?: any) => impl.WtfScopeFn = | |||||||
|  * - `returnValue` (optional) to be passed to the WTF. |  * - `returnValue` (optional) to be passed to the WTF. | ||||||
|  * |  * | ||||||
|  * Returns the `returnValue for easy chaining.
 |  * Returns the `returnValue for easy chaining.
 | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export var wtfLeave:<T>(scope: any, returnValue?: T) => T = | export var wtfLeave:<T>(scope: any, returnValue?: T) => T = | ||||||
|     wtfEnabled ? impl.leave : (s: any, r?: any) => r; |     wtfEnabled ? impl.leave : (s: any, r?: any) => r; | ||||||
| @ -67,6 +69,7 @@ export var wtfLeave:<T>(scope: any, returnValue?: T) => T = | |||||||
|  *          wtfEndTimeRange(s); |  *          wtfEndTimeRange(s); | ||||||
|  *        }); |  *        }); | ||||||
|  *     } |  *     } | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export var wtfStartTimeRange: (rangeType: string, action: string) => any = | export var wtfStartTimeRange: (rangeType: string, action: string) => any = | ||||||
|     wtfEnabled ? impl.startTimeRange : (rangeType: string, action: string) => null; |     wtfEnabled ? impl.startTimeRange : (rangeType: string, action: string) => null; | ||||||
| @ -75,6 +78,7 @@ export var wtfStartTimeRange: (rangeType: string, action: string) => any = | |||||||
|  * Ends a async time range operation. |  * Ends a async time range operation. | ||||||
|  * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been |  * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been | ||||||
|  * enabled. |  * enabled. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export var wtfEndTimeRange: (range: any) => void = wtfEnabled ? impl.endTimeRange : (r: any) => | export var wtfEndTimeRange: (range: any) => void = wtfEnabled ? impl.endTimeRange : (r: any) => | ||||||
|                                                                                         null; |                                                                                         null; | ||||||
|  | |||||||
| @ -5,6 +5,9 @@ import {AnimationKeyframe} from '../../src/animation/animation_keyframe'; | |||||||
| import {AnimationPlayer} from '../../src/animation/animation_player'; | import {AnimationPlayer} from '../../src/animation/animation_player'; | ||||||
| import {AnimationStyles} from '../../src/animation/animation_styles'; | import {AnimationStyles} from '../../src/animation/animation_styles'; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export class RenderComponentType { | export class RenderComponentType { | ||||||
|   constructor(public id: string, public templateUrl: string, public slotCount: number, |   constructor(public id: string, public templateUrl: string, public slotCount: number, | ||||||
|               public encapsulation: ViewEncapsulation, public styles: Array<string | any[]>) {} |               public encapsulation: ViewEncapsulation, public styles: Array<string | any[]>) {} | ||||||
| @ -19,6 +22,9 @@ export abstract class RenderDebugInfo { | |||||||
|   get source(): string { return unimplemented(); } |   get source(): string { return unimplemented(); } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @experimental | ||||||
|  |  */ | ||||||
| export abstract class Renderer { | export abstract class Renderer { | ||||||
|   abstract selectRootElement(selectorOrNode: string | any, debugInfo: RenderDebugInfo): any; |   abstract selectRootElement(selectorOrNode: string | any, debugInfo: RenderDebugInfo): any; | ||||||
| 
 | 
 | ||||||
| @ -77,8 +83,8 @@ export abstract class Renderer { | |||||||
|  * If you are implementing a custom renderer, you must implement this interface. |  * If you are implementing a custom renderer, you must implement this interface. | ||||||
|  * |  * | ||||||
|  * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`. |  * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| 
 |  | ||||||
| export abstract class RootRenderer { | export abstract class RootRenderer { | ||||||
|   abstract renderComponent(componentType: RenderComponentType): Renderer; |   abstract renderComponent(componentType: RenderComponentType): Renderer; | ||||||
| } | } | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ import {Injectable} from '../di/decorators'; | |||||||
|  * The Testability service provides testing hooks that can be accessed from |  * The Testability service provides testing hooks that can be accessed from | ||||||
|  * the browser and by services such as Protractor. Each bootstrapped Angular |  * the browser and by services such as Protractor. Each bootstrapped Angular | ||||||
|  * application on the page will have an instance of Testability. |  * application on the page will have an instance of Testability. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| @Injectable() | @Injectable() | ||||||
| export class Testability { | export class Testability { | ||||||
| @ -101,6 +102,7 @@ export class Testability { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * A global registry of {@link Testability} instances for specific elements. |  * A global registry of {@link Testability} instances for specific elements. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| @Injectable() | @Injectable() | ||||||
| export class TestabilityRegistry { | export class TestabilityRegistry { | ||||||
| @ -145,6 +147,7 @@ class _NoopGetTestability implements GetTestability { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Set the {@link GetTestability} implementation used by the Angular testing framework. |  * Set the {@link GetTestability} implementation used by the Angular testing framework. | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export function setTestabilityGetter(getter: GetTestability): void { | export function setTestabilityGetter(getter: GetTestability): void { | ||||||
|   _testabilityGetter = getter; |   _testabilityGetter = getter; | ||||||
|  | |||||||
| @ -206,6 +206,7 @@ function applyParams(fnOrArray: (Function | any[]), key: string): Function { | |||||||
|  *   } |  *   } | ||||||
|  * }); |  * }); | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export function Class(clsDef: ClassDefinition): ConcreteType { | export function Class(clsDef: ClassDefinition): ConcreteType { | ||||||
|   var constructor = applyParams( |   var constructor = applyParams( | ||||||
|  | |||||||
| @ -74,6 +74,7 @@ export {NgZoneError} from './ng_zone_impl'; | |||||||
|  *   } |  *   } | ||||||
|  * } |  * } | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @experimental | ||||||
|  */ |  */ | ||||||
| export class NgZone { | export class NgZone { | ||||||
|   static isInAngularZone(): boolean { return NgZoneImpl.isInAngularZone(); } |   static isInAngularZone(): boolean { return NgZoneImpl.isInAngularZone(); } | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| /** | /** | ||||||
|  * Stores error information; delivered via [NgZone.onError] stream. |  * Stores error information; delivered via [NgZone.onError] stream. | ||||||
|  |  * @deprecated | ||||||
|  */ |  */ | ||||||
| export class NgZoneError { | export class NgZoneError { | ||||||
|   constructor(public error: any, public stackTrace: any) {} |   constructor(public error: any, public stackTrace: any) {} | ||||||
|  | |||||||
| @ -102,6 +102,7 @@ export class ObservableWrapper { | |||||||
|  * https://github.com/jhusain/observable-spec
 |  * https://github.com/jhusain/observable-spec
 | ||||||
|  * |  * | ||||||
|  * Once a reference implementation of the spec is available, switch to it. |  * Once a reference implementation of the spec is available, switch to it. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class EventEmitter<T> extends Subject<T> { | export class EventEmitter<T> extends Subject<T> { | ||||||
|   // TODO: mark this as internal once all the facades are gone
 |   // TODO: mark this as internal once all the facades are gone
 | ||||||
|  | |||||||
| @ -30,6 +30,7 @@ class _ArrayLogger { | |||||||
|  * bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})]) |  * bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})]) | ||||||
|  * |  * | ||||||
|  * ``` |  * ``` | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class ExceptionHandler { | export class ExceptionHandler { | ||||||
|   constructor(private _logger: any, private _rethrowException: boolean = true) {} |   constructor(private _logger: any, private _rethrowException: boolean = true) {} | ||||||
|  | |||||||
| @ -3,6 +3,9 @@ import {ExceptionHandler} from './exception_handler'; | |||||||
| 
 | 
 | ||||||
| export {ExceptionHandler} from './exception_handler'; | export {ExceptionHandler} from './exception_handler'; | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * @stable | ||||||
|  |  */ | ||||||
| export class BaseException extends Error { | export class BaseException extends Error { | ||||||
|   public stack: any; |   public stack: any; | ||||||
|   constructor(public message: string = "--") { |   constructor(public message: string = "--") { | ||||||
| @ -15,6 +18,7 @@ export class BaseException extends Error { | |||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Wraps an exception and provides additional context or information. |  * Wraps an exception and provides additional context or information. | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export class WrappedException extends BaseWrappedException { | export class WrappedException extends BaseWrappedException { | ||||||
|   private _wrapperStack: any; |   private _wrapperStack: any; | ||||||
|  | |||||||
| @ -1,470 +0,0 @@ | |||||||
| "use strict"; |  | ||||||
| var __extends = (this && this.__extends) || function (d, b) { |  | ||||||
|     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; |  | ||||||
|     function __() { this.constructor = d; } |  | ||||||
|     d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |  | ||||||
| }; |  | ||||||
| var globalScope; |  | ||||||
| if (typeof window === 'undefined') { |  | ||||||
|     if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { |  | ||||||
|         // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
 |  | ||||||
|         globalScope = self; |  | ||||||
|     } |  | ||||||
|     else { |  | ||||||
|         globalScope = global; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| else { |  | ||||||
|     globalScope = window; |  | ||||||
| } |  | ||||||
| function scheduleMicroTask(fn) { |  | ||||||
|     Zone.current.scheduleMicroTask('scheduleMicrotask', fn); |  | ||||||
| } |  | ||||||
| exports.scheduleMicroTask = scheduleMicroTask; |  | ||||||
| exports.IS_DART = false; |  | ||||||
| // Need to declare a new variable for global here since TypeScript
 |  | ||||||
| // exports the original value of the symbol.
 |  | ||||||
| var _global = globalScope; |  | ||||||
| exports.global = _global; |  | ||||||
| exports.Type = Function; |  | ||||||
| function getTypeNameForDebugging(type) { |  | ||||||
|     if (type['name']) { |  | ||||||
|         return type['name']; |  | ||||||
|     } |  | ||||||
|     return typeof type; |  | ||||||
| } |  | ||||||
| exports.getTypeNameForDebugging = getTypeNameForDebugging; |  | ||||||
| exports.Math = _global.Math; |  | ||||||
| exports.Date = _global.Date; |  | ||||||
| var _devMode = true; |  | ||||||
| var _modeLocked = false; |  | ||||||
| function lockMode() { |  | ||||||
|     _modeLocked = true; |  | ||||||
| } |  | ||||||
| exports.lockMode = lockMode; |  | ||||||
| /** |  | ||||||
|  * Disable Angular's development mode, which turns off assertions and other |  | ||||||
|  * checks within the framework. |  | ||||||
|  * |  | ||||||
|  * One important assertion this disables verifies that a change detection pass |  | ||||||
|  * does not result in additional changes to any bindings (also known as |  | ||||||
|  * unidirectional data flow). |  | ||||||
|  */ |  | ||||||
| function enableProdMode() { |  | ||||||
|     if (_modeLocked) { |  | ||||||
|         // Cannot use BaseException as that ends up importing from facade/lang.
 |  | ||||||
|         throw 'Cannot enable prod mode after platform setup.'; |  | ||||||
|     } |  | ||||||
|     _devMode = false; |  | ||||||
| } |  | ||||||
| exports.enableProdMode = enableProdMode; |  | ||||||
| function assertionsEnabled() { |  | ||||||
|     return _devMode; |  | ||||||
| } |  | ||||||
| exports.assertionsEnabled = assertionsEnabled; |  | ||||||
| // TODO: remove calls to assert in production environment
 |  | ||||||
| // Note: Can't just export this and import in in other files
 |  | ||||||
| // as `assert` is a reserved keyword in Dart
 |  | ||||||
| _global.assert = function assert(condition) { |  | ||||||
|     // TODO: to be fixed properly via #2830, noop for now
 |  | ||||||
| }; |  | ||||||
| function isPresent(obj) { |  | ||||||
|     return obj !== undefined && obj !== null; |  | ||||||
| } |  | ||||||
| exports.isPresent = isPresent; |  | ||||||
| function isBlank(obj) { |  | ||||||
|     return obj === undefined || obj === null; |  | ||||||
| } |  | ||||||
| exports.isBlank = isBlank; |  | ||||||
| function isBoolean(obj) { |  | ||||||
|     return typeof obj === "boolean"; |  | ||||||
| } |  | ||||||
| exports.isBoolean = isBoolean; |  | ||||||
| function isNumber(obj) { |  | ||||||
|     return typeof obj === "number"; |  | ||||||
| } |  | ||||||
| exports.isNumber = isNumber; |  | ||||||
| function isString(obj) { |  | ||||||
|     return typeof obj === "string"; |  | ||||||
| } |  | ||||||
| exports.isString = isString; |  | ||||||
| function isFunction(obj) { |  | ||||||
|     return typeof obj === "function"; |  | ||||||
| } |  | ||||||
| exports.isFunction = isFunction; |  | ||||||
| function isType(obj) { |  | ||||||
|     return isFunction(obj); |  | ||||||
| } |  | ||||||
| exports.isType = isType; |  | ||||||
| function isStringMap(obj) { |  | ||||||
|     return typeof obj === 'object' && obj !== null; |  | ||||||
| } |  | ||||||
| exports.isStringMap = isStringMap; |  | ||||||
| function isPromise(obj) { |  | ||||||
|     return obj instanceof _global.Promise; |  | ||||||
| } |  | ||||||
| exports.isPromise = isPromise; |  | ||||||
| function isArray(obj) { |  | ||||||
|     return Array.isArray(obj); |  | ||||||
| } |  | ||||||
| exports.isArray = isArray; |  | ||||||
| function isDate(obj) { |  | ||||||
|     return obj instanceof exports.Date && !isNaN(obj.valueOf()); |  | ||||||
| } |  | ||||||
| exports.isDate = isDate; |  | ||||||
| function noop() { } |  | ||||||
| exports.noop = noop; |  | ||||||
| function stringify(token) { |  | ||||||
|     if (typeof token === 'string') { |  | ||||||
|         return token; |  | ||||||
|     } |  | ||||||
|     if (token === undefined || token === null) { |  | ||||||
|         return '' + token; |  | ||||||
|     } |  | ||||||
|     if (token.name) { |  | ||||||
|         return token.name; |  | ||||||
|     } |  | ||||||
|     if (token.overriddenName) { |  | ||||||
|         return token.overriddenName; |  | ||||||
|     } |  | ||||||
|     var res = token.toString(); |  | ||||||
|     var newLineIndex = res.indexOf("\n"); |  | ||||||
|     return (newLineIndex === -1) ? res : res.substring(0, newLineIndex); |  | ||||||
| } |  | ||||||
| exports.stringify = stringify; |  | ||||||
| // serialize / deserialize enum exist only for consistency with dart API
 |  | ||||||
| // enums in typescript don't need to be serialized
 |  | ||||||
| function serializeEnum(val) { |  | ||||||
|     return val; |  | ||||||
| } |  | ||||||
| exports.serializeEnum = serializeEnum; |  | ||||||
| function deserializeEnum(val, values) { |  | ||||||
|     return val; |  | ||||||
| } |  | ||||||
| exports.deserializeEnum = deserializeEnum; |  | ||||||
| function resolveEnumToken(enumValue, val) { |  | ||||||
|     return enumValue[val]; |  | ||||||
| } |  | ||||||
| exports.resolveEnumToken = resolveEnumToken; |  | ||||||
| var StringWrapper = (function () { |  | ||||||
|     function StringWrapper() { |  | ||||||
|     } |  | ||||||
|     StringWrapper.fromCharCode = function (code) { return String.fromCharCode(code); }; |  | ||||||
|     StringWrapper.charCodeAt = function (s, index) { return s.charCodeAt(index); }; |  | ||||||
|     StringWrapper.split = function (s, regExp) { return s.split(regExp); }; |  | ||||||
|     StringWrapper.equals = function (s, s2) { return s === s2; }; |  | ||||||
|     StringWrapper.stripLeft = function (s, charVal) { |  | ||||||
|         if (s && s.length) { |  | ||||||
|             var pos = 0; |  | ||||||
|             for (var i = 0; i < s.length; i++) { |  | ||||||
|                 if (s[i] != charVal) |  | ||||||
|                     break; |  | ||||||
|                 pos++; |  | ||||||
|             } |  | ||||||
|             s = s.substring(pos); |  | ||||||
|         } |  | ||||||
|         return s; |  | ||||||
|     }; |  | ||||||
|     StringWrapper.stripRight = function (s, charVal) { |  | ||||||
|         if (s && s.length) { |  | ||||||
|             var pos = s.length; |  | ||||||
|             for (var i = s.length - 1; i >= 0; i--) { |  | ||||||
|                 if (s[i] != charVal) |  | ||||||
|                     break; |  | ||||||
|                 pos--; |  | ||||||
|             } |  | ||||||
|             s = s.substring(0, pos); |  | ||||||
|         } |  | ||||||
|         return s; |  | ||||||
|     }; |  | ||||||
|     StringWrapper.replace = function (s, from, replace) { |  | ||||||
|         return s.replace(from, replace); |  | ||||||
|     }; |  | ||||||
|     StringWrapper.replaceAll = function (s, from, replace) { |  | ||||||
|         return s.replace(from, replace); |  | ||||||
|     }; |  | ||||||
|     StringWrapper.slice = function (s, from, to) { |  | ||||||
|         if (from === void 0) { from = 0; } |  | ||||||
|         if (to === void 0) { to = null; } |  | ||||||
|         return s.slice(from, to === null ? undefined : to); |  | ||||||
|     }; |  | ||||||
|     StringWrapper.replaceAllMapped = function (s, from, cb) { |  | ||||||
|         return s.replace(from, function () { |  | ||||||
|             var matches = []; |  | ||||||
|             for (var _i = 0; _i < arguments.length; _i++) { |  | ||||||
|                 matches[_i - 0] = arguments[_i]; |  | ||||||
|             } |  | ||||||
|             // Remove offset & string from the result array
 |  | ||||||
|             matches.splice(-2, 2); |  | ||||||
|             // The callback receives match, p1, ..., pn
 |  | ||||||
|             return cb(matches); |  | ||||||
|         }); |  | ||||||
|     }; |  | ||||||
|     StringWrapper.contains = function (s, substr) { return s.indexOf(substr) != -1; }; |  | ||||||
|     StringWrapper.compare = function (a, b) { |  | ||||||
|         if (a < b) { |  | ||||||
|             return -1; |  | ||||||
|         } |  | ||||||
|         else if (a > b) { |  | ||||||
|             return 1; |  | ||||||
|         } |  | ||||||
|         else { |  | ||||||
|             return 0; |  | ||||||
|         } |  | ||||||
|     }; |  | ||||||
|     return StringWrapper; |  | ||||||
| }()); |  | ||||||
| exports.StringWrapper = StringWrapper; |  | ||||||
| var StringJoiner = (function () { |  | ||||||
|     function StringJoiner(parts) { |  | ||||||
|         if (parts === void 0) { parts = []; } |  | ||||||
|         this.parts = parts; |  | ||||||
|     } |  | ||||||
|     StringJoiner.prototype.add = function (part) { this.parts.push(part); }; |  | ||||||
|     StringJoiner.prototype.toString = function () { return this.parts.join(""); }; |  | ||||||
|     return StringJoiner; |  | ||||||
| }()); |  | ||||||
| exports.StringJoiner = StringJoiner; |  | ||||||
| var NumberParseError = (function (_super) { |  | ||||||
|     __extends(NumberParseError, _super); |  | ||||||
|     function NumberParseError(message) { |  | ||||||
|         _super.call(this); |  | ||||||
|         this.message = message; |  | ||||||
|     } |  | ||||||
|     NumberParseError.prototype.toString = function () { return this.message; }; |  | ||||||
|     return NumberParseError; |  | ||||||
| }(Error)); |  | ||||||
| exports.NumberParseError = NumberParseError; |  | ||||||
| var NumberWrapper = (function () { |  | ||||||
|     function NumberWrapper() { |  | ||||||
|     } |  | ||||||
|     NumberWrapper.toFixed = function (n, fractionDigits) { return n.toFixed(fractionDigits); }; |  | ||||||
|     NumberWrapper.equal = function (a, b) { return a === b; }; |  | ||||||
|     NumberWrapper.parseIntAutoRadix = function (text) { |  | ||||||
|         var result = parseInt(text); |  | ||||||
|         if (isNaN(result)) { |  | ||||||
|             throw new NumberParseError("Invalid integer literal when parsing " + text); |  | ||||||
|         } |  | ||||||
|         return result; |  | ||||||
|     }; |  | ||||||
|     NumberWrapper.parseInt = function (text, radix) { |  | ||||||
|         if (radix == 10) { |  | ||||||
|             if (/^(\-|\+)?[0-9]+$/.test(text)) { |  | ||||||
|                 return parseInt(text, radix); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else if (radix == 16) { |  | ||||||
|             if (/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(text)) { |  | ||||||
|                 return parseInt(text, radix); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else { |  | ||||||
|             var result = parseInt(text, radix); |  | ||||||
|             if (!isNaN(result)) { |  | ||||||
|                 return result; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         throw new NumberParseError("Invalid integer literal when parsing " + text + " in base " + |  | ||||||
|             radix); |  | ||||||
|     }; |  | ||||||
|     // TODO: NaN is a valid literal but is returned by parseFloat to indicate an error.
 |  | ||||||
|     NumberWrapper.parseFloat = function (text) { return parseFloat(text); }; |  | ||||||
|     Object.defineProperty(NumberWrapper, "NaN", { |  | ||||||
|         get: function () { return NaN; }, |  | ||||||
|         enumerable: true, |  | ||||||
|         configurable: true |  | ||||||
|     }); |  | ||||||
|     NumberWrapper.isNaN = function (value) { return isNaN(value); }; |  | ||||||
|     NumberWrapper.isInteger = function (value) { return Number.isInteger(value); }; |  | ||||||
|     return NumberWrapper; |  | ||||||
| }()); |  | ||||||
| exports.NumberWrapper = NumberWrapper; |  | ||||||
| exports.RegExp = _global.RegExp; |  | ||||||
| var RegExpWrapper = (function () { |  | ||||||
|     function RegExpWrapper() { |  | ||||||
|     } |  | ||||||
|     RegExpWrapper.create = function (regExpStr, flags) { |  | ||||||
|         if (flags === void 0) { flags = ''; } |  | ||||||
|         flags = flags.replace(/g/g, ''); |  | ||||||
|         return new _global.RegExp(regExpStr, flags + 'g'); |  | ||||||
|     }; |  | ||||||
|     RegExpWrapper.firstMatch = function (regExp, input) { |  | ||||||
|         // Reset multimatch regex state
 |  | ||||||
|         regExp.lastIndex = 0; |  | ||||||
|         return regExp.exec(input); |  | ||||||
|     }; |  | ||||||
|     RegExpWrapper.test = function (regExp, input) { |  | ||||||
|         regExp.lastIndex = 0; |  | ||||||
|         return regExp.test(input); |  | ||||||
|     }; |  | ||||||
|     RegExpWrapper.matcher = function (regExp, input) { |  | ||||||
|         // Reset regex state for the case
 |  | ||||||
|         // someone did not loop over all matches
 |  | ||||||
|         // last time.
 |  | ||||||
|         regExp.lastIndex = 0; |  | ||||||
|         return { re: regExp, input: input }; |  | ||||||
|     }; |  | ||||||
|     RegExpWrapper.replaceAll = function (regExp, input, replace) { |  | ||||||
|         var c = regExp.exec(input); |  | ||||||
|         var res = ''; |  | ||||||
|         regExp.lastIndex = 0; |  | ||||||
|         var prev = 0; |  | ||||||
|         while (c) { |  | ||||||
|             res += input.substring(prev, c.index); |  | ||||||
|             res += replace(c); |  | ||||||
|             prev = c.index + c[0].length; |  | ||||||
|             regExp.lastIndex = prev; |  | ||||||
|             c = regExp.exec(input); |  | ||||||
|         } |  | ||||||
|         res += input.substring(prev); |  | ||||||
|         return res; |  | ||||||
|     }; |  | ||||||
|     return RegExpWrapper; |  | ||||||
| }()); |  | ||||||
| exports.RegExpWrapper = RegExpWrapper; |  | ||||||
| var RegExpMatcherWrapper = (function () { |  | ||||||
|     function RegExpMatcherWrapper() { |  | ||||||
|     } |  | ||||||
|     RegExpMatcherWrapper.next = function (matcher) { |  | ||||||
|         return matcher.re.exec(matcher.input); |  | ||||||
|     }; |  | ||||||
|     return RegExpMatcherWrapper; |  | ||||||
| }()); |  | ||||||
| exports.RegExpMatcherWrapper = RegExpMatcherWrapper; |  | ||||||
| var FunctionWrapper = (function () { |  | ||||||
|     function FunctionWrapper() { |  | ||||||
|     } |  | ||||||
|     FunctionWrapper.apply = function (fn, posArgs) { return fn.apply(null, posArgs); }; |  | ||||||
|     return FunctionWrapper; |  | ||||||
| }()); |  | ||||||
| exports.FunctionWrapper = FunctionWrapper; |  | ||||||
| // JS has NaN !== NaN
 |  | ||||||
| function looseIdentical(a, b) { |  | ||||||
|     return a === b || typeof a === "number" && typeof b === "number" && isNaN(a) && isNaN(b); |  | ||||||
| } |  | ||||||
| exports.looseIdentical = looseIdentical; |  | ||||||
| // JS considers NaN is the same as NaN for map Key (while NaN !== NaN otherwise)
 |  | ||||||
| // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
 |  | ||||||
| function getMapKey(value) { |  | ||||||
|     return value; |  | ||||||
| } |  | ||||||
| exports.getMapKey = getMapKey; |  | ||||||
| function normalizeBlank(obj) { |  | ||||||
|     return isBlank(obj) ? null : obj; |  | ||||||
| } |  | ||||||
| exports.normalizeBlank = normalizeBlank; |  | ||||||
| function normalizeBool(obj) { |  | ||||||
|     return isBlank(obj) ? false : obj; |  | ||||||
| } |  | ||||||
| exports.normalizeBool = normalizeBool; |  | ||||||
| function isJsObject(o) { |  | ||||||
|     return o !== null && (typeof o === "function" || typeof o === "object"); |  | ||||||
| } |  | ||||||
| exports.isJsObject = isJsObject; |  | ||||||
| function print(obj) { |  | ||||||
|     console.log(obj); |  | ||||||
| } |  | ||||||
| exports.print = print; |  | ||||||
| // Can't be all uppercase as our transpiler would think it is a special directive...
 |  | ||||||
| var Json = (function () { |  | ||||||
|     function Json() { |  | ||||||
|     } |  | ||||||
|     Json.parse = function (s) { return _global.JSON.parse(s); }; |  | ||||||
|     Json.stringify = function (data) { |  | ||||||
|         // Dart doesn't take 3 arguments
 |  | ||||||
|         return _global.JSON.stringify(data, null, 2); |  | ||||||
|     }; |  | ||||||
|     return Json; |  | ||||||
| }()); |  | ||||||
| exports.Json = Json; |  | ||||||
| var DateWrapper = (function () { |  | ||||||
|     function DateWrapper() { |  | ||||||
|     } |  | ||||||
|     DateWrapper.create = function (year, month, day, hour, minutes, seconds, milliseconds) { |  | ||||||
|         if (month === void 0) { month = 1; } |  | ||||||
|         if (day === void 0) { day = 1; } |  | ||||||
|         if (hour === void 0) { hour = 0; } |  | ||||||
|         if (minutes === void 0) { minutes = 0; } |  | ||||||
|         if (seconds === void 0) { seconds = 0; } |  | ||||||
|         if (milliseconds === void 0) { milliseconds = 0; } |  | ||||||
|         return new exports.Date(year, month - 1, day, hour, minutes, seconds, milliseconds); |  | ||||||
|     }; |  | ||||||
|     DateWrapper.fromISOString = function (str) { return new exports.Date(str); }; |  | ||||||
|     DateWrapper.fromMillis = function (ms) { return new exports.Date(ms); }; |  | ||||||
|     DateWrapper.toMillis = function (date) { return date.getTime(); }; |  | ||||||
|     DateWrapper.now = function () { return new exports.Date(); }; |  | ||||||
|     DateWrapper.toJson = function (date) { return date.toJSON(); }; |  | ||||||
|     return DateWrapper; |  | ||||||
| }()); |  | ||||||
| exports.DateWrapper = DateWrapper; |  | ||||||
| function setValueOnPath(global, path, value) { |  | ||||||
|     var parts = path.split('.'); |  | ||||||
|     var obj = global; |  | ||||||
|     while (parts.length > 1) { |  | ||||||
|         var name = parts.shift(); |  | ||||||
|         if (obj.hasOwnProperty(name) && isPresent(obj[name])) { |  | ||||||
|             obj = obj[name]; |  | ||||||
|         } |  | ||||||
|         else { |  | ||||||
|             obj = obj[name] = {}; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|     if (obj === undefined || obj === null) { |  | ||||||
|         obj = {}; |  | ||||||
|     } |  | ||||||
|     obj[parts.shift()] = value; |  | ||||||
| } |  | ||||||
| exports.setValueOnPath = setValueOnPath; |  | ||||||
| var _symbolIterator = null; |  | ||||||
| function getSymbolIterator() { |  | ||||||
|     if (isBlank(_symbolIterator)) { |  | ||||||
|         if (isPresent(Symbol) && isPresent(Symbol.iterator)) { |  | ||||||
|             _symbolIterator = Symbol.iterator; |  | ||||||
|         } |  | ||||||
|         else { |  | ||||||
|             // es6-shim specific logic
 |  | ||||||
|             var keys = Object.getOwnPropertyNames(Map.prototype); |  | ||||||
|             for (var i = 0; i < keys.length; ++i) { |  | ||||||
|                 var key = keys[i]; |  | ||||||
|                 if (key !== 'entries' && key !== 'size' && |  | ||||||
|                     Map.prototype[key] === Map.prototype['entries']) { |  | ||||||
|                     _symbolIterator = key; |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|     return _symbolIterator; |  | ||||||
| } |  | ||||||
| exports.getSymbolIterator = getSymbolIterator; |  | ||||||
| function evalExpression(sourceUrl, expr, declarations, vars) { |  | ||||||
|     var fnBody = declarations + "\nreturn " + expr + "\n//# sourceURL=" + sourceUrl; |  | ||||||
|     var fnArgNames = []; |  | ||||||
|     var fnArgValues = []; |  | ||||||
|     for (var argName in vars) { |  | ||||||
|         fnArgNames.push(argName); |  | ||||||
|         fnArgValues.push(vars[argName]); |  | ||||||
|     } |  | ||||||
|     return new (Function.bind.apply(Function, [void 0].concat(fnArgNames.concat(fnBody))))().apply(void 0, fnArgValues); |  | ||||||
| } |  | ||||||
| exports.evalExpression = evalExpression; |  | ||||||
| function isPrimitive(obj) { |  | ||||||
|     return !isJsObject(obj); |  | ||||||
| } |  | ||||||
| exports.isPrimitive = isPrimitive; |  | ||||||
| function hasConstructor(value, type) { |  | ||||||
|     return value.constructor === type; |  | ||||||
| } |  | ||||||
| exports.hasConstructor = hasConstructor; |  | ||||||
| function bitWiseOr(values) { |  | ||||||
|     return values.reduce(function (a, b) { return a | b; }); |  | ||||||
| } |  | ||||||
| exports.bitWiseOr = bitWiseOr; |  | ||||||
| function bitWiseAnd(values) { |  | ||||||
|     return values.reduce(function (a, b) { return a & b; }); |  | ||||||
| } |  | ||||||
| exports.bitWiseAnd = bitWiseAnd; |  | ||||||
| function escape(s) { |  | ||||||
|     return _global.encodeURI(s); |  | ||||||
| } |  | ||||||
| exports.escape = escape; |  | ||||||
| //# sourceMappingURL=lang.js.map
 |  | ||||||
| @ -91,6 +91,7 @@ export function lockMode() { | |||||||
|  * One important assertion this disables verifies that a change detection pass |  * One important assertion this disables verifies that a change detection pass | ||||||
|  * does not result in additional changes to any bindings (also known as |  * does not result in additional changes to any bindings (also known as | ||||||
|  * unidirectional data flow). |  * unidirectional data flow). | ||||||
|  |  * @stable | ||||||
|  */ |  */ | ||||||
| export function enableProdMode() { | export function enableProdMode() { | ||||||
|   if (_modeLocked) { |   if (_modeLocked) { | ||||||
|  | |||||||
| @ -165,6 +165,7 @@ var COMPILER_TESTING: string[] = [ | |||||||
|   'TestComponentRenderer' |   'TestComponentRenderer' | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
|  | // API Classification audited
 | ||||||
| var CORE: string[] = [ | var CORE: string[] = [ | ||||||
|   '__core_private__', |   '__core_private__', | ||||||
|   'BaseException', |   'BaseException', | ||||||
| @ -176,7 +177,6 @@ var CORE: string[] = [ | |||||||
|   'wtfStartTimeRange', |   'wtfStartTimeRange', | ||||||
|   'APP_INITIALIZER', |   'APP_INITIALIZER', | ||||||
|   'APP_ID', |   'APP_ID', | ||||||
|   'AngularEntrypoint:dart', |  | ||||||
|   'AbstractProviderError', |   'AbstractProviderError', | ||||||
|   'AUTO_STYLE', |   'AUTO_STYLE', | ||||||
|   'AnimationAnimateMetadata', |   'AnimationAnimateMetadata', | ||||||
| @ -210,7 +210,7 @@ var CORE: string[] = [ | |||||||
|   "CollectionChangeRecord", |   "CollectionChangeRecord", | ||||||
|   'ChangeDetectionStrategy', |   'ChangeDetectionStrategy', | ||||||
|   'ChangeDetectorRef', |   'ChangeDetectorRef', | ||||||
|   'Class:js', |   'Class', | ||||||
|   'ComponentResolver', |   'ComponentResolver', | ||||||
|   'SystemJsComponentResolver', |   'SystemJsComponentResolver', | ||||||
|   'Component', |   'Component', | ||||||
| @ -224,8 +224,6 @@ var CORE: string[] = [ | |||||||
|   'PLATFORM_PIPES', |   'PLATFORM_PIPES', | ||||||
|   'DebugNode', |   'DebugNode', | ||||||
|   'DebugElement', |   'DebugElement', | ||||||
|   'ReflectiveDependency', |  | ||||||
|   'DependencyMetadata', |  | ||||||
|   'Directive', |   'Directive', | ||||||
|   'DirectiveMetadata', |   'DirectiveMetadata', | ||||||
|   'DynamicComponentLoader', |   'DynamicComponentLoader', | ||||||
| @ -275,8 +273,6 @@ var CORE: string[] = [ | |||||||
|   'Renderer', |   'Renderer', | ||||||
|   'RootRenderer', |   'RootRenderer', | ||||||
|   'RenderComponentType', |   'RenderComponentType', | ||||||
|   'ResolvedReflectiveBinding:dart', |  | ||||||
|   'ResolvedReflectiveProvider:dart', |  | ||||||
|   'ResolvedReflectiveFactory', |   'ResolvedReflectiveFactory', | ||||||
|   'Self', |   'Self', | ||||||
|   'SelfMetadata', |   'SelfMetadata', | ||||||
| @ -286,20 +282,9 @@ var CORE: string[] = [ | |||||||
|   'TemplateRef', |   'TemplateRef', | ||||||
|   'Testability', |   'Testability', | ||||||
|   'TestabilityRegistry', |   'TestabilityRegistry', | ||||||
|   'GetTestability:dart', |  | ||||||
|   'setTestabilityGetter', |   'setTestabilityGetter', | ||||||
|   'Type', |   'Type', | ||||||
|   'PACKAGE_ROOT_URL', |   'PACKAGE_ROOT_URL', | ||||||
|   'View:dart', |  | ||||||
|   /* |  | ||||||
|   'View.directives:dart', |  | ||||||
|   'View.encapsulation:dart', |  | ||||||
|   'View.pipes:dart', |  | ||||||
|   'View.styleUrls:dart', |  | ||||||
|   'View.styles:dart', |  | ||||||
|   'View.template:dart', |  | ||||||
|   'View.templateUrl:dart', |  | ||||||
|   */ |  | ||||||
|   'ViewChild', |   'ViewChild', | ||||||
|   'ViewChildMetadata', |   'ViewChildMetadata', | ||||||
|   'ViewChildren', |   'ViewChildren', | ||||||
| @ -315,14 +300,14 @@ var CORE: string[] = [ | |||||||
|   'bind', |   'bind', | ||||||
|   'provide', |   'provide', | ||||||
|   'createNgZone', |   'createNgZone', | ||||||
|   'forwardRef:js', |   'forwardRef', | ||||||
|   'coreBootstrap', |   'coreBootstrap', | ||||||
|   'coreLoadAndBootstrap', |   'coreLoadAndBootstrap', | ||||||
|   'createPlatform', |   'createPlatform', | ||||||
|   'disposePlatform', |   'disposePlatform', | ||||||
|   'getPlatform', |   'getPlatform', | ||||||
|   'assertPlatform', |   'assertPlatform', | ||||||
|   'resolveForwardRef:js', |   'resolveForwardRef', | ||||||
|   'PLATFORM_COMMON_PROVIDERS', |   'PLATFORM_COMMON_PROVIDERS', | ||||||
|   'PLATFORM_INITIALIZER', |   'PLATFORM_INITIALIZER', | ||||||
|   'AfterContentChecked', |   'AfterContentChecked', | ||||||
| @ -330,25 +315,10 @@ var CORE: string[] = [ | |||||||
|   'AfterViewChecked', |   'AfterViewChecked', | ||||||
|   'AfterViewInit', |   'AfterViewInit', | ||||||
|   'DoCheck', |   'DoCheck', | ||||||
|   'IterableDifferFactory:dart', |  | ||||||
|   'IterableDiffer:dart', |  | ||||||
|   'KeyValueDifferFactory:dart', |  | ||||||
|   'KeyValueDiffer:dart', |  | ||||||
|   'OnChanges', |   'OnChanges', | ||||||
|   'OnDestroy', |   'OnDestroy', | ||||||
|   'OnInit', |   'OnInit', | ||||||
|   'PipeTransform:dart', |  | ||||||
|   'reflector', |  | ||||||
|   'Stream:dart', |  | ||||||
|   'GetterFn:dart', |  | ||||||
|   'MethodFn:dart', |  | ||||||
|   'NoReflectionCapabilities:dart', |  | ||||||
|   'PlatformReflectionCapabilities:dart', |  | ||||||
|   'ReflectionInfo', |  | ||||||
|   'Reflector', |  | ||||||
|   'SetterFn:dart', |  | ||||||
|   'ViewRef', |   'ViewRef', | ||||||
|   'TrackByFn:dart' |  | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
| var CORE_TESTING: string[] = [ | var CORE_TESTING: string[] = [ | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ export var SecurityContext: typeof t.SecurityContext = r.SecurityContext; | |||||||
| export type SecurityContext = t.SecurityContext; | export type SecurityContext = t.SecurityContext; | ||||||
| export var SanitizationService: typeof t.SanitizationService = r.SanitizationService; | export var SanitizationService: typeof t.SanitizationService = r.SanitizationService; | ||||||
| export type SanitizationService = t.SanitizationService; | export type SanitizationService = t.SanitizationService; | ||||||
|  | export var reflector: typeof t.reflector = r.reflector; | ||||||
| 
 | 
 | ||||||
| export type NoOpAnimationPlayer = t.NoOpAnimationPlayer; | export type NoOpAnimationPlayer = t.NoOpAnimationPlayer; | ||||||
| export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer; | export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer; | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
| import {__core_private__} from '@angular/core'; | import {__core_private__ as _} from '@angular/core'; | ||||||
| 
 | 
 | ||||||
| export var makeDecorator: typeof __core_private__.makeDecorator = __core_private__.makeDecorator; | export var makeDecorator: typeof _.makeDecorator = _.makeDecorator; | ||||||
|  | export var reflector: typeof _.reflector = _.reflector; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import {Type} from '@angular/core'; | import {Type} from '@angular/core'; | ||||||
| import {RouteLifecycleHook, CanActivate} from './lifecycle_annotations_impl'; | import {RouteLifecycleHook, CanActivate} from './lifecycle_annotations_impl'; | ||||||
| import {reflector} from '@angular/core'; | import {reflector} from '../../core_private'; | ||||||
| 
 | 
 | ||||||
| export function hasLifecycleHook(e: RouteLifecycleHook, type): boolean { | export function hasLifecycleHook(e: RouteLifecycleHook, type): boolean { | ||||||
|   if (!(type instanceof Type)) return false; |   if (!(type instanceof Type)) return false; | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ import { | |||||||
|   getTypeNameForDebugging, |   getTypeNameForDebugging, | ||||||
| } from '../src/facade/lang'; | } from '../src/facade/lang'; | ||||||
| import {BaseException} from '../src/facade/exceptions'; | import {BaseException} from '../src/facade/exceptions'; | ||||||
| import {Injectable, Inject, OpaqueToken, reflector} from '@angular/core'; | import {Injectable, Inject, OpaqueToken} from '@angular/core'; | ||||||
| import {RouteConfig, Route, AuxRoute, RouteDefinition} from './route_config/route_config_impl'; | import {RouteConfig, Route, AuxRoute, RouteDefinition} from './route_config/route_config_impl'; | ||||||
| import {PathMatch, RedirectMatch, RouteMatch} from './rules/rules'; | import {PathMatch, RedirectMatch, RouteMatch} from './rules/rules'; | ||||||
| import {RuleSet} from './rules/rule_set'; | import {RuleSet} from './rules/rule_set'; | ||||||
| @ -27,6 +27,7 @@ import { | |||||||
| import {normalizeRouteConfig, assertComponentExists} from './route_config/route_config_normalizer'; | import {normalizeRouteConfig, assertComponentExists} from './route_config/route_config_normalizer'; | ||||||
| import {parser, Url, convertUrlParamsToArray} from './url_parser'; | import {parser, Url, convertUrlParamsToArray} from './url_parser'; | ||||||
| import {GeneratedUrl} from './rules/route_paths/route_path'; | import {GeneratedUrl} from './rules/route_paths/route_path'; | ||||||
|  | import {reflector} from '../core_private'; | ||||||
| 
 | 
 | ||||||
| var _resolveToNull = PromiseWrapper.resolve<Instruction>(null); | var _resolveToNull = PromiseWrapper.resolve<Instruction>(null); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
| import {__core_private__} from '@angular/core'; | import {__core_private__ as _} from '@angular/core'; | ||||||
| 
 | 
 | ||||||
| export var makeDecorator: typeof __core_private__.makeDecorator = __core_private__.makeDecorator; | export var makeDecorator: typeof _.makeDecorator = _.makeDecorator; | ||||||
|  | export var reflector: typeof _.reflector = _.reflector; | ||||||
|  | |||||||
| @ -1,21 +1,6 @@ | |||||||
| import { | import {Directive, HostListener, HostBinding, Input, OnDestroy} from '@angular/core'; | ||||||
|   ResolvedReflectiveProvider, | import {Router} from '../router'; | ||||||
|   Directive, | import {RouteSegment} from '../segments'; | ||||||
|   DynamicComponentLoader, |  | ||||||
|   ViewContainerRef, |  | ||||||
|   Attribute, |  | ||||||
|   ComponentRef, |  | ||||||
|   ComponentFactory, |  | ||||||
|   ReflectiveInjector, |  | ||||||
|   OnInit, |  | ||||||
|   HostListener, |  | ||||||
|   HostBinding, |  | ||||||
|   Input, |  | ||||||
|   OnDestroy, |  | ||||||
|   Optional |  | ||||||
| } from '@angular/core'; |  | ||||||
| import {RouterOutletMap, Router} from '../router'; |  | ||||||
| import {RouteSegment, UrlSegment, Tree} from '../segments'; |  | ||||||
| import {isString, isArray, isPresent} from '../facade/lang'; | import {isString, isArray, isPresent} from '../facade/lang'; | ||||||
| import {ObservableWrapper} from '../facade/async'; | import {ObservableWrapper} from '../facade/async'; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,13 +1,11 @@ | |||||||
| import { | import { | ||||||
|   ResolvedReflectiveProvider, |   ResolvedReflectiveProvider, | ||||||
|   Directive, |   Directive, | ||||||
|   DynamicComponentLoader, |  | ||||||
|   ViewContainerRef, |   ViewContainerRef, | ||||||
|   Attribute, |   Attribute, | ||||||
|   ComponentRef, |   ComponentRef, | ||||||
|   ComponentFactory, |   ComponentFactory, | ||||||
|   ReflectiveInjector, |   ReflectiveInjector | ||||||
|   OnInit |  | ||||||
| } from '@angular/core'; | } from '@angular/core'; | ||||||
| import {RouterOutletMap} from '../router'; | import {RouterOutletMap} from '../router'; | ||||||
| import {DEFAULT_OUTLET_NAME} from '../constants'; | import {DEFAULT_OUTLET_NAME} from '../constants'; | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ import {PromiseWrapper} from './facade/promise'; | |||||||
| import {BaseException, ComponentFactory} from '@angular/core'; | import {BaseException, ComponentFactory} from '@angular/core'; | ||||||
| import {ComponentResolver} from '@angular/core'; | import {ComponentResolver} from '@angular/core'; | ||||||
| import {DEFAULT_OUTLET_NAME} from './constants'; | import {DEFAULT_OUTLET_NAME} from './constants'; | ||||||
| import {reflector} from '@angular/core'; | import {reflector} from './core_private'; | ||||||
| 
 | 
 | ||||||
| export function recognize(componentResolver: ComponentResolver, rootComponent: Type, url: UrlTree, | export function recognize(componentResolver: ComponentResolver, rootComponent: Type, url: UrlTree, | ||||||
|                           existingTree: RouteTree): Promise<RouteTree> { |                           existingTree: RouteTree): Promise<RouteTree> { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user