
committed by
Alex Rickabaugh

parent
0918adf39d
commit
3903e5ebe7
@ -13,11 +13,15 @@ import {Inject, Injectable, InjectionToken, Optional} from './di';
|
||||
|
||||
/**
|
||||
* A function that will be executed when an application is initialized.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');
|
||||
|
||||
/**
|
||||
* A class that reflects the state of running {@link APP_INITIALIZER}s.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class ApplicationInitStatus {
|
||||
|
@ -171,6 +171,8 @@ export interface BootstrapOptions {
|
||||
*
|
||||
* A page's platform is initialized implicitly when a platform is created via a platform factory
|
||||
* (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class PlatformRef {
|
||||
@ -202,8 +204,6 @@ export class PlatformRef {
|
||||
*
|
||||
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):
|
||||
Promise<NgModuleRef<M>> {
|
||||
@ -346,6 +346,8 @@ function optionsReducer<T extends Object>(dst: any, objs: T | T[]): T {
|
||||
|
||||
/**
|
||||
* A reference to an Angular application running on a page.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class ApplicationRef {
|
||||
|
@ -42,6 +42,7 @@ export function devModeEqual(a: any, b: any): boolean {
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class WrappedValue {
|
||||
/** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
|
||||
@ -65,6 +66,7 @@ export class WrappedValue {
|
||||
/**
|
||||
* Represents a basic change from a previous to a new value.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class SimpleChange {
|
||||
constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}
|
||||
|
@ -48,6 +48,7 @@ import {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../rend
|
||||
*
|
||||
* <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ChangeDetectorRef {
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@
|
||||
* The strategy that the default change detector uses to detect changes.
|
||||
* When set, takes effect the next time change detection is triggered.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export enum ChangeDetectionStrategy {
|
||||
/**
|
||||
@ -74,7 +75,7 @@ export enum ChangeDetectorStatus {
|
||||
* @param changeDetectionStrategy The strategy to check.
|
||||
* @returns True if the given strategy is the current default, false otherwise.
|
||||
* @see `ChangeDetectorStatus`
|
||||
* @see `ChangeDetectorRef`
|
||||
* @see `ChangeDetectorRef`
|
||||
*/
|
||||
export function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):
|
||||
boolean {
|
||||
|
@ -24,6 +24,7 @@ const trackByIdentity = (index: number, item: any) => item;
|
||||
|
||||
/**
|
||||
* @deprecated v4.0.0 - Should not be part of public API.
|
||||
* @publicApi
|
||||
*/
|
||||
export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
||||
public readonly length: number = 0;
|
||||
|
@ -15,7 +15,7 @@ import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
|
||||
/**
|
||||
* A type describing supported iterable types.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export type NgIterable<T> = Array<T>| Iterable<T>;
|
||||
|
||||
@ -23,7 +23,7 @@ export type NgIterable<T> = Array<T>| Iterable<T>;
|
||||
* A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
|
||||
* respond to changes in an iterable by effecting equivalent changes in the DOM.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface IterableDiffer<V> {
|
||||
/**
|
||||
@ -40,7 +40,7 @@ export interface IterableDiffer<V> {
|
||||
* An object describing the changes in the `Iterable` collection since last time
|
||||
* `IterableDiffer#diff()` was invoked.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface IterableChanges<V> {
|
||||
/**
|
||||
@ -93,7 +93,7 @@ export interface IterableChanges<V> {
|
||||
/**
|
||||
* Record representing the item change information.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface IterableChangeRecord<V> {
|
||||
/** Current index of the item in `Iterable` or null if removed. */
|
||||
@ -111,6 +111,7 @@ export interface IterableChangeRecord<V> {
|
||||
|
||||
/**
|
||||
* @deprecated v4.0.0 - Use IterableChangeRecord instead.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}
|
||||
|
||||
@ -118,14 +119,14 @@ export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}
|
||||
* An optional function passed into {@link NgForOf} that defines how to track
|
||||
* items in an iterable (e.g. fby index or id)
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface TrackByFunction<T> { (index: number, item: T): any; }
|
||||
|
||||
/**
|
||||
* Provides a factory for {@link IterableDiffer}.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface IterableDifferFactory {
|
||||
supports(objects: any): boolean;
|
||||
@ -135,6 +136,7 @@ export interface IterableDifferFactory {
|
||||
/**
|
||||
* A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class IterableDiffers {
|
||||
static ngInjectableDef = defineInjectable({
|
||||
|
@ -12,7 +12,7 @@ import {Optional, SkipSelf, StaticProvider} from '../../di';
|
||||
/**
|
||||
* A differ that tracks changes made to an object over time.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface KeyValueDiffer<K, V> {
|
||||
/**
|
||||
@ -40,7 +40,7 @@ export interface KeyValueDiffer<K, V> {
|
||||
* An object describing the changes in the `Map` or `{[k:string]: string}` since last time
|
||||
* `KeyValueDiffer#diff()` was invoked.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface KeyValueChanges<K, V> {
|
||||
/**
|
||||
@ -74,7 +74,7 @@ export interface KeyValueChanges<K, V> {
|
||||
/**
|
||||
* Record representing the item change information.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface KeyValueChangeRecord<K, V> {
|
||||
/**
|
||||
@ -96,7 +96,7 @@ export interface KeyValueChangeRecord<K, V> {
|
||||
/**
|
||||
* Provides a factory for {@link KeyValueDiffer}.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface KeyValueDifferFactory {
|
||||
/**
|
||||
@ -113,6 +113,7 @@ export interface KeyValueDifferFactory {
|
||||
/**
|
||||
* A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class KeyValueDiffers {
|
||||
/**
|
||||
|
@ -30,6 +30,6 @@
|
||||
*
|
||||
* Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface PipeTransform { transform(value: any, ...args: any[]): any; }
|
||||
|
@ -25,6 +25,8 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
|
||||
|
||||
/**
|
||||
* Type of the Injectable decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InjectableDecorator {
|
||||
/**
|
||||
@ -57,10 +59,11 @@ export interface InjectableDecorator {
|
||||
export interface Injectable { providedIn?: Type<any>|'root'|null; }
|
||||
|
||||
/**
|
||||
* Injectable decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
*/
|
||||
* Injectable decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Injectable: InjectableDecorator = makeDecorator(
|
||||
'Injectable', undefined, undefined, undefined,
|
||||
(type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));
|
||||
|
@ -47,6 +47,8 @@ import {defineInjectable} from './defs';
|
||||
*
|
||||
* {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class InjectionToken<T> {
|
||||
/** @internal */
|
||||
|
@ -57,7 +57,7 @@ export class NullInjector implements Injector {
|
||||
*
|
||||
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class Injector {
|
||||
static THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
|
||||
@ -399,6 +399,8 @@ function staticError(text: string, obj: any): Error {
|
||||
|
||||
/**
|
||||
* Injection flags for DI.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const enum InjectFlags {
|
||||
Default = 0b0000,
|
||||
|
@ -15,6 +15,8 @@ import {EMPTY_ARRAY} from '../view/util';
|
||||
|
||||
/**
|
||||
* Type of the Inject decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InjectDecorator {
|
||||
/**
|
||||
@ -40,6 +42,8 @@ export interface InjectDecorator {
|
||||
|
||||
/**
|
||||
* Type of the Inject metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Inject {
|
||||
/**
|
||||
@ -52,19 +56,22 @@ export interface Inject {
|
||||
* Inject decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token}));
|
||||
|
||||
|
||||
/**
|
||||
* Type of the Optional decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OptionalDecorator {
|
||||
/**
|
||||
* A constructor parameter decorator that marks a dependency as optional.
|
||||
*
|
||||
* The DI framework provides null if the dependency is not found.
|
||||
* For example, the following code allows the possibility of a null result:
|
||||
* For example, the following code allows the possibility of a null result:
|
||||
*
|
||||
* {@example core/di/ts/metadata_spec.ts region='Optional'}
|
||||
*
|
||||
@ -76,6 +83,8 @@ export interface OptionalDecorator {
|
||||
|
||||
/**
|
||||
* Type of the Optional metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Optional {}
|
||||
|
||||
@ -83,11 +92,14 @@ export interface Optional {}
|
||||
* Optional decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Optional: OptionalDecorator = makeParamDecorator('Optional');
|
||||
|
||||
/**
|
||||
* Type of the Self decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface SelfDecorator {
|
||||
/**
|
||||
@ -110,6 +122,8 @@ export interface SelfDecorator {
|
||||
|
||||
/**
|
||||
* Type of the Self metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Self {}
|
||||
|
||||
@ -117,12 +131,15 @@ export interface Self {}
|
||||
* Self decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Self: SelfDecorator = makeParamDecorator('Self');
|
||||
|
||||
|
||||
/**
|
||||
* Type of the SkipSelf decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface SkipSelfDecorator {
|
||||
/**
|
||||
@ -145,7 +162,7 @@ export interface SkipSelfDecorator {
|
||||
/**
|
||||
* Type of the SkipSelf metadata.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface SkipSelf {}
|
||||
|
||||
@ -153,11 +170,14 @@ export interface SkipSelf {}
|
||||
* SkipSelf decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');
|
||||
|
||||
/**
|
||||
* Type of the Host decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HostDecorator {
|
||||
/**
|
||||
@ -167,7 +187,7 @@ export interface HostDecorator {
|
||||
*
|
||||
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
||||
*
|
||||
* @usageNotes
|
||||
* @usageNotes
|
||||
*
|
||||
* {@example core/di/ts/metadata_spec.ts region='Host'}
|
||||
*/
|
||||
@ -177,6 +197,8 @@ export interface HostDecorator {
|
||||
|
||||
/**
|
||||
* Type of the Host metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Host {}
|
||||
|
||||
@ -184,5 +206,6 @@ export interface Host {}
|
||||
* Host decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Host: HostDecorator = makeParamDecorator('Host');
|
||||
|
@ -40,6 +40,8 @@ export interface ValueSansProvider {
|
||||
* ### Multi-value example
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ValueProvider extends ValueSansProvider {
|
||||
/**
|
||||
@ -191,6 +193,8 @@ export interface ExistingSansProvider {
|
||||
* ### Multi-value example
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ExistingProvider extends ExistingSansProvider {
|
||||
/**
|
||||
@ -248,6 +252,8 @@ export interface FactorySansProvider {
|
||||
* ### Multi-value example
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface FactoryProvider extends FactorySansProvider {
|
||||
/**
|
||||
@ -270,6 +276,8 @@ export interface FactoryProvider extends FactorySansProvider {
|
||||
* @see `ValueProvider`
|
||||
* @see `ExistingProvider`
|
||||
* @see `FactoryProvider`
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider |
|
||||
ConstructorProvider | FactoryProvider | any[];
|
||||
@ -287,6 +295,8 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='TypeProvider'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface TypeProvider extends Type<any> {}
|
||||
|
||||
@ -326,6 +336,8 @@ export interface ClassSansProvider {
|
||||
* ### Multi-value example
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ClassProvider extends ClassSansProvider {
|
||||
/**
|
||||
@ -348,6 +360,8 @@ export interface ClassProvider extends ClassSansProvider {
|
||||
* @see `TypeProvider`
|
||||
* @see `ClassProvider`
|
||||
* @see `StaticProvider`
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider |
|
||||
ExistingProvider | FactoryProvider | any[];
|
||||
|
@ -51,6 +51,7 @@ const UNDEFINED = new Object();
|
||||
* resolve all of the object's dependencies automatically.
|
||||
*
|
||||
* @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ReflectiveInjector implements Injector {
|
||||
/**
|
||||
@ -140,7 +141,6 @@ export abstract class ReflectiveInjector implements Injector {
|
||||
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
||||
* expect(injector.get(Car) instanceof Car).toBe(true);
|
||||
* ```
|
||||
* @publicApi
|
||||
*/
|
||||
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):
|
||||
ReflectiveInjector {
|
||||
|
@ -24,7 +24,9 @@ import {resolveForwardRef} from './forward_ref';
|
||||
* `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
|
||||
* resolving
|
||||
* providers.
|
||||
*
|
||||
* @deprecated No replacement
|
||||
* @publicApi
|
||||
*/
|
||||
export class ReflectiveKey {
|
||||
public readonly displayName: string;
|
||||
|
@ -32,6 +32,8 @@ import {ERROR_ORIGINAL_ERROR, getDebugContext, getErrorLogger, getOriginalError}
|
||||
* })
|
||||
* class MyModule {}
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class ErrorHandler {
|
||||
/**
|
||||
|
@ -59,6 +59,7 @@ import {Subject, Subscription} from 'rxjs';
|
||||
*
|
||||
* Once a reference implementation of the spec is available, switch to it.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class EventEmitter<T> extends Subject<T> {
|
||||
// TODO: mark this as internal once all the facades are gone
|
||||
|
@ -37,6 +37,8 @@ export function isDevMode(): boolean {
|
||||
* 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).
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function enableProdMode(): void {
|
||||
if (_runModeLocked) {
|
||||
|
@ -43,6 +43,7 @@ function _throwError() {
|
||||
* that will use the directives/pipes of the ng module for compilation
|
||||
* of components.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class Compiler {
|
||||
|
@ -19,6 +19,7 @@ import {ViewRef} from './view_ref';
|
||||
* Provides access to the component instance and related objects,
|
||||
* and provides the means of destroying the instance.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ComponentRef<C> {
|
||||
/**
|
||||
@ -66,6 +67,9 @@ export abstract class ComponentRef<C> {
|
||||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ComponentFactory<C> {
|
||||
/**
|
||||
* The comonent's HTML selector.
|
||||
|
@ -33,6 +33,9 @@ class _NullComponentFactoryResolver implements ComponentFactoryResolver {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ComponentFactoryResolver {
|
||||
static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver();
|
||||
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
||||
|
@ -19,7 +19,7 @@ import {noop} from '../util/noop';
|
||||
* XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
|
||||
* [Security Guide](http://g.co/ng/security).
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,
|
||||
// i.e. users have to ask for what they need. With that, we can build better analysis tools
|
||||
|
@ -18,7 +18,7 @@ import {ComponentFactoryResolver} from './component_factory_resolver';
|
||||
* `NgModuleRef` provides access to the NgModule Instance as well other objects related to this
|
||||
* NgModule Instance.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class NgModuleRef<T> {
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ import {NgModuleFactory} from './ng_module_factory';
|
||||
/**
|
||||
* Used to load ng module factories.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class NgModuleFactoryLoader {
|
||||
abstract load(path: string): Promise<NgModuleFactory<any>>;
|
||||
|
@ -35,6 +35,8 @@ import {getSymbolIterator} from '../util';
|
||||
* @ViewChildren(Item) items:QueryList<Item>;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class QueryList<T>/* implements Iterable<T> */ {
|
||||
public readonly dirty = true;
|
||||
|
@ -29,6 +29,7 @@ import {EmbeddedViewRef} from './view_ref';
|
||||
* @see `ViewContainerRef`
|
||||
* @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class TemplateRef<C> {
|
||||
/**
|
||||
|
@ -30,6 +30,7 @@ import {EmbeddedViewRef, ViewRef} from './view_ref';
|
||||
* @see `ComponentRef`
|
||||
* @see `EmbeddedViewRef`
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ViewContainerRef {
|
||||
/**
|
||||
|
@ -16,6 +16,8 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref';
|
||||
* that adds destroy methods for [embedded views](guide/glossary#view-tree).
|
||||
*
|
||||
* @see `EmbeddedViewRef`
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class ViewRef extends ChangeDetectorRef {
|
||||
/**
|
||||
|
@ -106,6 +106,7 @@ export interface Attribute { attributeName?: string; }
|
||||
* Attribute decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Attribute: AttributeDecorator =
|
||||
makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));
|
||||
@ -128,6 +129,8 @@ export interface Query {
|
||||
* @see `ContentChild`.
|
||||
* @see `ViewChildren`.
|
||||
* @see `ViewChild`.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class Query {}
|
||||
|
||||
@ -135,6 +138,7 @@ export abstract class Query {}
|
||||
* Type of the ContentChildren decorator / constructor function.
|
||||
*
|
||||
* @see `ContentChildren`.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ContentChildrenDecorator {
|
||||
/**
|
||||
@ -184,7 +188,8 @@ export type ContentChildren = Query;
|
||||
* ContentChildren decorator and metadata.
|
||||
*
|
||||
*
|
||||
* @Annotation
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const ContentChildren: ContentChildrenDecorator = makePropDecorator(
|
||||
'ContentChildren',
|
||||
@ -195,8 +200,7 @@ export const ContentChildren: ContentChildrenDecorator = makePropDecorator(
|
||||
/**
|
||||
* Type of the ContentChild decorator / constructor function.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ContentChildDecorator {
|
||||
/**
|
||||
@ -242,6 +246,7 @@ export type ContentChild = Query;
|
||||
*
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const ContentChild: ContentChildDecorator = makePropDecorator(
|
||||
'ContentChild', (selector?: any, data: any = {}) =>
|
||||
@ -253,7 +258,7 @@ export const ContentChild: ContentChildDecorator = makePropDecorator(
|
||||
*
|
||||
* @see `ViewChildren`.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ViewChildrenDecorator {
|
||||
/**
|
||||
@ -295,6 +300,7 @@ export type ViewChildren = Query;
|
||||
* ViewChildren decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const ViewChildren: ViewChildrenDecorator = makePropDecorator(
|
||||
'ViewChildren', (selector?: any, data: any = {}) =>
|
||||
@ -305,6 +311,7 @@ export const ViewChildren: ViewChildrenDecorator = makePropDecorator(
|
||||
* Type of the ViewChild decorator / constructor function.
|
||||
*
|
||||
* @see `ViewChild`.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ViewChildDecorator {
|
||||
/**
|
||||
@ -359,6 +366,7 @@ export type ViewChild = Query;
|
||||
* ViewChild decorator and metadata.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const ViewChild: ViewChildDecorator = makePropDecorator(
|
||||
'ViewChild', (selector: any, data: any) =>
|
||||
|
@ -22,6 +22,7 @@ import {ViewEncapsulation} from './view';
|
||||
|
||||
/**
|
||||
* Type of the Directive decorator / constructor function.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface DirectiveDecorator {
|
||||
/**
|
||||
@ -349,6 +350,8 @@ export interface Directive {
|
||||
|
||||
/**
|
||||
* Type of the Directive metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const Directive: DirectiveDecorator = makeDecorator(
|
||||
'Directive', (dir: Directive = {}) => dir, undefined, undefined,
|
||||
@ -357,6 +360,7 @@ export const Directive: DirectiveDecorator = makeDecorator(
|
||||
/**
|
||||
* Component decorator interface
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ComponentDecorator {
|
||||
/**
|
||||
@ -633,6 +637,7 @@ export interface Component extends Directive {
|
||||
* `ngPreserveWhitespaces` attribute.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Component: ComponentDecorator = makeDecorator(
|
||||
'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),
|
||||
@ -641,6 +646,8 @@ export const Component: ComponentDecorator = makeDecorator(
|
||||
|
||||
/**
|
||||
* Type of the Pipe decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface PipeDecorator {
|
||||
/**
|
||||
@ -679,9 +686,8 @@ export interface Pipe {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Pipe: PipeDecorator = makeDecorator(
|
||||
'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,
|
||||
@ -689,7 +695,7 @@ export const Pipe: PipeDecorator = makeDecorator(
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InputDecorator {
|
||||
/**
|
||||
@ -802,8 +808,8 @@ const updateBaseDefFromIOProp = (getProp: (baseDef: {inputs?: any, outputs?: any
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Input: InputDecorator = makePropDecorator(
|
||||
'Input', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
|
||||
@ -811,6 +817,8 @@ export const Input: InputDecorator = makePropDecorator(
|
||||
|
||||
/**
|
||||
* Type of the Output decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OutputDecorator {
|
||||
/**
|
||||
@ -838,8 +846,8 @@ export interface OutputDecorator {
|
||||
export interface Output { bindingPropertyName?: string; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Output: OutputDecorator = makePropDecorator(
|
||||
'Output', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
|
||||
@ -849,6 +857,8 @@ export const Output: OutputDecorator = makePropDecorator(
|
||||
|
||||
/**
|
||||
* Type of the HostBinding decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HostBindingDecorator {
|
||||
/**
|
||||
@ -890,8 +900,8 @@ export interface HostBindingDecorator {
|
||||
export interface HostBinding { hostPropertyName?: string; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const HostBinding: HostBindingDecorator =
|
||||
makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));
|
||||
@ -899,6 +909,8 @@ export const HostBinding: HostBindingDecorator =
|
||||
|
||||
/**
|
||||
* Type of the HostListener decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HostListenerDecorator {
|
||||
(eventName: string, args?: string[]): any;
|
||||
@ -949,6 +961,7 @@ export interface HostListener {
|
||||
* ```
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const HostListener: HostListenerDecorator =
|
||||
makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));
|
||||
|
@ -15,6 +15,7 @@ import {SimpleChange} from '../change_detection/change_detection_util';
|
||||
*
|
||||
* @see `OnChanges`
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface SimpleChanges { [propName: string]: SimpleChange; }
|
||||
|
||||
@ -33,6 +34,7 @@ export interface SimpleChanges { [propName: string]: SimpleChange; }
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OnChanges {
|
||||
/**
|
||||
@ -60,7 +62,7 @@ export interface OnChanges {
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OnInit {
|
||||
/**
|
||||
@ -76,7 +78,7 @@ export interface OnInit {
|
||||
/**
|
||||
* A lifecycle hook that invokes a custom change-detection function for a directive,
|
||||
* in addition to the check performed by the default change-detector.
|
||||
*
|
||||
*
|
||||
* The default change-detection algorithm looks for differences by comparing
|
||||
* bound-property values by reference across change detection runs. You can use this
|
||||
* hook to check for and respond to changes by some other means.
|
||||
@ -84,17 +86,18 @@ export interface OnInit {
|
||||
* When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
|
||||
* regardless of whether you perform additional change detection.
|
||||
* Typically, you should not use both `DoCheck` and `OnChanges` to respond to
|
||||
* changes on the same input.
|
||||
*
|
||||
* changes on the same input.
|
||||
*
|
||||
* @see `OnChanges`
|
||||
* @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
|
||||
*
|
||||
* @usageNotes
|
||||
* The following snippet shows how a component can implement this interface
|
||||
* to invoke it own change-detection cycle.
|
||||
* to invoke it own change-detection cycle.
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface DoCheck {
|
||||
/**
|
||||
@ -116,9 +119,10 @@ export interface DoCheck {
|
||||
* @usageNotes
|
||||
* The following snippet shows how a component can implement this interface
|
||||
* to define its own custom clean-up method.
|
||||
*
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OnDestroy {
|
||||
/**
|
||||
@ -144,7 +148,7 @@ export interface OnDestroy {
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface AfterContentInit {
|
||||
/**
|
||||
@ -170,7 +174,7 @@ export interface AfterContentInit {
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface AfterContentChecked {
|
||||
/**
|
||||
@ -197,7 +201,7 @@ export interface AfterContentChecked {
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface AfterViewInit {
|
||||
/**
|
||||
@ -223,6 +227,7 @@ export interface AfterViewInit {
|
||||
*
|
||||
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface AfterViewChecked {
|
||||
/**
|
||||
|
@ -72,6 +72,8 @@ export interface NgModuleDef<T> {
|
||||
*
|
||||
* @param T the module type. In Ivy applications, this must be explicitly
|
||||
* provided.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ModuleWithProviders<
|
||||
T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {
|
||||
@ -96,7 +98,7 @@ export interface SchemaMetadata { name: string; }
|
||||
* - Element properties named with dash case (`-`).
|
||||
* Dash case is the naming convention for custom elements.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {
|
||||
name: 'custom-elements'
|
||||
@ -114,8 +116,6 @@ export const NO_ERRORS_SCHEMA: SchemaMetadata = {
|
||||
|
||||
/**
|
||||
* Type of the NgModule decorator / constructor function.
|
||||
*
|
||||
*
|
||||
*/
|
||||
export interface NgModuleDecorator {
|
||||
/**
|
||||
@ -127,8 +127,6 @@ export interface NgModuleDecorator {
|
||||
|
||||
/**
|
||||
* Type of the NgModule metadata.
|
||||
*
|
||||
*
|
||||
*/
|
||||
export interface NgModule {
|
||||
/**
|
||||
@ -322,6 +320,7 @@ export interface NgModule {
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const NgModule: NgModuleDecorator = makeDecorator(
|
||||
'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,
|
||||
@ -356,6 +355,7 @@ export const NgModule: NgModuleDecorator = makeDecorator(
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; }
|
||||
|
||||
|
@ -13,7 +13,10 @@
|
||||
*
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/ts/metadata/encapsulation.ts region='longform'}
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export enum ViewEncapsulation {
|
||||
/**
|
||||
|
@ -15,6 +15,7 @@ import {noop} from '../util/noop';
|
||||
|
||||
/**
|
||||
* @deprecated Use `RendererType2` (and `Renderer2`) instead.
|
||||
* @publicApi
|
||||
*/
|
||||
export class RenderComponentType {
|
||||
constructor(
|
||||
@ -48,6 +49,7 @@ export interface DirectRenderer {
|
||||
|
||||
/**
|
||||
* @deprecated Use the `Renderer2` instead.
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class Renderer {
|
||||
abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any;
|
||||
@ -111,6 +113,7 @@ export const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2In
|
||||
* The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
|
||||
*
|
||||
* @deprecated Use `RendererFactory2` instead.
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class RootRenderer {
|
||||
abstract renderComponent(componentType: RenderComponentType): Renderer;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* See DomSanitizer for more details on security in Angular applications.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export enum SecurityContext {
|
||||
NONE = 0,
|
||||
@ -27,7 +27,7 @@ export enum SecurityContext {
|
||||
/**
|
||||
* Sanitizer is used by the views to sanitize potentially dangerous values.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class Sanitizer {
|
||||
abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;
|
||||
|
@ -284,7 +284,6 @@ export class TestabilityRegistry {
|
||||
* particular context.
|
||||
*
|
||||
* @publicApi
|
||||
* the Protractor team.
|
||||
*/
|
||||
export interface GetTestability {
|
||||
addToWindow(registry: TestabilityRegistry): void;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
|
||||
* the `MyCustomComponent` constructor function.
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const Type = Function;
|
||||
|
||||
|
@ -20,6 +20,7 @@ import {Type} from '../type';
|
||||
* class MyClass {...}
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface TypeDecorator {
|
||||
/**
|
||||
|
@ -9,7 +9,7 @@
|
||||
/**
|
||||
* @description Represents the version of Angular
|
||||
*
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class Version {
|
||||
public readonly major: string;
|
||||
@ -23,4 +23,7 @@ export class Version {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
||||
|
Reference in New Issue
Block a user