2021-06-28 13:54:20 -04:00
|
|
|
## API Report File for "@angular/core"
|
|
|
|
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
import { Subject } from 'rxjs';
|
|
|
|
import { Subscription } from 'rxjs';
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export interface AbstractType<T> extends Function {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
prototype: T;
|
|
|
|
}
|
2019-03-13 20:02:31 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface AfterContentChecked {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngAfterContentChecked(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface AfterContentInit {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngAfterContentInit(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface AfterViewChecked {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngAfterViewChecked(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface AfterViewInit {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngAfterViewInit(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
|
2016-07-07 13:05:55 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
2016-08-02 10:54:14 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const APP_ID: InjectionToken<string>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ApplicationInitStatus {
|
|
|
|
constructor(appInits: ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>);
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly done = false;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly donePromise: Promise<any>;
|
2021-06-28 13:54:20 -04:00
|
|
|
}
|
2016-08-02 10:54:14 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ApplicationModule {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(appRef: ApplicationRef);
|
|
|
|
}
|
2016-07-18 06:50:31 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ApplicationRef {
|
2019-05-15 23:24:29 -04:00
|
|
|
attachView(viewRef: ViewRef): void;
|
|
|
|
bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
2021-06-28 13:54:20 -04:00
|
|
|
readonly components: ComponentRef<any>[];
|
|
|
|
readonly componentTypes: Type<any>[];
|
2019-05-15 23:24:29 -04:00
|
|
|
detachView(viewRef: ViewRef): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
readonly isStable: Observable<boolean>;
|
2019-05-15 23:24:29 -04:00
|
|
|
tick(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
get viewCount(): number;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export function asNativeElements(debugEls: DebugElement[]): any;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function assertPlatform(requiredToken: any): PlatformRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Attribute {
|
2020-07-18 09:05:28 -04:00
|
|
|
attributeName: string;
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Attribute: AttributeDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface AttributeDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(name: string): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (name: string): Attribute;
|
2019-01-11 19:07:01 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum ChangeDetectionStrategy {
|
|
|
|
Default = 1,
|
|
|
|
OnPush = 0
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class ChangeDetectorRef {
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract checkNoChanges(): void;
|
|
|
|
abstract detach(): void;
|
|
|
|
abstract detectChanges(): void;
|
|
|
|
abstract markForCheck(): void;
|
|
|
|
abstract reattach(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ClassProvider extends ClassSansProvider {
|
2019-05-15 23:24:29 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
2016-08-15 22:37:42 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ClassSansProvider {
|
2019-06-10 13:04:11 -04:00
|
|
|
useClass: Type<any>;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class Compiler {
|
|
|
|
clearCache(): void;
|
|
|
|
clearCacheFor(type: Type<any>): void;
|
2019-05-15 23:24:29 -04:00
|
|
|
compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
|
|
|
|
compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
|
|
|
|
compileModuleAsync: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
|
|
|
|
compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
|
|
|
|
getModuleId(moduleType: Type<any>): string | undefined;
|
2016-06-24 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
|
2016-08-04 14:31:58 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class CompilerFactory {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract createCompiler(options?: CompilerOptions[]): Compiler;
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type CompilerOptions = {
|
2019-05-15 23:24:29 -04:00
|
|
|
useJit?: boolean;
|
|
|
|
defaultEncapsulation?: ViewEncapsulation;
|
|
|
|
providers?: StaticProvider[];
|
|
|
|
missingTranslation?: MissingTranslationStrategy;
|
|
|
|
preserveWhitespaces?: boolean;
|
2016-08-04 14:31:58 -04:00
|
|
|
};
|
refactor(core): clean up platform bootstrap and initTestEnvironment
- Introduces `CompilerFactory` which can be part of a `PlatformRef`.
- Introduces `WorkerAppModule`, `WorkerUiModule`, `ServerModule`
- Introduces `serverDynamicPlatform` for applications using runtime compilation
on the server.
- Changes browser bootstrap for runtime and offline compilation (see below for an example).
* introduces `bootstrapModule` and `bootstrapModuleFactory` in `@angular/core`
* introduces new `browserDynamicPlatform` in `@angular/platform-browser-dynamic
- Changes `initTestEnvironment` (which used to be `setBaseTestProviders`) to not take a compiler factory any more (see below for an example).
BREAKING CHANGE:
## Migration from `setBaseTestProviders` to `initTestEnvironment`:
- For the browser platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {browserDynamicTestPlatform,
BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
BrowserDynamicTestModule,
browserDynamicTestPlatform());
```
- For the server platform:
BEFORE:
```
import {setBaseTestProviders} from ‘@angular/core/testing’;
import {TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
TEST_SERVER_APPLICATION_PROVIDERS);
```
AFTER:
```
import {initTestEnvironment} from ‘@angular/core/testing’;
import {serverTestPlatform,
ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
initTestEnvironment(
ServerTestModule,
serverTestPlatform());
```
## Bootstrap changes
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {browserPlatform} from ‘@angular/platform-browser’;
import {bootstrapModuleFactory} from ‘@angular/core’;
bootstrapModuleFactory(MyModuleNgFactory, browserPlatform());
// runtime compile long form
import {browserDynamicPlatform} from ‘@angular/platform-browser-dynamic’;
import {bootstrapModule} from ‘@angular/core’;
bootstrapModule(MyModule, browserDynamicPlatform());
```
Closes #9922
Part of #9726
2016-07-08 13:47:17 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Component extends Directive {
|
2019-05-15 23:24:29 -04:00
|
|
|
animations?: any[];
|
|
|
|
changeDetection?: ChangeDetectionStrategy;
|
|
|
|
encapsulation?: ViewEncapsulation;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated
|
|
|
|
entryComponents?: Array<Type<any> | any[]>;
|
2019-05-15 23:24:29 -04:00
|
|
|
interpolation?: [string, string];
|
|
|
|
moduleId?: string;
|
|
|
|
preserveWhitespaces?: boolean;
|
|
|
|
styles?: string[];
|
2021-06-28 13:54:20 -04:00
|
|
|
styleUrls?: string[];
|
2019-05-15 23:24:29 -04:00
|
|
|
template?: string;
|
|
|
|
templateUrl?: string;
|
|
|
|
viewProviders?: Provider[];
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Component: ComponentDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ComponentDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(obj: Component): TypeDecorator;
|
|
|
|
new (obj: Component): Component;
|
2016-09-14 18:12:25 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class ComponentFactory<C> {
|
|
|
|
abstract get componentType(): Type<any>;
|
|
|
|
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
|
|
|
abstract get inputs(): {
|
|
|
|
propName: string;
|
|
|
|
templateName: string;
|
|
|
|
}[];
|
|
|
|
abstract get ngContentSelectors(): string[];
|
|
|
|
abstract get outputs(): {
|
|
|
|
propName: string;
|
|
|
|
templateName: string;
|
|
|
|
}[];
|
|
|
|
abstract get selector(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export abstract class ComponentFactoryResolver {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
static NULL: ComponentFactoryResolver;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class ComponentRef<C> {
|
2019-11-09 13:36:22 -05:00
|
|
|
abstract get changeDetectorRef(): ChangeDetectorRef;
|
|
|
|
abstract get componentType(): Type<any>;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract destroy(): void;
|
2019-11-09 13:36:22 -05:00
|
|
|
abstract get hostView(): ViewRef;
|
|
|
|
abstract get injector(): Injector;
|
|
|
|
abstract get instance(): C;
|
|
|
|
abstract get location(): ElementRef;
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract onDestroy(callback: Function): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ConstructorProvider extends ConstructorSansProvider {
|
2019-07-02 16:57:02 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: Type<any>;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ConstructorSansProvider {
|
2019-05-15 23:24:29 -04:00
|
|
|
deps?: any[];
|
|
|
|
}
|
2018-05-09 19:49:39 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type ContentChild = Query;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export const ContentChild: ContentChildDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ContentChildDecorator {
|
2021-04-12 11:32:10 -04:00
|
|
|
(selector: ProviderToken<unknown> | Function | string, opts?: {
|
2019-05-15 23:24:29 -04:00
|
|
|
read?: any;
|
2019-10-03 15:54:07 -04:00
|
|
|
static?: boolean;
|
2019-05-15 23:24:29 -04:00
|
|
|
}): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-04-12 11:32:10 -04:00
|
|
|
new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
2019-05-15 23:24:29 -04:00
|
|
|
read?: any;
|
2019-10-03 15:54:07 -04:00
|
|
|
static?: boolean;
|
2019-05-15 23:24:29 -04:00
|
|
|
}): ContentChild;
|
2016-09-14 14:51:26 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type ContentChildren = Query;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export const ContentChildren: ContentChildrenDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ContentChildrenDecorator {
|
2021-04-12 11:32:10 -04:00
|
|
|
(selector: ProviderToken<unknown> | Function | string, opts?: {
|
2019-05-15 23:24:29 -04:00
|
|
|
descendants?: boolean;
|
2020-12-10 18:10:56 -05:00
|
|
|
emitDistinctChangesOnly?: boolean;
|
2019-05-15 23:24:29 -04:00
|
|
|
read?: any;
|
|
|
|
}): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-04-12 11:32:10 -04:00
|
|
|
new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
2019-05-15 23:24:29 -04:00
|
|
|
descendants?: boolean;
|
2020-12-10 18:10:56 -05:00
|
|
|
emitDistinctChangesOnly?: boolean;
|
2019-05-15 23:24:29 -04:00
|
|
|
read?: any;
|
|
|
|
}): Query;
|
2016-09-14 14:51:26 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function createPlatform(injector: Injector): PlatformRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
|
2019-05-15 23:24:29 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
2019-05-15 23:24:29 -04:00
|
|
|
|
2021-07-01 11:41:29 -04:00
|
|
|
// @public (undocumented)
|
2021-06-28 13:54:20 -04:00
|
|
|
export interface DebugElement extends DebugNode {
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly attributes: {
|
|
|
|
[key: string]: string | null;
|
|
|
|
};
|
|
|
|
readonly childNodes: DebugNode[];
|
|
|
|
readonly children: DebugElement[];
|
|
|
|
readonly classes: {
|
|
|
|
[key: string]: boolean;
|
|
|
|
};
|
|
|
|
readonly name: string;
|
|
|
|
readonly nativeElement: any;
|
|
|
|
readonly properties: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
query(predicate: Predicate<DebugElement>): DebugElement;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
queryAll(predicate: Predicate<DebugElement>): DebugElement[];
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
|
2021-06-28 13:54:20 -04:00
|
|
|
readonly styles: {
|
|
|
|
[key: string]: string | null;
|
|
|
|
};
|
2019-05-15 23:24:29 -04:00
|
|
|
triggerEventHandler(eventName: string, eventObj: any): void;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const DebugElement: {
|
2019-05-15 23:24:29 -04:00
|
|
|
new (...args: any[]): DebugElement;
|
|
|
|
};
|
2018-11-22 00:14:06 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export class DebugEventListener {
|
|
|
|
constructor(name: string, callback: Function);
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
callback: Function;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
name: string;
|
2019-04-10 07:27:17 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export interface DebugNode {
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly componentInstance: any;
|
|
|
|
readonly context: any;
|
|
|
|
readonly injector: Injector;
|
|
|
|
readonly listeners: DebugEventListener[];
|
|
|
|
readonly nativeNode: any;
|
|
|
|
readonly parent: DebugElement | null;
|
|
|
|
readonly providerTokens: any[];
|
|
|
|
readonly references: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
2019-05-15 22:20:02 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const DebugNode: {
|
2019-05-15 23:24:29 -04:00
|
|
|
new (...args: any[]): DebugNode;
|
|
|
|
};
|
2018-11-22 00:14:06 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
|
2019-12-14 05:39:41 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated (undocumented)
|
|
|
|
export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(trackByFn?: TrackByFunction<V>);
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
check(collection: NgIterable<V>): boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
readonly collection: V[] | Iterable<V> | null;
|
|
|
|
// (undocumented)
|
2019-10-03 12:31:28 -04:00
|
|
|
diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
get isDirty(): boolean;
|
|
|
|
// (undocumented)
|
|
|
|
readonly length: number;
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
onDestroy(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated (undocumented)
|
|
|
|
export const defineInjectable: typeof ɵɵdefineInjectable;
|
2018-02-16 11:45:21 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function destroyPlatform(): void;
|
2016-08-12 17:15:37 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Directive {
|
2019-05-15 23:24:29 -04:00
|
|
|
exportAs?: string;
|
|
|
|
host?: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
|
|
|
inputs?: string[];
|
|
|
|
jit?: true;
|
|
|
|
outputs?: string[];
|
|
|
|
providers?: Provider[];
|
|
|
|
queries?: {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
|
|
|
selector?: string;
|
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Directive: DirectiveDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface DirectiveDecorator {
|
feat(compiler): allow selector-less directives as base classes (#31379)
In Angular today, the following pattern works:
```typescript
export class BaseDir {
constructor(@Inject(ViewContainerRef) protected vcr: ViewContainerRef) {}
}
@Directive({
selector: '[child]',
})
export class ChildDir extends BaseDir {
// constructor inherited from BaseDir
}
```
A decorated child class can inherit a constructor from an undecorated base
class, so long as the base class has metadata of its own (for JIT mode).
This pattern works regardless of metadata in AOT.
In Angular Ivy, this pattern does not work: without the @Directive
annotation identifying the base class as a directive, information about its
constructor parameters will not be captured by the Ivy compiler. This is a
result of Ivy's locality principle, which is the basis behind a number of
compilation optimizations.
As a solution, @Directive() without a selector will be interpreted as a
"directive base class" annotation. Such a directive cannot be declared in an
NgModule, but can be inherited from. To implement this, a few changes are
made to the ngc compiler:
* the error for a selector-less directive is now generated when an NgModule
declaring it is processed, not when the directive itself is processed.
* selector-less directives are not tracked along with other directives in
the compiler, preventing other errors (like their absence in an NgModule)
from being generated from them.
PR Close #31379
2019-07-01 19:04:58 -04:00
|
|
|
(obj?: Directive): TypeDecorator;
|
|
|
|
new (obj?: Directive): Directive;
|
2016-09-14 18:12:25 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface DoBootstrap {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
ngDoBootstrap(appRef: ApplicationRef): void;
|
|
|
|
}
|
2018-06-18 05:29:29 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface DoCheck {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngDoCheck(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ElementRef<T = any> {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(nativeElement: T);
|
2021-06-28 13:54:20 -04:00
|
|
|
nativeElement: T;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class EmbeddedViewRef<C> extends ViewRef {
|
2021-01-08 07:29:45 -05:00
|
|
|
abstract context: C;
|
2019-11-09 13:36:22 -05:00
|
|
|
abstract get rootNodes(): any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function enableProdMode(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ErrorHandler {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
handleError(error: any): void;
|
|
|
|
}
|
2016-08-25 03:50:16 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface EventEmitter<T> extends Subject<T> {
|
2020-05-13 04:45:46 -04:00
|
|
|
new (isAsync?: boolean): EventEmitter<T>;
|
2019-05-15 23:24:29 -04:00
|
|
|
emit(value?: T): void;
|
2021-01-30 11:59:37 -05:00
|
|
|
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
|
|
|
|
subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const EventEmitter: {
|
2020-05-13 04:45:46 -04:00
|
|
|
new (isAsync?: boolean): EventEmitter<any>;
|
|
|
|
new <T>(isAsync?: boolean): EventEmitter<T>;
|
|
|
|
readonly prototype: EventEmitter<any>;
|
|
|
|
};
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ExistingProvider extends ExistingSansProvider {
|
2019-05-15 23:24:29 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
2016-08-15 22:37:42 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ExistingSansProvider {
|
2019-07-02 16:57:02 -04:00
|
|
|
useExisting: any;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface FactoryProvider extends FactorySansProvider {
|
2019-05-15 23:24:29 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
2016-08-15 22:37:42 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface FactorySansProvider {
|
2019-07-02 16:57:02 -04:00
|
|
|
deps?: any[];
|
|
|
|
useFactory: Function;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ForwardRefFn {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
(): any;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const getDebugNode: (nativeNode: any) => DebugNode | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const getModuleFactory: (id: string) => NgModuleFactory<any>;
|
2016-09-01 16:46:08 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function getPlatform(): PlatformRef | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface GetTestability {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
addToWindow(registry: TestabilityRegistry): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Host {
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Host: HostDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface HostBinding {
|
2019-05-15 23:24:29 -04:00
|
|
|
hostPropertyName?: string;
|
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const HostBinding: HostBindingDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface HostBindingDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(hostPropertyName?: string): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (hostPropertyName?: string): any;
|
2019-02-19 14:52:21 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface HostDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (): Host;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface HostListener {
|
2019-05-15 23:24:29 -04:00
|
|
|
args?: string[];
|
|
|
|
eventName?: string;
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const HostListener: HostListenerDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface HostListenerDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(eventName: string, args?: string[]): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (eventName: string, args?: string[]): any;
|
2019-02-19 14:52:21 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Inject {
|
2019-05-15 23:24:29 -04:00
|
|
|
token: any;
|
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Inject: InjectDecorator;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export const inject: typeof ɵɵinject;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Injectable {
|
2019-08-22 22:19:41 -04:00
|
|
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Injectable: InjectableDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface InjectableDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(): TypeDecorator;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
(options?: {
|
2019-08-22 22:19:41 -04:00
|
|
|
providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
|
2019-05-15 23:24:29 -04:00
|
|
|
} & InjectableProvider): TypeDecorator;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (): Injectable;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (options?: {
|
2019-08-22 22:19:41 -04:00
|
|
|
providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
|
2019-05-15 23:24:29 -04:00
|
|
|
} & InjectableProvider): Injectable;
|
feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.
Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".
Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.
Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.
Additionally, this commit adds several unit and integration tests of various
flavors to test this change.
PR Close #22005
2018-02-02 13:33:48 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
|
feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.
Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".
Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.
Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.
Additionally, this commit adds several unit and integration tests of various
flavors to test this change.
PR Close #22005
2018-02-02 13:33:48 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface InjectableType<T> extends Type<T> {
|
2021-03-01 14:09:21 -05:00
|
|
|
ɵprov: unknown;
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface InjectDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(token: any): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (token: any): Inject;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum InjectFlags {
|
2019-05-15 23:24:29 -04:00
|
|
|
Default = 0,
|
|
|
|
Host = 1,
|
2021-06-28 13:54:20 -04:00
|
|
|
Optional = 8,
|
2019-05-15 23:24:29 -04:00
|
|
|
Self = 2,
|
2021-06-28 13:54:20 -04:00
|
|
|
SkipSelf = 4
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.
Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".
Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.
Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.
Additionally, this commit adds several unit and integration tests of various
flavors to test this change.
PR Close #22005
2018-02-02 13:33:48 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class InjectionToken<T> {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(_desc: string, options?: {
|
2019-08-22 22:19:41 -04:00
|
|
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
2019-05-15 23:24:29 -04:00
|
|
|
factory: () => T;
|
|
|
|
});
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
protected _desc: string;
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
toString(): string;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
readonly ɵprov: unknown;
|
2017-01-03 19:54:46 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const INJECTOR: InjectionToken<Injector>;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export abstract class Injector {
|
|
|
|
// @deprecated (undocumented)
|
|
|
|
static create(providers: StaticProvider[], parent?: Injector): Injector;
|
2019-05-15 23:24:29 -04:00
|
|
|
static create(options: {
|
|
|
|
providers: StaticProvider[];
|
|
|
|
parent?: Injector;
|
|
|
|
name?: string;
|
|
|
|
}): Injector;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
|
|
|
// @deprecated (undocumented)
|
|
|
|
abstract get(token: any, notFoundValue?: any): any;
|
|
|
|
// (undocumented)
|
|
|
|
static NULL: Injector;
|
|
|
|
// (undocumented)
|
|
|
|
static THROW_IF_NOT_FOUND: {};
|
|
|
|
// (undocumented)
|
|
|
|
static ɵprov: unknown;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface InjectorType<T> extends Type<T> {
|
|
|
|
// (undocumented)
|
refactor(compiler): move factory out of injector definition (#41022)
Previously, injector definitions contained a `factory` property that
was used to create a new instance of the associated NgModule class.
Now this factory has been moved to its own `ɵfac` static property on the
NgModule class itself. This is inline with how directives, components and
pipes are created.
There is a small size increase to bundle sizes for each NgModule class,
because the `ɵfac` takes up a bit more space:
Before:
```js
let a = (() => {
class n {}
return n.\u0275mod = c.Cb({type: n}),
n.\u0275inj = c.Bb({factory: function(t) { return new (t || n) }, imports: [[e.a.forChild(s)], e.a]}),
n
})(),
```
After:
```js
let a = (() => {
class n {}
return n.\u0275fac = function(t) { return new (t || n) },
n.\u0275mod = c.Cb({type: n}),
n.\u0275inj = c.Bb({imports: [[r.a.forChild(s)], r.a]}),
n
})(),
```
In other words `n.\u0275fac = ` is longer than `factory: ` (by 5 characters)
and only because the tooling insists on encoding `ɵ` as `\u0275`.
This can be mitigated in a future PR by only generating the `ɵfac` property
if it is actually needed.
PR Close #41022
2021-02-26 14:21:29 -05:00
|
|
|
ɵfac?: unknown;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-03-01 14:09:21 -05:00
|
|
|
ɵinj: unknown;
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2018-02-16 11:45:21 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Input {
|
2019-05-15 23:24:29 -04:00
|
|
|
bindingPropertyName?: string;
|
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const Input: InputDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export interface InputDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(bindingPropertyName?: string): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (bindingPropertyName?: string): any;
|
2019-02-19 14:52:21 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function isDevMode(): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface IterableChangeRecord<V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly currentIndex: number | null;
|
|
|
|
readonly item: V;
|
|
|
|
readonly previousIndex: number | null;
|
|
|
|
readonly trackById: any;
|
|
|
|
}
|
2016-10-27 14:28:11 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface IterableChanges<V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
|
|
|
|
forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
|
|
|
forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
|
2016-10-27 14:28:11 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface IterableDiffer<V> {
|
2019-10-03 12:31:28 -04:00
|
|
|
diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface IterableDifferFactory {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
supports(objects: any): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class IterableDiffers {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(factories: IterableDifferFactory[]);
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
|
|
|
|
static extend(factories: IterableDifferFactory[]): StaticProvider;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated (undocumented)
|
|
|
|
factories: IterableDifferFactory[];
|
|
|
|
// (undocumented)
|
|
|
|
find(iterable: any): IterableDifferFactory;
|
|
|
|
// (undocumented)
|
|
|
|
static ɵprov: unknown;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface KeyValueChangeRecord<K, V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly currentValue: V | null;
|
|
|
|
readonly key: K;
|
|
|
|
readonly previousValue: V | null;
|
2016-10-27 14:28:11 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface KeyValueChanges<K, V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
|
|
|
forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface KeyValueDiffer<K, V> {
|
2019-05-15 23:24:29 -04:00
|
|
|
diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
|
|
|
|
diff(object: {
|
|
|
|
[key: string]: V;
|
|
|
|
}): KeyValueChanges<string, V> | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface KeyValueDifferFactory {
|
2019-05-15 23:24:29 -04:00
|
|
|
create<K, V>(): KeyValueDiffer<K, V>;
|
|
|
|
supports(objects: any): boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class KeyValueDiffers {
|
2019-05-15 23:24:29 -04:00
|
|
|
constructor(factories: KeyValueDifferFactory[]);
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
|
|
|
|
static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated (undocumented)
|
|
|
|
factories: KeyValueDifferFactory[];
|
|
|
|
// (undocumented)
|
|
|
|
find(kv: any): KeyValueDifferFactory;
|
|
|
|
// (undocumented)
|
|
|
|
static ɵprov: unknown;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const LOCALE_ID: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum MissingTranslationStrategy {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
Error = 0,
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
Ignore = 2,
|
|
|
|
// (undocumented)
|
|
|
|
Warning = 1
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2017-01-10 08:14:41 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ModuleWithComponentFactories<T> {
|
|
|
|
constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
componentFactories: ComponentFactory<any>[];
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
ngModuleFactory: NgModuleFactory<T>;
|
2016-07-29 07:19:02 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ModuleWithProviders<T> {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
ngModule: Type<T>;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
providers?: Provider[];
|
2016-07-25 08:47:16 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type NgIterable<T> = Array<T> | Iterable<T>;
|
2017-01-25 16:45:06 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface NgModule {
|
2019-05-15 23:24:29 -04:00
|
|
|
bootstrap?: Array<Type<any> | any[]>;
|
|
|
|
declarations?: Array<Type<any> | any[]>;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated
|
|
|
|
entryComponents?: Array<Type<any> | any[]>;
|
2019-05-15 23:24:29 -04:00
|
|
|
exports?: Array<Type<any> | any[]>;
|
|
|
|
id?: string;
|
|
|
|
imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
|
|
|
|
jit?: true;
|
|
|
|
providers?: Provider[];
|
|
|
|
schemas?: Array<SchemaMetadata | any[]>;
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const NgModule: NgModuleDecorator;
|
2016-07-18 06:50:31 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface NgModuleDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(obj?: NgModule): TypeDecorator;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (obj?: NgModule): NgModule;
|
2019-02-26 11:25:01 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export abstract class NgModuleFactory<T> {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
abstract get moduleType(): Type<T>;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export abstract class NgModuleFactoryLoader {
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract load(path: string): Promise<NgModuleFactory<any>>;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class NgModuleRef<T> {
|
2019-11-09 13:36:22 -05:00
|
|
|
abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract destroy(): void;
|
2019-11-09 13:36:22 -05:00
|
|
|
abstract get injector(): Injector;
|
|
|
|
abstract get instance(): T;
|
2019-05-15 23:24:29 -04:00
|
|
|
abstract onDestroy(callback: () => void): void;
|
2016-07-18 06:50:31 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class NgProbeToken {
|
|
|
|
constructor(name: string, token: any);
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
name: string;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
token: any;
|
2016-11-09 17:58:40 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class NgZone {
|
|
|
|
constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
|
|
|
|
enableLongStackTrace?: boolean | undefined;
|
|
|
|
shouldCoalesceEventChangeDetection?: boolean | undefined;
|
|
|
|
shouldCoalesceRunChangeDetection?: boolean | undefined;
|
|
|
|
});
|
|
|
|
// (undocumented)
|
|
|
|
static assertInAngularZone(): void;
|
|
|
|
// (undocumented)
|
|
|
|
static assertNotInAngularZone(): void;
|
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly hasPendingMacrotasks: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly hasPendingMicrotasks: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
static isInAngularZone(): boolean;
|
2019-05-15 23:24:29 -04:00
|
|
|
readonly isStable: boolean;
|
|
|
|
readonly onError: EventEmitter<any>;
|
|
|
|
readonly onMicrotaskEmpty: EventEmitter<any>;
|
|
|
|
readonly onStable: EventEmitter<any>;
|
|
|
|
readonly onUnstable: EventEmitter<any>;
|
|
|
|
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
|
|
|
runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
|
|
|
runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
|
|
|
runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const NO_ERRORS_SCHEMA: SchemaMetadata;
|
2016-08-19 19:05:34 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface OnChanges {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngOnChanges(changes: SimpleChanges): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface OnDestroy {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngOnDestroy(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface OnInit {
|
2019-05-15 23:24:29 -04:00
|
|
|
ngOnInit(): void;
|
|
|
|
}
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Optional {
|
2019-05-15 23:24:29 -04:00
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Optional: OptionalDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface OptionalDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (): Optional;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Output {
|
2019-05-15 23:24:29 -04:00
|
|
|
bindingPropertyName?: string;
|
|
|
|
}
|
2018-11-26 17:44:45 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const Output: OutputDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface OutputDecorator {
|
2019-05-15 23:24:29 -04:00
|
|
|
(bindingPropertyName?: string): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-05-15 23:24:29 -04:00
|
|
|
new (bindingPropertyName?: string): any;
|
2019-02-19 14:52:21 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const PACKAGE_ROOT_URL: InjectionToken<string>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Pipe {
|
2018-11-26 17:44:45 -05:00
|
|
|
name: string;
|
|
|
|
pure?: boolean;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const Pipe: PipeDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface PipeDecorator {
|
2019-02-19 14:52:21 -05:00
|
|
|
(obj: Pipe): TypeDecorator;
|
|
|
|
new (obj: Pipe): Pipe;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface PipeTransform {
|
|
|
|
// (undocumented)
|
2016-06-22 17:56:10 -04:00
|
|
|
transform(value: any, ...args: any[]): any;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const PLATFORM_ID: InjectionToken<Object>;
|
2017-02-22 19:49:46 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
2016-07-25 08:47:16 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class PlatformRef {
|
2018-04-05 17:31:44 -04:00
|
|
|
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
|
2018-10-19 11:27:04 -04:00
|
|
|
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
|
2017-09-12 14:45:02 -04:00
|
|
|
destroy(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
get destroyed(): boolean;
|
|
|
|
get injector(): Injector;
|
2017-09-12 14:45:02 -04:00
|
|
|
onDestroy(callback: () => void): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Predicate<T> {
|
|
|
|
// (undocumented)
|
2017-03-29 12:34:45 -04:00
|
|
|
(value: T): boolean;
|
2017-03-01 17:10:59 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
2021-04-12 11:32:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Query {
|
|
|
|
// (undocumented)
|
2018-11-26 17:44:45 -05:00
|
|
|
descendants: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2020-12-10 18:10:56 -05:00
|
|
|
emitDistinctChangesOnly: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2018-11-26 17:44:45 -05:00
|
|
|
first: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2018-11-26 17:44:45 -05:00
|
|
|
isViewQuery: boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2018-11-26 17:44:45 -05:00
|
|
|
read: any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2018-11-26 17:44:45 -05:00
|
|
|
selector: any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-10-03 15:54:07 -04:00
|
|
|
static?: boolean;
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class Query {
|
2016-09-12 22:34:14 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class QueryList<T> implements Iterable<T> {
|
|
|
|
// (undocumented)
|
fix(core): make QueryList implement Iterable in the type system (#33536)
Originally, QueryList implemented Iterable and provided a Symbol.iterator
on its prototype. This caused issues with tree-shaking, so QueryList was
refactored and the Symbol.iterator added in its constructor instead. As
part of this change, QueryList no longer implemented Iterable directly.
Unfortunately, this meant that QueryList was no longer assignable to
Iterable or, consequently, NgIterable. NgIterable is used for NgFor's input,
so this meant that QueryList was not usable (in a type sense) for NgFor
iteration. View Engine's template type checking would not catch this, but
Ivy's did.
As a fix, this commit adds the declaration (but not the implementation) of
the Symbol.iterator function back to QueryList. This has no runtime effect,
so it doesn't affect tree-shaking of QueryList, but it ensures that
QueryList is assignable to NgIterable and thus usable with NgFor.
Fixes #29842
PR Close #33536
2019-11-01 15:31:56 -04:00
|
|
|
[Symbol.iterator]: () => Iterator<T>;
|
2020-12-10 18:10:56 -05:00
|
|
|
constructor(_emitDistinctChangesOnly?: boolean);
|
2021-06-28 13:54:20 -04:00
|
|
|
get changes(): Observable<any>;
|
2017-09-02 10:42:22 -04:00
|
|
|
destroy(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
readonly dirty = true;
|
2016-06-22 17:56:10 -04:00
|
|
|
filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
2017-03-29 12:34:45 -04:00
|
|
|
find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
readonly first: T;
|
2016-06-22 17:56:10 -04:00
|
|
|
forEach(fn: (item: T, index: number, array: T[]) => void): void;
|
2020-05-03 13:04:56 -04:00
|
|
|
get(index: number): T | undefined;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
readonly last: T;
|
|
|
|
// (undocumented)
|
|
|
|
readonly length: number;
|
2016-06-23 21:19:32 -04:00
|
|
|
map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
|
|
|
|
notifyOnChanges(): void;
|
|
|
|
reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
|
2020-12-10 18:10:56 -05:00
|
|
|
reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
|
2016-06-23 21:19:32 -04:00
|
|
|
setDirty(): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
|
|
|
|
toArray(): T[];
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2016-06-22 17:56:10 -04:00
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export abstract class ReflectiveInjector implements Injector {
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
2021-06-28 13:54:20 -04:00
|
|
|
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
|
|
|
// (undocumented)
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract get(token: any, notFoundValue?: any): any;
|
2017-01-26 01:36:38 -05:00
|
|
|
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get parent(): Injector | null;
|
2016-08-15 22:37:42 -04:00
|
|
|
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
|
|
|
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
|
|
|
abstract resolveAndInstantiate(provider: Provider): any;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export class ReflectiveKey {
|
|
|
|
constructor(token: Object, id: number);
|
|
|
|
// (undocumented)
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly displayName: string;
|
2021-06-28 13:54:20 -04:00
|
|
|
static get(token: Object): ReflectiveKey;
|
|
|
|
// (undocumented)
|
2016-06-22 17:56:10 -04:00
|
|
|
id: number;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2019-11-09 13:36:22 -05:00
|
|
|
static get numberOfKeys(): number;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
token: Object;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class Renderer2 {
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract addClass(el: any, name: string): void;
|
|
|
|
abstract appendChild(parent: any, newChild: any): void;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract createComment(value: string): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract createElement(name: string, namespace?: string | null): any;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract createText(value: string): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get data(): {
|
|
|
|
[key: string]: any;
|
|
|
|
};
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract destroy(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
destroyNode: ((node: any) => void) | null;
|
2020-09-25 18:01:56 -04:00
|
|
|
abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
|
2017-03-07 19:36:12 -05:00
|
|
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract nextSibling(node: any): any;
|
|
|
|
abstract parentNode(node: any): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
|
2019-01-14 18:36:08 -05:00
|
|
|
abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract removeClass(el: any, name: string): void;
|
2017-03-13 12:45:04 -04:00
|
|
|
abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
|
2018-07-15 21:53:18 -04:00
|
|
|
abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
abstract setProperty(el: any, name: string, value: any): void;
|
2017-03-13 12:45:04 -04:00
|
|
|
abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
|
2017-02-16 16:55:55 -05:00
|
|
|
abstract setValue(node: any, value: string): void;
|
2017-02-15 00:03:18 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class RendererFactory2 {
|
2017-05-03 16:17:46 -04:00
|
|
|
abstract begin?(): void;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
|
2017-05-03 16:17:46 -04:00
|
|
|
abstract end?(): void;
|
2017-05-12 17:32:51 -04:00
|
|
|
abstract whenRenderingDone?(): Promise<any>;
|
2017-03-07 19:36:12 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum RendererStyleFlags2 {
|
|
|
|
DashCase = 2,
|
|
|
|
Important = 1
|
2017-03-13 12:45:04 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface RendererType2 {
|
2017-03-07 19:36:12 -05:00
|
|
|
data: {
|
|
|
|
[kind: string]: any;
|
|
|
|
};
|
|
|
|
encapsulation: ViewEncapsulation;
|
|
|
|
id: string;
|
|
|
|
styles: (string | any[])[];
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class ResolvedReflectiveFactory {
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(
|
2018-06-25 05:11:22 -04:00
|
|
|
factory: Function,
|
2020-12-15 21:47:57 -05:00
|
|
|
dependencies: ɵangular_packages_core_core_e[]);
|
2021-06-28 13:54:20 -04:00
|
|
|
dependencies: ɵangular_packages_core_core_e[];
|
|
|
|
factory: Function;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ResolvedReflectiveProvider {
|
2016-06-22 17:56:10 -04:00
|
|
|
key: ReflectiveKey;
|
|
|
|
multiProvider: boolean;
|
2016-06-23 21:19:32 -04:00
|
|
|
resolvedFactories: ResolvedReflectiveFactory[];
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function resolveForwardRef<T>(type: T): T;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class Sanitizer {
|
|
|
|
// (undocumented)
|
2017-04-14 17:40:56 -04:00
|
|
|
abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-03-01 14:09:21 -05:00
|
|
|
static ɵprov: unknown;
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SchemaMetadata {
|
|
|
|
// (undocumented)
|
2016-07-25 08:47:16 -04:00
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum SecurityContext {
|
|
|
|
// (undocumented)
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
HTML = 1,
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
NONE = 0,
|
|
|
|
// (undocumented)
|
|
|
|
RESOURCE_URL = 5,
|
|
|
|
// (undocumented)
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
SCRIPT = 3,
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
STYLE = 2,
|
|
|
|
// (undocumented)
|
|
|
|
URL = 4
|
feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
modules: [BrowserModule],
precompile: [MainComponent],
providers: […], // additional providers
directives: […], // additional platform directives
pipes: […] // additional platform pipes
})
class MyModule {
constructor(appRef: ApplicationRef) {
appRef.bootstrap(MainComponent);
}
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
to inject compiler internals (i.e. everything
from `@angular/compiler). Inject `Compiler` instead.
To provide custom providers for the compiler,
create a custom compiler via `browserCompiler({providers: [...]})`
and pass that into the `bootstrap` method.
2016-06-30 16:07:17 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface Self {
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Self: SelfDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SelfDecorator {
|
2018-04-05 17:31:44 -04:00
|
|
|
(): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2016-09-12 22:34:14 -04:00
|
|
|
new (): Self;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export function setTestabilityGetter(getter: GetTestability): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class SimpleChange {
|
|
|
|
constructor(previousValue: any, currentValue: any, firstChange: boolean);
|
|
|
|
// (undocumented)
|
2016-06-22 17:56:10 -04:00
|
|
|
currentValue: any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2017-01-03 14:58:49 -05:00
|
|
|
firstChange: boolean;
|
2016-06-22 17:56:10 -04:00
|
|
|
isFirstChange(): boolean;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
previousValue: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SimpleChanges {
|
|
|
|
// (undocumented)
|
2016-06-22 17:56:10 -04:00
|
|
|
[propName: string]: SimpleChange;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SkipSelf {
|
2018-11-26 17:44:45 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const SkipSelf: SkipSelfDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface SkipSelfDecorator {
|
2018-04-05 17:31:44 -04:00
|
|
|
(): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2016-09-12 22:34:14 -04:00
|
|
|
new (): SkipSelf;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface StaticClassProvider extends StaticClassSansProvider {
|
2019-07-02 16:57:02 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface StaticClassSansProvider {
|
2019-07-02 16:57:02 -04:00
|
|
|
deps: any[];
|
|
|
|
useClass: Type<any>;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
|
2017-07-27 16:49:33 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
|
2016-08-24 19:54:42 -04:00
|
|
|
constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2016-07-18 06:50:31 -04:00
|
|
|
load(path: string): Promise<NgModuleFactory<any>>;
|
2021-06-28 13:54:20 -04:00
|
|
|
}
|
2016-07-18 06:50:31 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export abstract class SystemJsNgModuleLoaderConfig {
|
2016-08-24 19:54:42 -04:00
|
|
|
factoryPathPrefix: string;
|
|
|
|
factoryPathSuffix: string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class TemplateRef<C> {
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get elementRef(): ElementRef;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class Testability implements PublicTestability {
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor(_ngZone: NgZone);
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated
|
|
|
|
decreasePendingRequestCount(): number;
|
2016-06-22 17:56:10 -04:00
|
|
|
findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated
|
|
|
|
getPendingRequestCount(): number;
|
|
|
|
// @deprecated
|
|
|
|
increasePendingRequestCount(): number;
|
2016-06-23 21:19:32 -04:00
|
|
|
isStable(): boolean;
|
2017-04-27 14:44:14 -04:00
|
|
|
whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export class TestabilityRegistry {
|
2016-06-22 17:56:10 -04:00
|
|
|
constructor();
|
2017-03-29 12:34:45 -04:00
|
|
|
findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
|
2016-06-23 21:19:32 -04:00
|
|
|
getAllRootElements(): any[];
|
|
|
|
getAllTestabilities(): Testability[];
|
2017-03-29 12:34:45 -04:00
|
|
|
getTestability(elem: any): Testability | null;
|
2016-06-23 21:19:32 -04:00
|
|
|
registerApplication(token: any, testability: Testability): void;
|
2017-09-08 14:50:13 -04:00
|
|
|
unregisterAllApplications(): void;
|
|
|
|
unregisterApplication(token: any): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface TrackByFunction<T> {
|
|
|
|
// (undocumented)
|
2021-06-28 15:35:03 -04:00
|
|
|
<U extends T>(index: number, item: T & U): any;
|
2017-01-25 16:45:06 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const TRANSLATIONS: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const TRANSLATIONS_FORMAT: InjectionToken<string>;
|
2016-08-12 17:45:36 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const Type: FunctionConstructor;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export interface Type<T> extends Function {
|
|
|
|
// (undocumented)
|
|
|
|
new (...args: any[]): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export interface TypeDecorator {
|
2016-08-10 21:21:28 -04:00
|
|
|
<T extends Type<any>>(type: T): T;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
|
|
|
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface TypeProvider extends Type<any> {
|
2016-08-15 22:37:42 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ValueProvider extends ValueSansProvider {
|
2016-08-15 22:37:42 -04:00
|
|
|
multi?: boolean;
|
|
|
|
provide: any;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ValueSansProvider {
|
2019-06-10 13:04:11 -04:00
|
|
|
useValue: any;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public (undocumented)
|
|
|
|
export const VERSION: Version;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export class Version {
|
|
|
|
constructor(full: string);
|
|
|
|
// (undocumented)
|
2016-11-30 16:52:08 -05:00
|
|
|
full: string;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly major: string;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly minor: string;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2017-02-07 22:27:01 -05:00
|
|
|
readonly patch: string;
|
2016-11-30 16:52:08 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type ViewChild = Query;
|
2016-11-30 16:52:08 -05:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export const ViewChild: ViewChildDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ViewChildDecorator {
|
2021-04-12 11:32:10 -04:00
|
|
|
(selector: ProviderToken<unknown> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
2019-10-03 15:54:07 -04:00
|
|
|
static?: boolean;
|
2016-09-14 14:51:26 -04:00
|
|
|
}): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-04-12 11:32:10 -04:00
|
|
|
new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
2019-10-03 15:54:07 -04:00
|
|
|
static?: boolean;
|
2016-09-14 14:51:26 -04:00
|
|
|
}): ViewChild;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export type ViewChildren = Query;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export const ViewChildren: ViewChildrenDecorator;
|
2016-06-22 17:56:10 -04:00
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export interface ViewChildrenDecorator {
|
2021-04-12 11:32:10 -04:00
|
|
|
(selector: ProviderToken<unknown> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
2020-12-10 18:10:56 -05:00
|
|
|
emitDistinctChangesOnly?: boolean;
|
2016-09-14 14:51:26 -04:00
|
|
|
}): any;
|
2021-06-28 13:54:20 -04:00
|
|
|
// (undocumented)
|
2021-04-12 11:32:10 -04:00
|
|
|
new (selector: ProviderToken<unknown> | Function | string, opts?: {
|
2016-09-14 14:51:26 -04:00
|
|
|
read?: any;
|
2020-12-10 18:10:56 -05:00
|
|
|
emitDistinctChangesOnly?: boolean;
|
2016-09-14 14:51:26 -04:00
|
|
|
}): ViewChildren;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class ViewContainerRef {
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract clear(): void;
|
2017-03-21 11:15:10 -04:00
|
|
|
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract detach(index?: number): ViewRef | null;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get element(): ElementRef;
|
2017-03-29 12:34:45 -04:00
|
|
|
abstract get(index: number): ViewRef | null;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract indexOf(viewRef: ViewRef): number;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get injector(): Injector;
|
2016-06-23 21:19:32 -04:00
|
|
|
abstract insert(viewRef: ViewRef, index?: number): ViewRef;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get length(): number;
|
2016-08-01 14:09:52 -04:00
|
|
|
abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated (undocumented)
|
|
|
|
abstract get parentInjector(): Injector;
|
2016-06-22 17:56:10 -04:00
|
|
|
abstract remove(index?: number): void;
|
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export enum ViewEncapsulation {
|
2016-06-22 17:56:10 -04:00
|
|
|
Emulated = 0,
|
|
|
|
None = 2,
|
2018-06-25 05:11:22 -04:00
|
|
|
ShadowDom = 3
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public
|
|
|
|
export abstract class ViewRef extends ChangeDetectorRef {
|
2016-11-24 05:32:28 -05:00
|
|
|
abstract destroy(): void;
|
2021-06-28 13:54:20 -04:00
|
|
|
abstract get destroyed(): boolean;
|
2018-06-25 05:11:22 -04:00
|
|
|
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 13:54:20 -04:00
|
|
|
// @public @deprecated
|
|
|
|
export class WrappedValue {
|
2017-12-13 18:54:43 -05:00
|
|
|
constructor(value: any);
|
|
|
|
static isWrapped(value: any): value is WrappedValue;
|
|
|
|
static unwrap(value: any): any;
|
2016-06-22 17:56:10 -04:00
|
|
|
static wrap(value: any): WrappedValue;
|
2021-06-28 13:54:20 -04:00
|
|
|
// @deprecated (undocumented)
|
|
|
|
wrapped: any;
|
2016-06-22 17:56:10 -04:00
|
|
|
}
|
2021-06-28 13:54:20 -04:00
|
|
|
|
|
|
|
// @public
|
|
|
|
export function ɵɵdefineInjectable<T>(opts: {
|
|
|
|
token: unknown;
|
|
|
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
|
|
factory: () => T;
|
|
|
|
}): unknown;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export function ɵɵinject<T>(token: ProviderToken<T>): T;
|
|
|
|
|
|
|
|
// @public (undocumented)
|
|
|
|
export function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export function ɵɵinjectAttribute(attrNameToInject: string): string | null;
|
|
|
|
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
|
|
|
```
|