docs: update core to use `@publicApi` tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin 2018-10-19 16:27:04 +01:00 committed by Alex Rickabaugh
parent 0918adf39d
commit 3903e5ebe7
46 changed files with 179 additions and 139 deletions

View File

@ -13,11 +13,15 @@ import {Inject, Injectable, InjectionToken, Optional} from './di';
/** /**
* A function that will be executed when an application is initialized. * A function that will be executed when an application is initialized.
*
* @publicApi
*/ */
export const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer'); export const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');
/** /**
* A class that reflects the state of running {@link APP_INITIALIZER}s. * A class that reflects the state of running {@link APP_INITIALIZER}s.
*
* @publicApi
*/ */
@Injectable() @Injectable()
export class ApplicationInitStatus { export class ApplicationInitStatus {

View File

@ -171,6 +171,8 @@ export interface BootstrapOptions {
* *
* A page's platform is initialized implicitly when a platform is created via a platform factory * 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. * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
*
* @publicApi
*/ */
@Injectable() @Injectable()
export class PlatformRef { export class PlatformRef {
@ -202,8 +204,6 @@ export class PlatformRef {
* *
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory); * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
* ``` * ```
*
* @publicApi
*/ */
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):
Promise<NgModuleRef<M>> { 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. * A reference to an Angular application running on a page.
*
* @publicApi
*/ */
@Injectable() @Injectable()
export class ApplicationRef { export class ApplicationRef {

View File

@ -42,6 +42,7 @@ export function devModeEqual(a: any, b: any): boolean {
* } * }
* ``` * ```
* *
* @publicApi
*/ */
export class WrappedValue { export class WrappedValue {
/** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */ /** @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. * Represents a basic change from a previous to a new value.
* *
* @publicApi
*/ */
export class SimpleChange { export class SimpleChange {
constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {} constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}

View File

@ -48,6 +48,7 @@ import {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../rend
* *
* <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example> * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
* *
* @publicApi
*/ */
export abstract class ChangeDetectorRef { export abstract class ChangeDetectorRef {
/** /**

View File

@ -11,6 +11,7 @@
* The strategy that the default change detector uses to detect changes. * The strategy that the default change detector uses to detect changes.
* When set, takes effect the next time change detection is triggered. * When set, takes effect the next time change detection is triggered.
* *
* @publicApi
*/ */
export enum ChangeDetectionStrategy { export enum ChangeDetectionStrategy {
/** /**
@ -74,7 +75,7 @@ export enum ChangeDetectorStatus {
* @param changeDetectionStrategy The strategy to check. * @param changeDetectionStrategy The strategy to check.
* @returns True if the given strategy is the current default, false otherwise. * @returns True if the given strategy is the current default, false otherwise.
* @see `ChangeDetectorStatus` * @see `ChangeDetectorStatus`
* @see `ChangeDetectorRef` * @see `ChangeDetectorRef`
*/ */
export function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): export function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):
boolean { boolean {

View File

@ -24,6 +24,7 @@ const trackByIdentity = (index: number, item: any) => item;
/** /**
* @deprecated v4.0.0 - Should not be part of public API. * @deprecated v4.0.0 - Should not be part of public API.
* @publicApi
*/ */
export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> { export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
public readonly length: number = 0; public readonly length: number = 0;

View File

@ -15,7 +15,7 @@ import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
/** /**
* A type describing supported iterable types. * A type describing supported iterable types.
* *
* * @publicApi
*/ */
export type NgIterable<T> = Array<T>| Iterable<T>; 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 * 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. * respond to changes in an iterable by effecting equivalent changes in the DOM.
* *
* * @publicApi
*/ */
export interface IterableDiffer<V> { export interface IterableDiffer<V> {
/** /**
@ -40,7 +40,7 @@ export interface IterableDiffer<V> {
* An object describing the changes in the `Iterable` collection since last time * An object describing the changes in the `Iterable` collection since last time
* `IterableDiffer#diff()` was invoked. * `IterableDiffer#diff()` was invoked.
* *
* * @publicApi
*/ */
export interface IterableChanges<V> { export interface IterableChanges<V> {
/** /**
@ -93,7 +93,7 @@ export interface IterableChanges<V> {
/** /**
* Record representing the item change information. * Record representing the item change information.
* *
* * @publicApi
*/ */
export interface IterableChangeRecord<V> { export interface IterableChangeRecord<V> {
/** Current index of the item in `Iterable` or null if removed. */ /** 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. * @deprecated v4.0.0 - Use IterableChangeRecord instead.
* @publicApi
*/ */
export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {} 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 * An optional function passed into {@link NgForOf} that defines how to track
* items in an iterable (e.g. fby index or id) * items in an iterable (e.g. fby index or id)
* *
* * @publicApi
*/ */
export interface TrackByFunction<T> { (index: number, item: T): any; } export interface TrackByFunction<T> { (index: number, item: T): any; }
/** /**
* Provides a factory for {@link IterableDiffer}. * Provides a factory for {@link IterableDiffer}.
* *
* * @publicApi
*/ */
export interface IterableDifferFactory { export interface IterableDifferFactory {
supports(objects: any): boolean; supports(objects: any): boolean;
@ -135,6 +136,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.
* *
* @publicApi
*/ */
export class IterableDiffers { export class IterableDiffers {
static ngInjectableDef = defineInjectable({ static ngInjectableDef = defineInjectable({

View File

@ -12,7 +12,7 @@ import {Optional, SkipSelf, StaticProvider} from '../../di';
/** /**
* A differ that tracks changes made to an object over time. * A differ that tracks changes made to an object over time.
* *
* * @publicApi
*/ */
export interface KeyValueDiffer<K, V> { 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 * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
* `KeyValueDiffer#diff()` was invoked. * `KeyValueDiffer#diff()` was invoked.
* *
* * @publicApi
*/ */
export interface KeyValueChanges<K, V> { export interface KeyValueChanges<K, V> {
/** /**
@ -74,7 +74,7 @@ export interface KeyValueChanges<K, V> {
/** /**
* Record representing the item change information. * Record representing the item change information.
* *
* * @publicApi
*/ */
export interface KeyValueChangeRecord<K, V> { export interface KeyValueChangeRecord<K, V> {
/** /**
@ -96,7 +96,7 @@ export interface KeyValueChangeRecord<K, V> {
/** /**
* Provides a factory for {@link KeyValueDiffer}. * Provides a factory for {@link KeyValueDiffer}.
* *
* * @publicApi
*/ */
export interface KeyValueDifferFactory { export interface KeyValueDifferFactory {
/** /**
@ -113,6 +113,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.
* *
* @publicApi
*/ */
export class KeyValueDiffers { export class KeyValueDiffers {
/** /**

View File

@ -30,6 +30,6 @@
* *
* Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`. * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
* *
* * @publicApi
*/ */
export interface PipeTransform { transform(value: any, ...args: any[]): any; } export interface PipeTransform { transform(value: any, ...args: any[]): any; }

View File

@ -25,6 +25,8 @@ export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
/** /**
* Type of the Injectable decorator / constructor function. * Type of the Injectable decorator / constructor function.
*
* @publicApi
*/ */
export interface InjectableDecorator { export interface InjectableDecorator {
/** /**
@ -57,10 +59,11 @@ export interface InjectableDecorator {
export interface Injectable { providedIn?: Type<any>|'root'|null; } export interface Injectable { providedIn?: Type<any>|'root'|null; }
/** /**
* Injectable decorator and metadata. * Injectable decorator and metadata.
* *
* @Annotation * @Annotation
*/ * @publicApi
*/
export const Injectable: InjectableDecorator = makeDecorator( export const Injectable: InjectableDecorator = makeDecorator(
'Injectable', undefined, undefined, undefined, 'Injectable', undefined, undefined, undefined,
(type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta)); (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));

View File

@ -47,6 +47,8 @@ import {defineInjectable} from './defs';
* *
* {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
* *
*
* @publicApi
*/ */
export class InjectionToken<T> { export class InjectionToken<T> {
/** @internal */ /** @internal */

View File

@ -57,7 +57,7 @@ export class NullInjector implements Injector {
* *
* {@example core/di/ts/injector_spec.ts region='injectInjector'} * {@example core/di/ts/injector_spec.ts region='injectInjector'}
* *
* * @publicApi
*/ */
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;
@ -399,6 +399,8 @@ function staticError(text: string, obj: any): Error {
/** /**
* Injection flags for DI. * Injection flags for DI.
*
* @publicApi
*/ */
export const enum InjectFlags { export const enum InjectFlags {
Default = 0b0000, Default = 0b0000,

View File

@ -15,6 +15,8 @@ import {EMPTY_ARRAY} from '../view/util';
/** /**
* Type of the Inject decorator / constructor function. * Type of the Inject decorator / constructor function.
*
* @publicApi
*/ */
export interface InjectDecorator { export interface InjectDecorator {
/** /**
@ -40,6 +42,8 @@ export interface InjectDecorator {
/** /**
* Type of the Inject metadata. * Type of the Inject metadata.
*
* @publicApi
*/ */
export interface Inject { export interface Inject {
/** /**
@ -52,19 +56,22 @@ export interface Inject {
* Inject decorator and metadata. * Inject decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token})); export const Inject: InjectDecorator = makeParamDecorator('Inject', (token: any) => ({token}));
/** /**
* Type of the Optional decorator / constructor function. * Type of the Optional decorator / constructor function.
*
* @publicApi
*/ */
export interface OptionalDecorator { export interface OptionalDecorator {
/** /**
* A constructor parameter decorator that marks a dependency as optional. * A constructor parameter decorator that marks a dependency as optional.
* *
* The DI framework provides null if the dependency is not found. * 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'} * {@example core/di/ts/metadata_spec.ts region='Optional'}
* *
@ -76,6 +83,8 @@ export interface OptionalDecorator {
/** /**
* Type of the Optional metadata. * Type of the Optional metadata.
*
* @publicApi
*/ */
export interface Optional {} export interface Optional {}
@ -83,11 +92,14 @@ export interface Optional {}
* Optional decorator and metadata. * Optional decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Optional: OptionalDecorator = makeParamDecorator('Optional'); export const Optional: OptionalDecorator = makeParamDecorator('Optional');
/** /**
* Type of the Self decorator / constructor function. * Type of the Self decorator / constructor function.
*
* @publicApi
*/ */
export interface SelfDecorator { export interface SelfDecorator {
/** /**
@ -110,6 +122,8 @@ export interface SelfDecorator {
/** /**
* Type of the Self metadata. * Type of the Self metadata.
*
* @publicApi
*/ */
export interface Self {} export interface Self {}
@ -117,12 +131,15 @@ export interface Self {}
* Self decorator and metadata. * Self decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Self: SelfDecorator = makeParamDecorator('Self'); export const Self: SelfDecorator = makeParamDecorator('Self');
/** /**
* Type of the SkipSelf decorator / constructor function. * Type of the SkipSelf decorator / constructor function.
*
* @publicApi
*/ */
export interface SkipSelfDecorator { export interface SkipSelfDecorator {
/** /**
@ -145,7 +162,7 @@ export interface SkipSelfDecorator {
/** /**
* Type of the SkipSelf metadata. * Type of the SkipSelf metadata.
* *
* * @publicApi
*/ */
export interface SkipSelf {} export interface SkipSelf {}
@ -153,11 +170,14 @@ export interface SkipSelf {}
* SkipSelf decorator and metadata. * SkipSelf decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf'); export const SkipSelf: SkipSelfDecorator = makeParamDecorator('SkipSelf');
/** /**
* Type of the Host decorator / constructor function. * Type of the Host decorator / constructor function.
*
* @publicApi
*/ */
export interface HostDecorator { export interface HostDecorator {
/** /**
@ -167,7 +187,7 @@ export interface HostDecorator {
* *
* @see ["Dependency Injection Guide"](guide/dependency-injection). * @see ["Dependency Injection Guide"](guide/dependency-injection).
* *
* @usageNotes * @usageNotes
* *
* {@example core/di/ts/metadata_spec.ts region='Host'} * {@example core/di/ts/metadata_spec.ts region='Host'}
*/ */
@ -177,6 +197,8 @@ export interface HostDecorator {
/** /**
* Type of the Host metadata. * Type of the Host metadata.
*
* @publicApi
*/ */
export interface Host {} export interface Host {}
@ -184,5 +206,6 @@ export interface Host {}
* Host decorator and metadata. * Host decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Host: HostDecorator = makeParamDecorator('Host'); export const Host: HostDecorator = makeParamDecorator('Host');

View File

@ -40,6 +40,8 @@ export interface ValueSansProvider {
* ### Multi-value example * ### Multi-value example
* *
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'} * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
*
* @publicApi
*/ */
export interface ValueProvider extends ValueSansProvider { export interface ValueProvider extends ValueSansProvider {
/** /**
@ -191,6 +193,8 @@ export interface ExistingSansProvider {
* ### Multi-value example * ### Multi-value example
* *
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'} * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
*
* @publicApi
*/ */
export interface ExistingProvider extends ExistingSansProvider { export interface ExistingProvider extends ExistingSansProvider {
/** /**
@ -248,6 +252,8 @@ export interface FactorySansProvider {
* ### Multi-value example * ### Multi-value example
* *
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'} * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
*
* @publicApi
*/ */
export interface FactoryProvider extends FactorySansProvider { export interface FactoryProvider extends FactorySansProvider {
/** /**
@ -270,6 +276,8 @@ export interface FactoryProvider extends FactorySansProvider {
* @see `ValueProvider` * @see `ValueProvider`
* @see `ExistingProvider` * @see `ExistingProvider`
* @see `FactoryProvider` * @see `FactoryProvider`
*
* @publicApi
*/ */
export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider |
ConstructorProvider | FactoryProvider | any[]; ConstructorProvider | FactoryProvider | any[];
@ -287,6 +295,8 @@ export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvi
* ### Example * ### Example
* *
* {@example core/di/ts/provider_spec.ts region='TypeProvider'} * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
*
* @publicApi
*/ */
export interface TypeProvider extends Type<any> {} export interface TypeProvider extends Type<any> {}
@ -326,6 +336,8 @@ export interface ClassSansProvider {
* ### Multi-value example * ### Multi-value example
* *
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'} * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
*
* @publicApi
*/ */
export interface ClassProvider extends ClassSansProvider { export interface ClassProvider extends ClassSansProvider {
/** /**
@ -348,6 +360,8 @@ export interface ClassProvider extends ClassSansProvider {
* @see `TypeProvider` * @see `TypeProvider`
* @see `ClassProvider` * @see `ClassProvider`
* @see `StaticProvider` * @see `StaticProvider`
*
* @publicApi
*/ */
export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider |
ExistingProvider | FactoryProvider | any[]; ExistingProvider | FactoryProvider | any[];

View File

@ -51,6 +51,7 @@ const UNDEFINED = new Object();
* resolve all of the object's dependencies automatically. * resolve all of the object's dependencies automatically.
* *
* @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead. * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
* @publicApi
*/ */
export abstract class ReflectiveInjector implements Injector { export abstract class ReflectiveInjector implements Injector {
/** /**
@ -140,7 +141,6 @@ 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);
* ``` * ```
* @publicApi
*/ */
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):
ReflectiveInjector { ReflectiveInjector {

View File

@ -24,7 +24,9 @@ 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.
*
* @deprecated No replacement * @deprecated No replacement
* @publicApi
*/ */
export class ReflectiveKey { export class ReflectiveKey {
public readonly displayName: string; public readonly displayName: string;

View File

@ -32,6 +32,8 @@ import {ERROR_ORIGINAL_ERROR, getDebugContext, getErrorLogger, getOriginalError}
* }) * })
* class MyModule {} * class MyModule {}
* ``` * ```
*
* @publicApi
*/ */
export class ErrorHandler { export class ErrorHandler {
/** /**

View File

@ -59,6 +59,7 @@ import {Subject, Subscription} from 'rxjs';
* *
* Once a reference implementation of the spec is available, switch to it. * Once a reference implementation of the spec is available, switch to it.
* *
* @publicApi
*/ */
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

View File

@ -37,6 +37,8 @@ export function isDevMode(): boolean {
* 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).
*
* @publicApi
*/ */
export function enableProdMode(): void { export function enableProdMode(): void {
if (_runModeLocked) { if (_runModeLocked) {

View File

@ -43,6 +43,7 @@ function _throwError() {
* that will use the directives/pipes of the ng module for compilation * that will use the directives/pipes of the ng module for compilation
* of components. * of components.
* *
* @publicApi
*/ */
@Injectable() @Injectable()
export class Compiler { export class Compiler {

View File

@ -19,6 +19,7 @@ import {ViewRef} from './view_ref';
* Provides access to the component instance and related objects, * Provides access to the component instance and related objects,
* and provides the means of destroying the instance. * and provides the means of destroying the instance.
* *
* @publicApi
*/ */
export abstract class ComponentRef<C> { export abstract class ComponentRef<C> {
/** /**
@ -66,6 +67,9 @@ export abstract class ComponentRef<C> {
abstract onDestroy(callback: Function): void; abstract onDestroy(callback: Function): void;
} }
/**
* @publicApi
*/
export abstract class ComponentFactory<C> { export abstract class ComponentFactory<C> {
/** /**
* The comonent's HTML selector. * The comonent's HTML selector.

View File

@ -33,6 +33,9 @@ class _NullComponentFactoryResolver implements ComponentFactoryResolver {
} }
} }
/**
* @publicApi
*/
export abstract class ComponentFactoryResolver { export abstract class ComponentFactoryResolver {
static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver(); static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver();
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>; abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;

View File

@ -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 * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
* [Security Guide](http://g.co/ng/security). * [Security Guide](http://g.co/ng/security).
* *
* * @publicApi
*/ */
// Note: We don't expose things like `Injector`, `ViewContainer`, ... here, // 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 // i.e. users have to ask for what they need. With that, we can build better analysis tools

View File

@ -18,7 +18,7 @@ import {ComponentFactoryResolver} from './component_factory_resolver';
* `NgModuleRef` provides access to the NgModule Instance as well other objects related to this * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this
* NgModule Instance. * NgModule Instance.
* *
* * @publicApi
*/ */
export abstract class NgModuleRef<T> { export abstract class NgModuleRef<T> {
/** /**

View File

@ -11,6 +11,7 @@ import {NgModuleFactory} from './ng_module_factory';
/** /**
* Used to load ng module factories. * Used to load ng module factories.
* *
* @publicApi
*/ */
export abstract class NgModuleFactoryLoader { export abstract class NgModuleFactoryLoader {
abstract load(path: string): Promise<NgModuleFactory<any>>; abstract load(path: string): Promise<NgModuleFactory<any>>;

View File

@ -35,6 +35,8 @@ import {getSymbolIterator} from '../util';
* @ViewChildren(Item) items:QueryList<Item>; * @ViewChildren(Item) items:QueryList<Item>;
* } * }
* ``` * ```
*
* @publicApi
*/ */
export class QueryList<T>/* implements Iterable<T> */ { export class QueryList<T>/* implements Iterable<T> */ {
public readonly dirty = true; public readonly dirty = true;

View File

@ -29,6 +29,7 @@ import {EmbeddedViewRef} from './view_ref';
* @see `ViewContainerRef` * @see `ViewContainerRef`
* @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree) * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
* *
* @publicApi
*/ */
export abstract class TemplateRef<C> { export abstract class TemplateRef<C> {
/** /**

View File

@ -30,6 +30,7 @@ import {EmbeddedViewRef, ViewRef} from './view_ref';
* @see `ComponentRef` * @see `ComponentRef`
* @see `EmbeddedViewRef` * @see `EmbeddedViewRef`
* *
* @publicApi
*/ */
export abstract class ViewContainerRef { export abstract class ViewContainerRef {
/** /**

View File

@ -16,6 +16,8 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref';
* that adds destroy methods for [embedded views](guide/glossary#view-tree). * that adds destroy methods for [embedded views](guide/glossary#view-tree).
* *
* @see `EmbeddedViewRef` * @see `EmbeddedViewRef`
*
* @publicApi
*/ */
export abstract class ViewRef extends ChangeDetectorRef { export abstract class ViewRef extends ChangeDetectorRef {
/** /**

View File

@ -106,6 +106,7 @@ export interface Attribute { attributeName?: string; }
* Attribute decorator and metadata. * Attribute decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Attribute: AttributeDecorator = export const Attribute: AttributeDecorator =
makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName})); makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));
@ -128,6 +129,8 @@ export interface Query {
* @see `ContentChild`. * @see `ContentChild`.
* @see `ViewChildren`. * @see `ViewChildren`.
* @see `ViewChild`. * @see `ViewChild`.
*
* @publicApi
*/ */
export abstract class Query {} export abstract class Query {}
@ -135,6 +138,7 @@ export abstract class Query {}
* Type of the ContentChildren decorator / constructor function. * Type of the ContentChildren decorator / constructor function.
* *
* @see `ContentChildren`. * @see `ContentChildren`.
* @publicApi
*/ */
export interface ContentChildrenDecorator { export interface ContentChildrenDecorator {
/** /**
@ -184,7 +188,8 @@ export type ContentChildren = Query;
* ContentChildren decorator and metadata. * ContentChildren decorator and metadata.
* *
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const ContentChildren: ContentChildrenDecorator = makePropDecorator( export const ContentChildren: ContentChildrenDecorator = makePropDecorator(
'ContentChildren', 'ContentChildren',
@ -195,8 +200,7 @@ export const ContentChildren: ContentChildrenDecorator = makePropDecorator(
/** /**
* Type of the ContentChild decorator / constructor function. * Type of the ContentChild decorator / constructor function.
* *
* * @publicApi
*
*/ */
export interface ContentChildDecorator { export interface ContentChildDecorator {
/** /**
@ -242,6 +246,7 @@ export type ContentChild = Query;
* *
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const ContentChild: ContentChildDecorator = makePropDecorator( export const ContentChild: ContentChildDecorator = makePropDecorator(
'ContentChild', (selector?: any, data: any = {}) => 'ContentChild', (selector?: any, data: any = {}) =>
@ -253,7 +258,7 @@ export const ContentChild: ContentChildDecorator = makePropDecorator(
* *
* @see `ViewChildren`. * @see `ViewChildren`.
* *
* * @publicApi
*/ */
export interface ViewChildrenDecorator { export interface ViewChildrenDecorator {
/** /**
@ -295,6 +300,7 @@ export type ViewChildren = Query;
* ViewChildren decorator and metadata. * ViewChildren decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const ViewChildren: ViewChildrenDecorator = makePropDecorator( export const ViewChildren: ViewChildrenDecorator = makePropDecorator(
'ViewChildren', (selector?: any, data: any = {}) => 'ViewChildren', (selector?: any, data: any = {}) =>
@ -305,6 +311,7 @@ export const ViewChildren: ViewChildrenDecorator = makePropDecorator(
* Type of the ViewChild decorator / constructor function. * Type of the ViewChild decorator / constructor function.
* *
* @see `ViewChild`. * @see `ViewChild`.
* @publicApi
*/ */
export interface ViewChildDecorator { export interface ViewChildDecorator {
/** /**
@ -359,6 +366,7 @@ export type ViewChild = Query;
* ViewChild decorator and metadata. * ViewChild decorator and metadata.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const ViewChild: ViewChildDecorator = makePropDecorator( export const ViewChild: ViewChildDecorator = makePropDecorator(
'ViewChild', (selector: any, data: any) => 'ViewChild', (selector: any, data: any) =>

View File

@ -22,6 +22,7 @@ import {ViewEncapsulation} from './view';
/** /**
* Type of the Directive decorator / constructor function. * Type of the Directive decorator / constructor function.
* @publicApi
*/ */
export interface DirectiveDecorator { export interface DirectiveDecorator {
/** /**
@ -349,6 +350,8 @@ export interface Directive {
/** /**
* Type of the Directive metadata. * Type of the Directive metadata.
*
* @publicApi
*/ */
export const Directive: DirectiveDecorator = makeDecorator( export const Directive: DirectiveDecorator = makeDecorator(
'Directive', (dir: Directive = {}) => dir, undefined, undefined, 'Directive', (dir: Directive = {}) => dir, undefined, undefined,
@ -357,6 +360,7 @@ export const Directive: DirectiveDecorator = makeDecorator(
/** /**
* Component decorator interface * Component decorator interface
* *
* @publicApi
*/ */
export interface ComponentDecorator { export interface ComponentDecorator {
/** /**
@ -633,6 +637,7 @@ export interface Component extends Directive {
* `ngPreserveWhitespaces` attribute. * `ngPreserveWhitespaces` attribute.
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const Component: ComponentDecorator = makeDecorator( export const Component: ComponentDecorator = makeDecorator(
'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}), 'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),
@ -641,6 +646,8 @@ export const Component: ComponentDecorator = makeDecorator(
/** /**
* Type of the Pipe decorator / constructor function. * Type of the Pipe decorator / constructor function.
*
* @publicApi
*/ */
export interface PipeDecorator { export interface PipeDecorator {
/** /**
@ -679,9 +686,8 @@ export interface Pipe {
} }
/** /**
*
*
* @Annotation * @Annotation
* @publicApi
*/ */
export const Pipe: PipeDecorator = makeDecorator( export const Pipe: PipeDecorator = makeDecorator(
'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined, 'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,
@ -689,7 +695,7 @@ export const Pipe: PipeDecorator = makeDecorator(
/** /**
* * @publicApi
*/ */
export interface InputDecorator { export interface InputDecorator {
/** /**
@ -802,8 +808,8 @@ const updateBaseDefFromIOProp = (getProp: (baseDef: {inputs?: any, outputs?: any
}; };
/** /**
*
* @Annotation * @Annotation
* @publicApi
*/ */
export const Input: InputDecorator = makePropDecorator( export const Input: InputDecorator = makePropDecorator(
'Input', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined, 'Input', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
@ -811,6 +817,8 @@ export const Input: InputDecorator = makePropDecorator(
/** /**
* Type of the Output decorator / constructor function. * Type of the Output decorator / constructor function.
*
* @publicApi
*/ */
export interface OutputDecorator { export interface OutputDecorator {
/** /**
@ -838,8 +846,8 @@ export interface OutputDecorator {
export interface Output { bindingPropertyName?: string; } export interface Output { bindingPropertyName?: string; }
/** /**
*
* @Annotation * @Annotation
* @publicApi
*/ */
export const Output: OutputDecorator = makePropDecorator( export const Output: OutputDecorator = makePropDecorator(
'Output', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined, 'Output', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
@ -849,6 +857,8 @@ export const Output: OutputDecorator = makePropDecorator(
/** /**
* Type of the HostBinding decorator / constructor function. * Type of the HostBinding decorator / constructor function.
*
* @publicApi
*/ */
export interface HostBindingDecorator { export interface HostBindingDecorator {
/** /**
@ -890,8 +900,8 @@ export interface HostBindingDecorator {
export interface HostBinding { hostPropertyName?: string; } export interface HostBinding { hostPropertyName?: string; }
/** /**
*
* @Annotation * @Annotation
* @publicApi
*/ */
export const HostBinding: HostBindingDecorator = export const HostBinding: HostBindingDecorator =
makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName})); makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));
@ -899,6 +909,8 @@ export const HostBinding: HostBindingDecorator =
/** /**
* Type of the HostListener decorator / constructor function. * Type of the HostListener decorator / constructor function.
*
* @publicApi
*/ */
export interface HostListenerDecorator { export interface HostListenerDecorator {
(eventName: string, args?: string[]): any; (eventName: string, args?: string[]): any;
@ -949,6 +961,7 @@ export interface HostListener {
* ``` * ```
* *
* @Annotation * @Annotation
* @publicApi
*/ */
export const HostListener: HostListenerDecorator = export const HostListener: HostListenerDecorator =
makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args})); makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));

View File

@ -15,6 +15,7 @@ import {SimpleChange} from '../change_detection/change_detection_util';
* *
* @see `OnChanges` * @see `OnChanges`
* *
* @publicApi
*/ */
export interface SimpleChanges { [propName: string]: SimpleChange; } 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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
* *
* @publicApi
*/ */
export interface OnChanges { export interface OnChanges {
/** /**
@ -60,7 +62,7 @@ export interface OnChanges {
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
* *
* * @publicApi
*/ */
export interface OnInit { export interface OnInit {
/** /**
@ -76,7 +78,7 @@ export interface OnInit {
/** /**
* A lifecycle hook that invokes a custom change-detection function for a directive, * A lifecycle hook that invokes a custom change-detection function for a directive,
* in addition to the check performed by the default change-detector. * in addition to the check performed by the default change-detector.
* *
* The default change-detection algorithm looks for differences by comparing * The default change-detection algorithm looks for differences by comparing
* bound-property values by reference across change detection runs. You can use this * 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. * 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, * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
* regardless of whether you perform additional change detection. * regardless of whether you perform additional change detection.
* Typically, you should not use both `DoCheck` and `OnChanges` to respond to * 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 `OnChanges`
* @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
* *
* @usageNotes * @usageNotes
* The following snippet shows how a component can implement this interface * 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'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
* *
* @publicApi
*/ */
export interface DoCheck { export interface DoCheck {
/** /**
@ -116,9 +119,10 @@ export interface DoCheck {
* @usageNotes * @usageNotes
* The following snippet shows how a component can implement this interface * The following snippet shows how a component can implement this interface
* to define its own custom clean-up method. * to define its own custom clean-up method.
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
* *
* @publicApi
*/ */
export interface OnDestroy { export interface OnDestroy {
/** /**
@ -144,7 +148,7 @@ export interface OnDestroy {
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
* *
* * @publicApi
*/ */
export interface AfterContentInit { export interface AfterContentInit {
/** /**
@ -170,7 +174,7 @@ export interface AfterContentInit {
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
* *
* * @publicApi
*/ */
export interface AfterContentChecked { export interface AfterContentChecked {
/** /**
@ -197,7 +201,7 @@ export interface AfterContentChecked {
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
* *
* * @publicApi
*/ */
export interface AfterViewInit { export interface AfterViewInit {
/** /**
@ -223,6 +227,7 @@ export interface AfterViewInit {
* *
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'} * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
* *
* @publicApi
*/ */
export interface AfterViewChecked { export interface AfterViewChecked {
/** /**

View File

@ -72,6 +72,8 @@ export interface NgModuleDef<T> {
* *
* @param T the module type. In Ivy applications, this must be explicitly * @param T the module type. In Ivy applications, this must be explicitly
* provided. * provided.
*
* @publicApi
*/ */
export interface ModuleWithProviders< export interface ModuleWithProviders<
T = any /** TODO(alxhub): remove default when callers pass explicit type param */> { 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 (`-`). * - Element properties named with dash case (`-`).
* Dash case is the naming convention for custom elements. * Dash case is the naming convention for custom elements.
* *
* * @publicApi
*/ */
export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = { export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {
name: 'custom-elements' name: 'custom-elements'
@ -114,8 +116,6 @@ export const NO_ERRORS_SCHEMA: SchemaMetadata = {
/** /**
* Type of the NgModule decorator / constructor function. * Type of the NgModule decorator / constructor function.
*
*
*/ */
export interface NgModuleDecorator { export interface NgModuleDecorator {
/** /**
@ -127,8 +127,6 @@ export interface NgModuleDecorator {
/** /**
* Type of the NgModule metadata. * Type of the NgModule metadata.
*
*
*/ */
export interface NgModule { export interface NgModule {
/** /**
@ -322,6 +320,7 @@ export interface NgModule {
/** /**
* @Annotation * @Annotation
* @publicApi
*/ */
export const NgModule: NgModuleDecorator = makeDecorator( export const NgModule: NgModuleDecorator = makeDecorator(
'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined, 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,
@ -356,6 +355,7 @@ export const NgModule: NgModuleDecorator = makeDecorator(
* } * }
* ``` * ```
* *
* @publicApi
*/ */
export interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; } export interface DoBootstrap { ngDoBootstrap(appRef: ApplicationRef): void; }

View File

@ -13,7 +13,10 @@
* *
* @usageNotes * @usageNotes
* ### Example * ### Example
*
* {@example core/ts/metadata/encapsulation.ts region='longform'} * {@example core/ts/metadata/encapsulation.ts region='longform'}
*
* @publicApi
*/ */
export enum ViewEncapsulation { export enum ViewEncapsulation {
/** /**

View File

@ -15,6 +15,7 @@ import {noop} from '../util/noop';
/** /**
* @deprecated Use `RendererType2` (and `Renderer2`) instead. * @deprecated Use `RendererType2` (and `Renderer2`) instead.
* @publicApi
*/ */
export class RenderComponentType { export class RenderComponentType {
constructor( constructor(
@ -48,6 +49,7 @@ export interface DirectRenderer {
/** /**
* @deprecated Use the `Renderer2` instead. * @deprecated Use the `Renderer2` instead.
* @publicApi
*/ */
export abstract class Renderer { export abstract class Renderer {
abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any; 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`. * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
* *
* @deprecated Use `RendererFactory2` instead. * @deprecated Use `RendererFactory2` instead.
* @publicApi
*/ */
export abstract class RootRenderer { export abstract class RootRenderer {
abstract renderComponent(componentType: RenderComponentType): Renderer; abstract renderComponent(componentType: RenderComponentType): Renderer;

View File

@ -13,7 +13,7 @@
* *
* See DomSanitizer for more details on security in Angular applications. * See DomSanitizer for more details on security in Angular applications.
* *
* * @publicApi
*/ */
export enum SecurityContext { export enum SecurityContext {
NONE = 0, NONE = 0,
@ -27,7 +27,7 @@ export enum SecurityContext {
/** /**
* Sanitizer is used by the views to sanitize potentially dangerous values. * Sanitizer is used by the views to sanitize potentially dangerous values.
* *
* * @publicApi
*/ */
export abstract class Sanitizer { export abstract class Sanitizer {
abstract sanitize(context: SecurityContext, value: {}|string|null): string|null; abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;

View File

@ -284,7 +284,6 @@ export class TestabilityRegistry {
* particular context. * particular context.
* *
* @publicApi * @publicApi
* the Protractor team.
*/ */
export interface GetTestability { export interface GetTestability {
addToWindow(registry: TestabilityRegistry): void; addToWindow(registry: TestabilityRegistry): void;

View File

@ -14,7 +14,7 @@
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function. * the `MyCustomComponent` constructor function.
* *
* * @publicApi
*/ */
export const Type = Function; export const Type = Function;

View File

@ -20,6 +20,7 @@ import {Type} from '../type';
* class MyClass {...} * class MyClass {...}
* ``` * ```
* *
* @publicApi
*/ */
export interface TypeDecorator { export interface TypeDecorator {
/** /**

View File

@ -9,7 +9,7 @@
/** /**
* @description Represents the version of Angular * @description Represents the version of Angular
* *
* * @publicApi
*/ */
export class Version { export class Version {
public readonly major: string; public readonly major: string;
@ -23,4 +23,7 @@ export class Version {
} }
} }
/**
* @publicApi
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER'); export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -23,7 +23,7 @@ import {asyncFallback} from './async_fallback';
* }); * });
* ``` * ```
* *
* * @publicApi
*/ */
export function async(fn: Function): (done: any) => any { export function async(fn: Function): (done: any) => any {
const _Zone: any = typeof Zone !== 'undefined' ? Zone : null; const _Zone: any = typeof Zone !== 'undefined' ? Zone : null;

View File

@ -12,7 +12,7 @@ import {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone, Rende
/** /**
* Fixture for debugging and testing a component. * Fixture for debugging and testing a component.
* *
* * @publicApi
*/ */
export class ComponentFixture<T> { export class ComponentFixture<T> {
/** /**

View File

@ -635,6 +635,8 @@ export class TestBedViewEngine implements Injector, TestBed {
* *
* Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3` * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`
* according to the compiler used. * according to the compiler used.
*
* @publicApi
*/ */
export const TestBed: TestBedStatic = export const TestBed: TestBedStatic =
ivyEnabled ? TestBedRender3 as any as TestBedStatic : TestBedViewEngine as any as TestBedStatic; ivyEnabled ? TestBedRender3 as any as TestBedStatic : TestBedViewEngine as any as TestBedStatic;
@ -676,7 +678,7 @@ function _getTestBedViewEngine(): TestBedViewEngine {
* eventually * eventually
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });` * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
* *
* * @publicApi
*/ */
export function inject(tokens: any[], fn: Function): () => any { export function inject(tokens: any[], fn: Function): () => any {
const testBed = getTestBed(); const testBed = getTestBed();

View File

@ -45,6 +45,8 @@ export type TestModuleMetadata = {
/** /**
* Static methods implemented by the `TestBedViewEngine` and `TestBedRender3` * Static methods implemented by the `TestBedViewEngine` and `TestBedRender3`
*
* @publicApi
*/ */
export interface TestBedStatic { export interface TestBedStatic {
new (...args: any[]): TestBed; new (...args: any[]): TestBed;
@ -54,8 +56,6 @@ export interface TestBedStatic {
/** /**
* Reset the providers for the test injector. * Reset the providers for the test injector.
*
* @publicApi
*/ */
resetTestEnvironment(): void; resetTestEnvironment(): void;

View File

@ -14,13 +14,10 @@ export interface AfterViewInit {
ngAfterViewInit(): void; ngAfterViewInit(): void;
} }
/** @experimental */
export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>; export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
/** @experimental */
export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>; export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
/** @experimental */
export declare const APP_ID: InjectionToken<string>; export declare const APP_ID: InjectionToken<string>;
export declare const APP_INITIALIZER: InjectionToken<(() => void)[]>; export declare const APP_INITIALIZER: InjectionToken<(() => void)[]>;
@ -31,7 +28,6 @@ export declare class ApplicationInitStatus {
constructor(appInits: (() => any)[]); constructor(appInits: (() => any)[]);
} }
/** @experimental */
export declare class ApplicationModule { export declare class ApplicationModule {
constructor(appRef: ApplicationRef); constructor(appRef: ApplicationRef);
} }
@ -47,10 +43,8 @@ export declare class ApplicationRef {
tick(): void; tick(): void;
} }
/** @experimental */
export declare function asNativeElements(debugEls: DebugElement[]): any; export declare function asNativeElements(debugEls: DebugElement[]): any;
/** @experimental */
export declare function assertPlatform(requiredToken: any): PlatformRef; export declare function assertPlatform(requiredToken: any): PlatformRef;
export declare const Attribute: AttributeDecorator; export declare const Attribute: AttributeDecorator;
@ -87,15 +81,12 @@ export declare class Compiler {
getModuleId(moduleType: Type<any>): string | undefined; getModuleId(moduleType: Type<any>): string | undefined;
} }
/** @experimental */
export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>; export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
/** @experimental */
export declare abstract class CompilerFactory { export declare abstract class CompilerFactory {
abstract createCompiler(options?: CompilerOptions[]): Compiler; abstract createCompiler(options?: CompilerOptions[]): Compiler;
} }
/** @experimental */
export declare type CompilerOptions = { export declare type CompilerOptions = {
useJit?: boolean; useJit?: boolean;
defaultEncapsulation?: ViewEncapsulation; defaultEncapsulation?: ViewEncapsulation;
@ -142,7 +133,6 @@ export declare abstract class ComponentRef<C> {
abstract onDestroy(callback: Function): void; abstract onDestroy(callback: Function): void;
} }
/** @experimental */
export interface ConstructorSansProvider { export interface ConstructorSansProvider {
deps?: any[]; deps?: any[];
} }
@ -171,18 +161,14 @@ export interface ContentChildrenDecorator {
}): Query; }): Query;
} }
/** @experimental */
export declare function createInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null): Injector; export declare function createInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null): Injector;
/** @experimental */
export declare function createPlatform(injector: Injector): PlatformRef; export declare function createPlatform(injector: Injector): PlatformRef;
/** @experimental */
export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef; export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata; export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
/** @experimental */
export declare class DebugElement extends DebugNode { export declare class DebugElement extends DebugNode {
attributes: { attributes: {
[key: string]: string | null; [key: string]: string | null;
@ -211,7 +197,6 @@ export declare class DebugElement extends DebugNode {
triggerEventHandler(eventName: string, eventObj: any): void; triggerEventHandler(eventName: string, eventObj: any): void;
} }
/** @experimental */
export declare class DebugNode { export declare class DebugNode {
readonly componentInstance: any; readonly componentInstance: any;
readonly context: any; readonly context: any;
@ -244,20 +229,17 @@ export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, Iter
onDestroy(): void; onDestroy(): void;
} }
/** @experimental */
export declare function defineInjectable<T>(opts: { export declare function defineInjectable<T>(opts: {
providedIn?: Type<any> | 'root' | 'any' | null; providedIn?: Type<any> | 'root' | 'any' | null;
factory: () => T; factory: () => T;
}): never; }): never;
/** @experimental */
export declare function defineInjector(options: { export declare function defineInjector(options: {
factory: () => any; factory: () => any;
providers?: any[]; providers?: any[];
imports?: any[]; imports?: any[];
}): never; }): never;
/** @experimental */
export declare function destroyPlatform(): void; export declare function destroyPlatform(): void;
export declare const Directive: DirectiveDecorator; export declare const Directive: DirectiveDecorator;
@ -280,7 +262,6 @@ export declare class ElementRef<T = any> {
constructor(nativeElement: T); constructor(nativeElement: T);
} }
/** @experimental */
export declare abstract class EmbeddedViewRef<C> extends ViewRef { export declare abstract class EmbeddedViewRef<C> extends ViewRef {
abstract readonly context: C; abstract readonly context: C;
abstract readonly rootNodes: any[]; abstract readonly rootNodes: any[];
@ -309,24 +290,18 @@ export interface FactoryProvider extends FactorySansProvider {
provide: any; provide: any;
} }
/** @experimental */
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>; export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
/** @experimental */
export interface ForwardRefFn { export interface ForwardRefFn {
(): any; (): any;
} }
/** @experimental */
export declare function getDebugNode(nativeNode: any): DebugNode | null; export declare function getDebugNode(nativeNode: any): DebugNode | null;
/** @experimental */
export declare function getModuleFactory(id: string): NgModuleFactory<any>; export declare function getModuleFactory(id: string): NgModuleFactory<any>;
/** @experimental */
export declare function getPlatform(): PlatformRef | null; export declare function getPlatform(): PlatformRef | null;
/** @experimental */
export interface GetTestability { export interface GetTestability {
addToWindow(registry: TestabilityRegistry): void; addToWindow(registry: TestabilityRegistry): void;
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null; findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
@ -343,7 +318,6 @@ export interface HostDecorator {
export declare const HostListener: HostListenerDecorator; export declare const HostListener: HostListenerDecorator;
/** @experimental */
export declare function inject<T>(token: Type<T> | InjectionToken<T>): T; export declare function inject<T>(token: Type<T> | InjectionToken<T>): T;
export declare function inject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null; export declare function inject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
@ -362,10 +336,8 @@ export interface InjectableDecorator {
} & InjectableProvider): Injectable; } & InjectableProvider): Injectable;
} }
/** @experimental */
export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider; export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
/** @experimental */
export interface InjectableType<T> extends Type<T> { export interface InjectableType<T> extends Type<T> {
ngInjectableDef: never; ngInjectableDef: never;
} }
@ -407,17 +379,14 @@ export declare abstract class Injector {
}): Injector; }): Injector;
} }
/** @experimental */
export declare const INJECTOR: InjectionToken<Injector>; export declare const INJECTOR: InjectionToken<Injector>;
/** @experimental */
export interface InjectorType<T> extends Type<T> { export interface InjectorType<T> extends Type<T> {
ngInjectorDef: never; ngInjectorDef: never;
} }
export declare const Input: InputDecorator; export declare const Input: InputDecorator;
/** @experimental */
export declare function isDevMode(): boolean; export declare function isDevMode(): boolean;
export interface IterableChangeRecord<V> { export interface IterableChangeRecord<V> {
@ -489,17 +458,14 @@ export declare class KeyValueDiffers {
static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider; static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
} }
/** @experimental */
export declare const LOCALE_ID: InjectionToken<string>; export declare const LOCALE_ID: InjectionToken<string>;
/** @experimental */
export declare enum MissingTranslationStrategy { export declare enum MissingTranslationStrategy {
Error = 0, Error = 0,
Warning = 1, Warning = 1,
Ignore = 2 Ignore = 2
} }
/** @experimental */
export declare class ModuleWithComponentFactories<T> { export declare class ModuleWithComponentFactories<T> {
componentFactories: ComponentFactory<any>[]; componentFactories: ComponentFactory<any>[];
ngModuleFactory: NgModuleFactory<T>; ngModuleFactory: NgModuleFactory<T>;
@ -515,7 +481,6 @@ export declare type NgIterable<T> = Array<T> | Iterable<T>;
export declare const NgModule: NgModuleDecorator; export declare const NgModule: NgModuleDecorator;
/** @experimental */
export declare abstract class NgModuleFactory<T> { export declare abstract class NgModuleFactory<T> {
abstract readonly moduleType: Type<T>; abstract readonly moduleType: Type<T>;
abstract create(parentInjector: Injector | null): NgModuleRef<T>; abstract create(parentInjector: Injector | null): NgModuleRef<T>;
@ -533,14 +498,12 @@ export declare abstract class NgModuleRef<T> {
abstract onDestroy(callback: () => void): void; abstract onDestroy(callback: () => void): void;
} }
/** @experimental */
export declare class NgProbeToken { export declare class NgProbeToken {
name: string; name: string;
token: any; token: any;
constructor(name: string, token: any); constructor(name: string, token: any);
} }
/** @experimental */
export declare class NgZone { export declare class NgZone {
readonly hasPendingMacrotasks: boolean; readonly hasPendingMacrotasks: boolean;
readonly hasPendingMicrotasks: boolean; readonly hasPendingMicrotasks: boolean;
@ -561,7 +524,6 @@ export declare class NgZone {
static isInAngularZone(): boolean; static isInAngularZone(): boolean;
} }
/** @experimental */
export declare const NO_ERRORS_SCHEMA: SchemaMetadata; export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
export interface OnChanges { export interface OnChanges {
@ -585,7 +547,6 @@ export interface OptionalDecorator {
export declare const Output: OutputDecorator; export declare const Output: OutputDecorator;
/** @experimental */
export declare const PACKAGE_ROOT_URL: InjectionToken<string>; export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
export declare const Pipe: PipeDecorator; export declare const Pipe: PipeDecorator;
@ -594,25 +555,21 @@ export interface PipeTransform {
transform(value: any, ...args: any[]): any; transform(value: any, ...args: any[]): any;
} }
/** @experimental */
export declare const PLATFORM_ID: InjectionToken<Object>; export declare const PLATFORM_ID: InjectionToken<Object>;
/** @experimental */
export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>; export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
/** @experimental */
export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
export declare class PlatformRef { export declare class PlatformRef {
readonly destroyed: boolean; readonly destroyed: boolean;
readonly injector: Injector; readonly injector: Injector;
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>; bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
/** @experimental */ bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>; bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
destroy(): void; destroy(): void;
onDestroy(callback: () => void): void; onDestroy(callback: () => void): void;
} }
/** @experimental */
export interface Predicate<T> { export interface Predicate<T> {
(value: T): boolean; (value: T): boolean;
} }
@ -650,7 +607,7 @@ export declare abstract class ReflectiveInjector implements Injector {
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any; abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector; abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
abstract resolveAndInstantiate(provider: Provider): any; abstract resolveAndInstantiate(provider: Provider): any;
/** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
static resolve(providers: Provider[]): ResolvedReflectiveProvider[]; static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector; static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
} }
@ -699,7 +656,6 @@ export declare abstract class Renderer {
abstract setText(renderNode: any, text: string): void; abstract setText(renderNode: any, text: string): void;
} }
/** @experimental */
export declare abstract class Renderer2 { export declare abstract class Renderer2 {
abstract readonly data: { abstract readonly data: {
[key: string]: any; [key: string]: any;
@ -726,7 +682,6 @@ export declare abstract class Renderer2 {
abstract setValue(node: any, value: string): void; abstract setValue(node: any, value: string): void;
} }
/** @experimental */
export declare abstract class RendererFactory2 { export declare abstract class RendererFactory2 {
abstract begin?(): void; abstract begin?(): void;
abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2; abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
@ -734,13 +689,11 @@ export declare abstract class RendererFactory2 {
abstract whenRenderingDone?(): Promise<any>; abstract whenRenderingDone?(): Promise<any>;
} }
/** @experimental */
export declare enum RendererStyleFlags2 { export declare enum RendererStyleFlags2 {
Important = 1, Important = 1,
DashCase = 2 DashCase = 2
} }
/** @experimental */
export interface RendererType2 { export interface RendererType2 {
data: { data: {
[kind: string]: any; [kind: string]: any;
@ -750,7 +703,6 @@ export interface RendererType2 {
styles: (string | any[])[]; styles: (string | any[])[];
} }
/** @experimental */
export declare class ResolvedReflectiveFactory { export declare class ResolvedReflectiveFactory {
dependencies: ReflectiveDependency[]; dependencies: ReflectiveDependency[];
factory: Function; factory: Function;
@ -759,14 +711,12 @@ export declare class ResolvedReflectiveFactory {
dependencies: ReflectiveDependency[]); dependencies: ReflectiveDependency[]);
} }
/** @experimental */
export interface ResolvedReflectiveProvider { export interface ResolvedReflectiveProvider {
key: ReflectiveKey; key: ReflectiveKey;
multiProvider: boolean; multiProvider: boolean;
resolvedFactories: ResolvedReflectiveFactory[]; resolvedFactories: ResolvedReflectiveFactory[];
} }
/** @experimental */
export declare function resolveForwardRef(type: any): any; export declare function resolveForwardRef(type: any): any;
/** @deprecated */ /** @deprecated */
@ -778,7 +728,6 @@ export declare abstract class Sanitizer {
abstract sanitize(context: SecurityContext, value: {} | string | null): string | null; abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
} }
/** @experimental */
export interface SchemaMetadata { export interface SchemaMetadata {
name: string; name: string;
} }
@ -799,7 +748,6 @@ export interface SelfDecorator {
new (): Self; new (): Self;
} }
/** @experimental */
export declare function setTestabilityGetter(getter: GetTestability): void; export declare function setTestabilityGetter(getter: GetTestability): void;
export declare class SimpleChange { export declare class SimpleChange {
@ -823,13 +771,11 @@ export interface SkipSelfDecorator {
export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[]; export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
/** @experimental */
export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader { export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig); constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
load(path: string): Promise<NgModuleFactory<any>>; load(path: string): Promise<NgModuleFactory<any>>;
} }
/** @experimental */
export declare abstract class SystemJsNgModuleLoaderConfig { export declare abstract class SystemJsNgModuleLoaderConfig {
factoryPathPrefix: string; factoryPathPrefix: string;
factoryPathSuffix: string; factoryPathSuffix: string;
@ -840,7 +786,6 @@ export declare abstract class TemplateRef<C> {
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>; abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
} }
/** @experimental */
export declare class Testability implements PublicTestability { export declare class Testability implements PublicTestability {
constructor(_ngZone: NgZone); constructor(_ngZone: NgZone);
/** @deprecated */ decreasePendingRequestCount(): number; /** @deprecated */ decreasePendingRequestCount(): number;
@ -851,7 +796,6 @@ export declare class Testability implements PublicTestability {
whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void; whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
} }
/** @experimental */
export declare class TestabilityRegistry { export declare class TestabilityRegistry {
constructor(); constructor();
findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null; findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
@ -867,10 +811,8 @@ export interface TrackByFunction<T> {
(index: number, item: T): any; (index: number, item: T): any;
} }
/** @experimental */
export declare const TRANSLATIONS: InjectionToken<string>; export declare const TRANSLATIONS: InjectionToken<string>;
/** @experimental */
export declare const TRANSLATIONS_FORMAT: InjectionToken<string>; export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
export declare const Type: FunctionConstructor; export declare const Type: FunctionConstructor;
@ -957,19 +899,14 @@ export declare class WrappedValue {
static wrap(value: any): WrappedValue; static wrap(value: any): WrappedValue;
} }
/** @experimental */
export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn; export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn;
/** @experimental */
export declare const wtfEndTimeRange: (range: any) => void; export declare const wtfEndTimeRange: (range: any) => void;
/** @experimental */
export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T; export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T;
/** @experimental */
export interface WtfScopeFn { export interface WtfScopeFn {
(arg0?: any, arg1?: any): any; (arg0?: any, arg1?: any): any;
} }
/** @experimental */
export declare const wtfStartTimeRange: (rangeType: string, action: string) => any; export declare const wtfStartTimeRange: (rangeType: string, action: string) => any;

View File

@ -18,43 +18,33 @@ export declare class ComponentFixture<T> {
whenStable(): Promise<any>; whenStable(): Promise<any>;
} }
/** @experimental */
export declare const ComponentFixtureAutoDetect: InjectionToken<boolean[]>; export declare const ComponentFixtureAutoDetect: InjectionToken<boolean[]>;
/** @experimental */
export declare const ComponentFixtureNoNgZone: InjectionToken<boolean[]>; export declare const ComponentFixtureNoNgZone: InjectionToken<boolean[]>;
/** @experimental */
export declare function discardPeriodicTasks(): void; export declare function discardPeriodicTasks(): void;
/** @experimental */
export declare function fakeAsync(fn: Function): (...args: any[]) => any; export declare function fakeAsync(fn: Function): (...args: any[]) => any;
/** @experimental */
export declare function flush(maxTurns?: number): number; export declare function flush(maxTurns?: number): number;
/** @experimental */
export declare function flushMicrotasks(): void; export declare function flushMicrotasks(): void;
/** @experimental */
export declare const getTestBed: () => TestBed; export declare const getTestBed: () => TestBed;
export declare function inject(tokens: any[], fn: Function): () => any; export declare function inject(tokens: any[], fn: Function): () => any;
/** @experimental */
export declare class InjectSetupWrapper { export declare class InjectSetupWrapper {
constructor(_moduleDef: () => TestModuleMetadata); constructor(_moduleDef: () => TestModuleMetadata);
inject(tokens: any[], fn: Function): () => any; inject(tokens: any[], fn: Function): () => any;
} }
/** @experimental */
export declare type MetadataOverride<T> = { export declare type MetadataOverride<T> = {
add?: Partial<T>; add?: Partial<T>;
remove?: Partial<T>; remove?: Partial<T>;
set?: Partial<T>; set?: Partial<T>;
}; };
/** @experimental */
export declare function resetFakeAsyncZone(): void; export declare function resetFakeAsyncZone(): void;
export declare const TestBed: TestBedStatic; export declare const TestBed: TestBedStatic;
@ -100,16 +90,14 @@ export interface TestBedStatic {
}): TestBedStatic; }): TestBedStatic;
overrideTemplate(component: Type<any>, template: string): TestBedStatic; overrideTemplate(component: Type<any>, template: string): TestBedStatic;
overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic; overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
/** @experimental */ resetTestEnvironment(): void; resetTestEnvironment(): void;
resetTestingModule(): TestBedStatic; resetTestingModule(): TestBedStatic;
} }
/** @experimental */
export declare class TestComponentRenderer { export declare class TestComponentRenderer {
insertRootElement(rootElementId: string): void; insertRootElement(rootElementId: string): void;
} }
/** @experimental */
export declare type TestModuleMetadata = { export declare type TestModuleMetadata = {
providers?: any[]; providers?: any[];
declarations?: any[]; declarations?: any[];
@ -118,9 +106,7 @@ export declare type TestModuleMetadata = {
aotSummaries?: () => any[]; aotSummaries?: () => any[];
}; };
/** @experimental */
export declare function tick(millis?: number): void; export declare function tick(millis?: number): void;
/** @experimental */
export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper; export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;
export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any; export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;