From 42a5b6cbdac9db3671287de81aea15315359a2c5 Mon Sep 17 00:00:00 2001 From: Jason Choi Date: Thu, 23 Jun 2016 18:19:32 -0700 Subject: [PATCH] chore(testing): upgrade ts-api-guardian to 0.1.3 --- npm-shrinkwrap.clean.json | 2 +- npm-shrinkwrap.json | 39 +- package.json | 2 +- tools/public_api_guard/common/index.d.ts | 258 ++++++------- tools/public_api_guard/common/testing.d.ts | 32 +- tools/public_api_guard/compiler/index.d.ts | 300 +++++++-------- tools/public_api_guard/compiler/testing.d.ts | 46 +-- tools/public_api_guard/core/index.d.ts | 354 +++++++++--------- tools/public_api_guard/core/testing.d.ts | 6 +- tools/public_api_guard/forms/index.d.ts | 194 +++++----- tools/public_api_guard/http/index.d.ts | 66 ++-- tools/public_api_guard/http/testing.d.ts | 6 +- .../platform-browser/index.d.ts | 44 +-- tools/public_api_guard/router/index.d.ts | 46 +-- tools/public_api_guard/upgrade/index.d.ts | 12 +- 15 files changed, 709 insertions(+), 698 deletions(-) diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 2dbafc0286..7b900d4bf8 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -5280,7 +5280,7 @@ "version": "1.0.0" }, "ts-api-guardian": { - "version": "0.1.2", + "version": "0.1.3", "dependencies": { "ansi-regex": { "version": "2.0.0" diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 7b420bb3ac..a8cdeaf9a8 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2867,7 +2867,8 @@ }, "lodash": { "version": "4.13.1", - "from": "lodash@>=4.0.0 <5.0.0" + "from": "lodash@4.13.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" }, "readable-stream": { "version": "2.0.6", @@ -2896,7 +2897,8 @@ }, "lodash": { "version": "4.13.1", - "from": "lodash@>=4.2.1 <5.0.0" + "from": "lodash@4.13.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" }, "readable-stream": { "version": "2.0.6", @@ -4394,15 +4396,18 @@ "dependencies": { "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0" + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0" + "from": "readable-stream@2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0" + "from": "through2@2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz" } } }, @@ -4418,7 +4423,8 @@ "dependencies": { "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0" + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, "lodash.escape": { "version": "4.0.0", @@ -4442,11 +4448,13 @@ }, "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0" + "from": "readable-stream@2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0" + "from": "through2@2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz" } } }, @@ -7959,15 +7967,18 @@ "dependencies": { "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0" + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0" + "from": "readable-stream@2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <2.1.0" + "from": "through2@2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz" } } }, @@ -8407,9 +8418,9 @@ "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.0.tgz" }, "ts-api-guardian": { - "version": "0.1.2", - "from": "ts-api-guardian@0.1.2", - "resolved": "https://registry.npmjs.org/ts-api-guardian/-/ts-api-guardian-0.1.2.tgz", + "version": "0.1.3", + "from": "ts-api-guardian@0.1.3", + "resolved": "https://registry.npmjs.org/ts-api-guardian/-/ts-api-guardian-0.1.3.tgz", "dependencies": { "ansi-regex": { "version": "2.0.0", diff --git a/package.json b/package.json index c4fc75ce69..317a581017 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "systemjs": "0.18.10", "systemjs-builder": "^0.10.3", "through2": "^0.6.5", - "ts-api-guardian": "0.1.2", + "ts-api-guardian": "0.1.3", "ts2dart": "^0.9.10", "tsickle": "^0.1.4", "tslint": "^3.10.0-dev.2", diff --git a/tools/public_api_guard/common/index.d.ts b/tools/public_api_guard/common/index.d.ts index 75cad3000e..2eecb2c1ee 100644 --- a/tools/public_api_guard/common/index.d.ts +++ b/tools/public_api_guard/common/index.d.ts @@ -1,55 +1,55 @@ export declare abstract class AbstractControl { - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; - constructor(validator: ValidatorFn, asyncValidator: AsyncValidatorFn); - value: any; - status: string; - valid: boolean; + dirty: boolean; errors: { [key: string]: any; }; + pending: boolean; pristine: boolean; - dirty: boolean; + root: AbstractControl; + status: string; + statusChanges: Observable; touched: boolean; untouched: boolean; + valid: boolean; + validator: ValidatorFn; + value: any; valueChanges: Observable; - statusChanges: Observable; - pending: boolean; - markAsTouched(): void; + constructor(validator: ValidatorFn, asyncValidator: AsyncValidatorFn); + find(path: Array | string): AbstractControl; + getError(errorCode: string, path?: string[]): any; + hasError(errorCode: string, path?: string[]): boolean; markAsDirty({onlySelf}?: { onlySelf?: boolean; }): void; markAsPending({onlySelf}?: { onlySelf?: boolean; }): void; - setParent(parent: ControlGroup | ControlArray): void; - updateValueAndValidity({onlySelf, emitEvent}?: { - onlySelf?: boolean; - emitEvent?: boolean; - }): void; + markAsTouched(): void; setErrors(errors: { [key: string]: any; }, {emitEvent}?: { emitEvent?: boolean; }): void; - find(path: Array | string): AbstractControl; - getError(errorCode: string, path?: string[]): any; - hasError(errorCode: string, path?: string[]): boolean; - root: AbstractControl; + setParent(parent: ControlGroup | ControlArray): void; + updateValueAndValidity({onlySelf, emitEvent}?: { + onlySelf?: boolean; + emitEvent?: boolean; + }): void; } export declare abstract class AbstractControlDirective { control: AbstractControl; - value: any; - valid: boolean; + dirty: boolean; errors: { [key: string]: any; }; + path: string[]; pristine: boolean; - dirty: boolean; touched: boolean; untouched: boolean; - path: string[]; + valid: boolean; + value: any; } export declare const APP_BASE_HREF: OpaqueToken; @@ -64,9 +64,9 @@ export declare class CheckboxControlValueAccessor implements ControlValueAccesso onChange: (_: any) => void; onTouched: () => void; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (_: any) => {}): void; registerOnTouched(fn: () => {}): void; + writeValue(value: any): void; } export declare const COMMON_DIRECTIVES: Type[][]; @@ -75,27 +75,27 @@ export declare const COMMON_PIPES: (typeof AsyncPipe | typeof SlicePipe | typeof export declare class Control extends AbstractControl { constructor(value?: any, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); + registerOnChange(fn: Function): void; updateValue(value: any, {onlySelf, emitEvent, emitModelToViewChange}?: { onlySelf?: boolean; emitEvent?: boolean; emitModelToViewChange?: boolean; }): void; - registerOnChange(fn: Function): void; } export declare class ControlArray extends AbstractControl { controls: AbstractControl[]; + length: number; constructor(controls: AbstractControl[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); at(index: number): AbstractControl; - push(control: AbstractControl): void; insert(index: number, control: AbstractControl): void; + push(control: AbstractControl): void; removeAt(index: number): void; - length: number; } export declare class ControlContainer extends AbstractControlDirective { - name: string; formDirective: Form; + name: string; path: string[]; } @@ -108,18 +108,18 @@ export declare class ControlGroup extends AbstractControl { }, optionals?: { [key: string]: boolean; }, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); - registerControl(name: string, control: AbstractControl): void; addControl(name: string, control: AbstractControl): void; - removeControl(name: string): void; - include(controlName: string): void; - exclude(controlName: string): void; contains(controlName: string): boolean; + exclude(controlName: string): void; + include(controlName: string): void; + registerControl(name: string, control: AbstractControl): void; + removeControl(name: string): void; } export interface ControlValueAccessor { - writeValue(obj: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; + writeValue(obj: any): void; } export declare const CORE_DIRECTIVES: Type[]; @@ -140,18 +140,18 @@ export declare class DefaultValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (_: any) => void): void; registerOnTouched(fn: () => void): void; + writeValue(value: any): void; } export interface Form { addControl(dir: NgControl): void; - removeControl(dir: NgControl): void; - getControl(dir: NgControl): Control; addControlGroup(dir: NgControlGroup): void; - removeControlGroup(dir: NgControlGroup): void; + getControl(dir: NgControl): Control; getControlGroup(dir: NgControlGroup): ControlGroup; + removeControl(dir: NgControl): void; + removeControlGroup(dir: NgControlGroup): void; updateModel(dir: NgControl, value: any): void; } @@ -160,25 +160,25 @@ export declare const FORM_DIRECTIVES: Type[]; export declare const FORM_PROVIDERS: Type[]; export declare class FormBuilder { + array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): ControlArray; + control(value: Object, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): Control; group(controlsConfig: { [key: string]: any; }, extra?: { [key: string]: any; }): ControlGroup; - control(value: Object, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): Control; - array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): ControlArray; } export declare class HashLocationStrategy extends LocationStrategy { constructor(_platformLocation: PlatformLocation, _baseHref?: string); - onPopState(fn: UrlChangeListener): void; + back(): void; + forward(): void; getBaseHref(): string; + onPopState(fn: UrlChangeListener): void; path(): string; prepareExternalUrl(internal: string): string; pushState(state: any, title: string, path: string, queryParams: string): void; replaceState(state: any, title: string, path: string, queryParams: string): void; - forward(): void; - back(): void; } export declare class I18nPluralPipe implements PipeTransform { @@ -200,29 +200,29 @@ export declare class JsonPipe implements PipeTransform { export declare class Location { constructor(platformStrategy: LocationStrategy); - path(): string; + back(): void; + forward(): void; + go(path: string, query?: string): void; isCurrentPathEqualTo(path: string, query?: string): boolean; normalize(url: string): string; + path(): string; prepareExternalUrl(url: string): string; - go(path: string, query?: string): void; replaceState(path: string, query?: string): void; - forward(): void; - back(): void; subscribe(onNext: (value: any) => void, onThrow?: (exception: any) => void, onReturn?: () => void): Object; - static normalizeQueryParams(params: string): string; static joinWithSlash(start: string, end: string): string; + static normalizeQueryParams(params: string): string; static stripTrailingSlash(url: string): string; } export declare abstract class LocationStrategy { + abstract back(): void; + abstract forward(): void; + abstract getBaseHref(): string; + abstract onPopState(fn: UrlChangeListener): void; abstract path(): string; abstract prepareExternalUrl(internal: string): string; abstract pushState(state: any, title: string, url: string, queryParams: string): void; abstract replaceState(state: any, title: string, url: string, queryParams: string): void; - abstract forward(): void; - abstract back(): void; - abstract onPopState(fn: UrlChangeListener): void; - abstract getBaseHref(): string; } export declare class LowerCasePipe implements PipeTransform { @@ -250,124 +250,124 @@ export declare const NG_VALIDATORS: OpaqueToken; export declare const NG_VALUE_ACCESSOR: OpaqueToken; export declare class NgClass implements DoCheck, OnDestroy { - constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer); initialClasses: string; rawClass: string | string[] | Set | { [key: string]: any; }; + constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer); ngDoCheck(): void; ngOnDestroy(): void; } export declare abstract class NgControl extends AbstractControlDirective { - name: string; - valueAccessor: ControlValueAccessor; - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; + name: string; + validator: ValidatorFn; + valueAccessor: ControlValueAccessor; abstract viewToModelUpdate(newValue: any): void; } export declare class NgControlGroup extends ControlContainer implements OnInit, OnDestroy { - constructor(parent: ControlContainer, _validators: any[], _asyncValidators: any[]); - ngOnInit(): void; - ngOnDestroy(): void; - control: ControlGroup; - path: string[]; - formDirective: Form; - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; + control: ControlGroup; + formDirective: Form; + path: string[]; + validator: ValidatorFn; + constructor(parent: ControlContainer, _validators: any[], _asyncValidators: any[]); + ngOnDestroy(): void; + ngOnInit(): void; } export declare class NgControlName extends NgControl implements OnChanges, OnDestroy { + asyncValidator: AsyncValidatorFn; + control: Control; + formDirective: any; model: any; + path: string[]; + validator: ValidatorFn; viewModel: any; constructor(_parent: ControlContainer, _validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; viewToModelUpdate(newValue: any): void; - path: string[]; - formDirective: any; - validator: ValidatorFn; - asyncValidator: AsyncValidatorFn; - control: Control; } export declare class NgControlStatus { - constructor(cd: NgControl); - ngClassUntouched: boolean; - ngClassTouched: boolean; - ngClassPristine: boolean; ngClassDirty: boolean; - ngClassValid: boolean; ngClassInvalid: boolean; + ngClassPristine: boolean; + ngClassTouched: boolean; + ngClassUntouched: boolean; + ngClassValid: boolean; + constructor(cd: NgControl); } export declare class NgFor implements DoCheck { - constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef, _iterableDiffers: IterableDiffers, _cdr: ChangeDetectorRef); ngForOf: any; ngForTemplate: TemplateRef; ngForTrackBy: TrackByFn; + constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef, _iterableDiffers: IterableDiffers, _cdr: ChangeDetectorRef); ngDoCheck(): void; } export declare class NgForm extends ControlContainer implements Form { - form: ControlGroup; - ngSubmit: EventEmitter<{}>; - constructor(validators: any[], asyncValidators: any[]); - submitted: boolean; - formDirective: Form; control: ControlGroup; - path: string[]; controls: { [key: string]: AbstractControl; }; + form: ControlGroup; + formDirective: Form; + ngSubmit: EventEmitter<{}>; + path: string[]; + submitted: boolean; + constructor(validators: any[], asyncValidators: any[]); addControl(dir: NgControl): void; - getControl(dir: NgControl): Control; - removeControl(dir: NgControl): void; addControlGroup(dir: NgControlGroup): void; - removeControlGroup(dir: NgControlGroup): void; + getControl(dir: NgControl): Control; getControlGroup(dir: NgControlGroup): ControlGroup; - updateModel(dir: NgControl, value: any): void; onSubmit(): boolean; + removeControl(dir: NgControl): void; + removeControlGroup(dir: NgControlGroup): void; + updateModel(dir: NgControl, value: any): void; } export declare class NgFormControl extends NgControl implements OnChanges { + asyncValidator: AsyncValidatorFn; + control: Control; form: Control; - update: EventEmitter<{}>; model: any; + path: string[]; + update: EventEmitter<{}>; + validator: ValidatorFn; viewModel: any; constructor(_validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); ngOnChanges(changes: SimpleChanges): void; - path: string[]; - validator: ValidatorFn; - asyncValidator: AsyncValidatorFn; - control: Control; viewToModelUpdate(newValue: any): void; } export declare class NgFormModel extends ControlContainer implements Form, OnChanges { - form: ControlGroup; - directives: NgControl[]; - ngSubmit: EventEmitter<{}>; - constructor(_validators: any[], _asyncValidators: any[]); - ngOnChanges(changes: SimpleChanges): void; - submitted: boolean; - formDirective: Form; control: ControlGroup; + directives: NgControl[]; + form: ControlGroup; + formDirective: Form; + ngSubmit: EventEmitter<{}>; path: string[]; + submitted: boolean; + constructor(_validators: any[], _asyncValidators: any[]); addControl(dir: NgControl): void; - getControl(dir: NgControl): Control; - removeControl(dir: NgControl): void; addControlGroup(dir: NgControlGroup): void; - removeControlGroup(dir: NgControlGroup): void; + getControl(dir: NgControl): Control; getControlGroup(dir: NgControlGroup): ControlGroup; - updateModel(dir: NgControl, value: any): void; + ngOnChanges(changes: SimpleChanges): void; onSubmit(): boolean; + removeControl(dir: NgControl): void; + removeControlGroup(dir: NgControlGroup): void; + updateModel(dir: NgControl, value: any): void; } export declare class NgIf { - constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef); ngIf: any; + constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef); } export declare abstract class NgLocalization { @@ -375,22 +375,22 @@ export declare abstract class NgLocalization { } export declare class NgModel extends NgControl implements OnChanges { - update: EventEmitter<{}>; + asyncValidator: AsyncValidatorFn; + control: Control; model: any; + path: string[]; + update: EventEmitter<{}>; + validator: ValidatorFn; viewModel: any; constructor(_validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); ngOnChanges(changes: SimpleChanges): void; - control: Control; - path: string[]; - validator: ValidatorFn; - asyncValidator: AsyncValidatorFn; viewToModelUpdate(newValue: any): void; } export declare class NgPlural implements AfterContentInit { cases: QueryList; - constructor(_localization: NgLocalization); ngPlural: number; + constructor(_localization: NgLocalization); ngAfterContentInit(): void; } @@ -401,17 +401,17 @@ export declare class NgPluralCase { export declare class NgSelectOption implements OnDestroy { id: string; - constructor(_element: ElementRef, _renderer: Renderer, _select: SelectControlValueAccessor); ngValue: any; value: any; + constructor(_element: ElementRef, _renderer: Renderer, _select: SelectControlValueAccessor); ngOnDestroy(): void; } export declare class NgStyle implements DoCheck { - constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer); rawStyle: { [key: string]: string; }; + constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer); ngDoCheck(): void; } @@ -420,9 +420,9 @@ export declare class NgSwitch { } export declare class NgSwitchCase { - constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); ngSwitchCase: any; ngSwitchWhen: any; + constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); } export declare class NgSwitchDefault { @@ -430,21 +430,21 @@ export declare class NgSwitchDefault { } export declare class NgTemplateOutlet { - constructor(_viewContainerRef: ViewContainerRef); ngOutletContext: Object; ngTemplateOutlet: TemplateRef; + constructor(_viewContainerRef: ViewContainerRef); } export declare class PathLocationStrategy extends LocationStrategy { constructor(_platformLocation: PlatformLocation, href?: string); - onPopState(fn: UrlChangeListener): void; + back(): void; + forward(): void; getBaseHref(): string; - prepareExternalUrl(internal: string): string; + onPopState(fn: UrlChangeListener): void; path(): string; + prepareExternalUrl(internal: string): string; pushState(state: any, title: string, url: string, queryParams: string): void; replaceState(state: any, title: string, url: string, queryParams: string): void; - forward(): void; - back(): void; } export declare class PatternValidator implements Validator { @@ -459,16 +459,16 @@ export declare class PercentPipe implements PipeTransform { } export declare abstract class PlatformLocation { - abstract getBaseHrefFromDOM(): string; - abstract onPopState(fn: UrlChangeListener): void; - abstract onHashChange(fn: UrlChangeListener): void; + hash: string; pathname: string; search: string; - hash: string; - abstract replaceState(state: any, title: string, url: string): void; - abstract pushState(state: any, title: string, url: string): void; - abstract forward(): void; abstract back(): void; + abstract forward(): void; + abstract getBaseHrefFromDOM(): string; + abstract onHashChange(fn: UrlChangeListener): void; + abstract onPopState(fn: UrlChangeListener): void; + abstract pushState(state: any, title: string, url: string): void; + abstract replaceState(state: any, title: string, url: string): void; } export declare class RadioButtonState { @@ -485,13 +485,13 @@ export declare class RequiredValidator { } export declare class SelectControlValueAccessor implements ControlValueAccessor { - value: any; onChange: (_: any) => void; onTouched: () => void; + value: any; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (value: any) => any): void; registerOnTouched(fn: () => any): void; + writeValue(value: any): void; } export declare class SlicePipe implements PipeTransform { @@ -517,15 +517,15 @@ export interface Validator { } export declare class Validators { - static required(control: AbstractControl): { - [key: string]: boolean; - }; - static minLength(minLength: number): ValidatorFn; + static compose(validators: ValidatorFn[]): ValidatorFn; + static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; static maxLength(maxLength: number): ValidatorFn; - static pattern(pattern: string): ValidatorFn; + static minLength(minLength: number): ValidatorFn; static nullValidator(c: AbstractControl): { [key: string]: boolean; }; - static compose(validators: ValidatorFn[]): ValidatorFn; - static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; + static pattern(pattern: string): ValidatorFn; + static required(control: AbstractControl): { + [key: string]: boolean; + }; } diff --git a/tools/public_api_guard/common/testing.d.ts b/tools/public_api_guard/common/testing.d.ts index 69086846df..c70998dcd7 100644 --- a/tools/public_api_guard/common/testing.d.ts +++ b/tools/public_api_guard/common/testing.d.ts @@ -4,30 +4,30 @@ export declare class MockLocationStrategy extends LocationStrategy { internalTitle: string; urlChanges: string[]; constructor(); - simulatePopState(url: string): void; + back(): void; + forward(): void; + getBaseHref(): string; + onPopState(fn: (value: any) => void): void; path(): string; prepareExternalUrl(internal: string): string; pushState(ctx: any, title: string, path: string, query: string): void; replaceState(ctx: any, title: string, path: string, query: string): void; - onPopState(fn: (value: any) => void): void; - getBaseHref(): string; - back(): void; - forward(): void; + simulatePopState(url: string): void; } export declare class SpyLocation implements Location { urlChanges: string[]; - setInitialPath(url: string): void; - setBaseHref(url: string): void; - path(): string; - isCurrentPathEqualTo(path: string, query?: string): boolean; - simulateUrlPop(pathname: string): void; - simulateHashChange(pathname: string): void; - prepareExternalUrl(url: string): string; - go(path: string, query?: string): void; - replaceState(path: string, query?: string): void; - forward(): void; back(): void; - subscribe(onNext: (value: any) => void, onThrow?: (error: any) => void, onReturn?: () => void): Object; + forward(): void; + go(path: string, query?: string): void; + isCurrentPathEqualTo(path: string, query?: string): boolean; normalize(url: string): string; + path(): string; + prepareExternalUrl(url: string): string; + replaceState(path: string, query?: string): void; + setBaseHref(url: string): void; + setInitialPath(url: string): void; + simulateHashChange(pathname: string): void; + simulateUrlPop(pathname: string): void; + subscribe(onNext: (value: any) => void, onThrow?: (error: any) => void, onReturn?: () => void): Object; } diff --git a/tools/public_api_guard/compiler/index.d.ts b/tools/public_api_guard/compiler/index.d.ts index d4415f7311..152e3296fc 100644 --- a/tools/public_api_guard/compiler/index.d.ts +++ b/tools/public_api_guard/compiler/index.d.ts @@ -1,60 +1,60 @@ export declare class AttrAst implements TemplateAst { name: string; - value: string; sourceSpan: ParseSourceSpan; + value: string; constructor(name: string, value: string, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare class BoundDirectivePropertyAst implements TemplateAst { directiveName: string; + sourceSpan: ParseSourceSpan; templateName: string; value: AST; - sourceSpan: ParseSourceSpan; constructor(directiveName: string, templateName: string, value: AST, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare class BoundElementPropertyAst implements TemplateAst { name: string; - type: PropertyBindingType; securityContext: SecurityContext; - value: AST; - unit: string; sourceSpan: ParseSourceSpan; + type: PropertyBindingType; + unit: string; + value: AST; constructor(name: string, type: PropertyBindingType, securityContext: SecurityContext, value: AST, unit: string, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare class BoundEventAst implements TemplateAst { - name: string; - target: string; + fullName: string; handler: AST; + name: string; sourceSpan: ParseSourceSpan; + target: string; constructor(name: string, target: string, handler: AST, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; - fullName: string; } export declare class BoundTextAst implements TemplateAst { - value: AST; ngContentIndex: number; sourceSpan: ParseSourceSpan; + value: AST; constructor(value: AST, ngContentIndex: number, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare class CompileDiDependencyMetadata { isAttribute: boolean; - isSelf: boolean; isHost: boolean; - isSkipSelf: boolean; isOptional: boolean; + isSelf: boolean; + isSkipSelf: boolean; isValue: boolean; query: CompileQueryMetadata; - viewQuery: CompileQueryMetadata; token: CompileTokenMetadata; value: any; + viewQuery: CompileQueryMetadata; constructor({isAttribute, isSelf, isHost, isSkipSelf, isOptional, isValue, query, viewQuery, token, value}?: { isAttribute?: boolean; isSelf?: boolean; @@ -67,43 +67,18 @@ export declare class CompileDiDependencyMetadata { token?: CompileTokenMetadata; value?: any; }); - static fromJson(data: { - [key: string]: any; - }): CompileDiDependencyMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileDiDependencyMetadata; } export declare class CompileDirectiveMetadata implements CompileMetadataWithType { - static create({type, isComponent, selector, exportAs, changeDetection, inputs, outputs, host, lifecycleHooks, providers, viewProviders, queries, viewQueries, precompile, template}?: { - type?: CompileTypeMetadata; - isComponent?: boolean; - selector?: string; - exportAs?: string; - changeDetection?: ChangeDetectionStrategy; - inputs?: string[]; - outputs?: string[]; - host?: { - [key: string]: string; - }; - lifecycleHooks?: LifecycleHooks[]; - providers?: Array; - viewProviders?: Array; - queries?: CompileQueryMetadata[]; - viewQueries?: CompileQueryMetadata[]; - precompile?: CompileTypeMetadata[]; - template?: CompileTemplateMetadata; - }): CompileDirectiveMetadata; - type: CompileTypeMetadata; - isComponent: boolean; - selector: string; - exportAs: string; changeDetection: ChangeDetectionStrategy; - inputs: { - [key: string]: string; - }; - outputs: { + exportAs: string; + hostAttributes: { [key: string]: string; }; hostListeners: { @@ -112,16 +87,23 @@ export declare class CompileDirectiveMetadata implements CompileMetadataWithType hostProperties: { [key: string]: string; }; - hostAttributes: { + identifier: CompileIdentifierMetadata; + inputs: { [key: string]: string; }; + isComponent: boolean; lifecycleHooks: LifecycleHooks[]; - providers: CompileProviderMetadata[]; - viewProviders: CompileProviderMetadata[]; - queries: CompileQueryMetadata[]; - viewQueries: CompileQueryMetadata[]; + outputs: { + [key: string]: string; + }; precompile: CompileTypeMetadata[]; + providers: CompileProviderMetadata[]; + queries: CompileQueryMetadata[]; + selector: string; template: CompileTemplateMetadata; + type: CompileTypeMetadata; + viewProviders: CompileProviderMetadata[]; + viewQueries: CompileQueryMetadata[]; constructor({type, isComponent, selector, exportAs, changeDetection, inputs, outputs, hostListeners, hostProperties, hostAttributes, lifecycleHooks, providers, viewProviders, queries, viewQueries, precompile, template}?: { type?: CompileTypeMetadata; isComponent?: boolean; @@ -151,22 +133,41 @@ export declare class CompileDirectiveMetadata implements CompileMetadataWithType precompile?: CompileTypeMetadata[]; template?: CompileTemplateMetadata; }); - identifier: CompileIdentifierMetadata; - static fromJson(data: { - [key: string]: any; - }): CompileDirectiveMetadata; toJson(): { [key: string]: any; }; + static create({type, isComponent, selector, exportAs, changeDetection, inputs, outputs, host, lifecycleHooks, providers, viewProviders, queries, viewQueries, precompile, template}?: { + type?: CompileTypeMetadata; + isComponent?: boolean; + selector?: string; + exportAs?: string; + changeDetection?: ChangeDetectionStrategy; + inputs?: string[]; + outputs?: string[]; + host?: { + [key: string]: string; + }; + lifecycleHooks?: LifecycleHooks[]; + providers?: Array; + viewProviders?: Array; + queries?: CompileQueryMetadata[]; + viewQueries?: CompileQueryMetadata[]; + precompile?: CompileTypeMetadata[]; + template?: CompileTemplateMetadata; + }): CompileDirectiveMetadata; + static fromJson(data: { + [key: string]: any; + }): CompileDirectiveMetadata; } export declare class CompileFactoryMetadata implements CompileIdentifierMetadata, CompileMetadataWithIdentifier { - runtime: Function; + diDeps: CompileDiDependencyMetadata[]; + identifier: CompileIdentifierMetadata; + moduleUrl: string; name: string; prefix: string; - moduleUrl: string; + runtime: Function; value: any; - diDeps: CompileDiDependencyMetadata[]; constructor({runtime, name, moduleUrl, prefix, diDeps, value}: { runtime?: Function; name?: string; @@ -175,20 +176,20 @@ export declare class CompileFactoryMetadata implements CompileIdentifierMetadata value?: boolean; diDeps?: CompileDiDependencyMetadata[]; }); - identifier: CompileIdentifierMetadata; - static fromJson(data: { - [key: string]: any; - }): CompileFactoryMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileFactoryMetadata; } export declare class CompileIdentifierMetadata implements CompileMetadataWithIdentifier { - runtime: any; + identifier: CompileIdentifierMetadata; + moduleUrl: string; name: string; prefix: string; - moduleUrl: string; + runtime: any; value: any; constructor({runtime, name, moduleUrl, prefix, value}?: { runtime?: any; @@ -197,58 +198,57 @@ export declare class CompileIdentifierMetadata implements CompileMetadataWithIde prefix?: string; value?: any; }); - static fromJson(data: { - [key: string]: any; - }): CompileIdentifierMetadata; toJson(): { [key: string]: any; }; - identifier: CompileIdentifierMetadata; + static fromJson(data: { + [key: string]: any; + }): CompileIdentifierMetadata; } export declare abstract class CompileMetadataWithIdentifier { + identifier: CompileIdentifierMetadata; abstract toJson(): { [key: string]: any; }; - identifier: CompileIdentifierMetadata; } export declare abstract class CompileMetadataWithType extends CompileMetadataWithIdentifier { + identifier: CompileIdentifierMetadata; + type: CompileTypeMetadata; abstract toJson(): { [key: string]: any; }; - type: CompileTypeMetadata; - identifier: CompileIdentifierMetadata; } export declare class CompilePipeMetadata implements CompileMetadataWithType { - type: CompileTypeMetadata; + identifier: CompileIdentifierMetadata; + lifecycleHooks: LifecycleHooks[]; name: string; pure: boolean; - lifecycleHooks: LifecycleHooks[]; + type: CompileTypeMetadata; constructor({type, name, pure, lifecycleHooks}?: { type?: CompileTypeMetadata; name?: string; pure?: boolean; lifecycleHooks?: LifecycleHooks[]; }); - identifier: CompileIdentifierMetadata; - static fromJson(data: { - [key: string]: any; - }): CompilePipeMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompilePipeMetadata; } export declare class CompileProviderMetadata { - token: CompileTokenMetadata; - useClass: CompileTypeMetadata; - useValue: any; - useExisting: CompileTokenMetadata; - useFactory: CompileFactoryMetadata; deps: CompileDiDependencyMetadata[]; multi: boolean; + token: CompileTokenMetadata; + useClass: CompileTypeMetadata; + useExisting: CompileTokenMetadata; + useFactory: CompileFactoryMetadata; + useValue: any; constructor({token, useClass, useValue, useExisting, useFactory, deps, multi}: { token?: CompileTokenMetadata; useClass?: CompileTypeMetadata; @@ -258,20 +258,20 @@ export declare class CompileProviderMetadata { deps?: CompileDiDependencyMetadata[]; multi?: boolean; }); - static fromJson(data: { - [key: string]: any; - }): CompileProviderMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileProviderMetadata; } export declare class CompileQueryMetadata { - selectors: Array; descendants: boolean; first: boolean; propertyName: string; read: CompileTokenMetadata; + selectors: Array; constructor({selectors, descendants, first, propertyName, read}?: { selectors?: Array; descendants?: boolean; @@ -279,12 +279,12 @@ export declare class CompileQueryMetadata { propertyName?: string; read?: CompileTokenMetadata; }); - static fromJson(data: { - [key: string]: any; - }): CompileQueryMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileQueryMetadata; } export declare const COMPILER_PROVIDERS: Array; export declare class CompilerConfig { - renderTypes: RenderTypes; defaultEncapsulation: ViewEncapsulation; - useJit: boolean; + genDebugInfo: boolean; + logBindingUpdate: boolean; platformDirectives: any[]; platformPipes: any[]; + renderTypes: RenderTypes; + useJit: boolean; constructor({renderTypes, defaultEncapsulation, genDebugInfo, logBindingUpdate, useJit, platformDirectives, platformPipes}?: { renderTypes?: RenderTypes; defaultEncapsulation?: ViewEncapsulation; @@ -306,19 +308,17 @@ export declare class CompilerConfig { platformDirectives?: any[]; platformPipes?: any[]; }); - genDebugInfo: boolean; - logBindingUpdate: boolean; } export declare class CompileTemplateMetadata { + animations: CompileAnimationEntryMetadata[]; encapsulation: ViewEncapsulation; + interpolation: [string, string]; + ngContentSelectors: string[]; + styleUrls: string[]; + styles: string[]; template: string; templateUrl: string; - styles: string[]; - styleUrls: string[]; - animations: CompileAnimationEntryMetadata[]; - ngContentSelectors: string[]; - interpolation: [string, string]; constructor({encapsulation, template, templateUrl, styles, styleUrls, animations, ngContentSelectors, interpolation}?: { encapsulation?: ViewEncapsulation; template?: string; @@ -329,43 +329,45 @@ export declare class CompileTemplateMetadata { animations?: CompileAnimationEntryMetadata[]; interpolation?: [string, string]; }); - static fromJson(data: { - [key: string]: any; - }): CompileTemplateMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileTemplateMetadata; } export declare class CompileTokenMetadata implements CompileMetadataWithIdentifier { - value: any; + assetCacheKey: any; identifier: CompileIdentifierMetadata; identifierIsInstance: boolean; + name: string; + runtimeCacheKey: any; + value: any; constructor({value, identifier, identifierIsInstance}: { value?: any; identifier?: CompileIdentifierMetadata; identifierIsInstance?: boolean; }); - static fromJson(data: { - [key: string]: any; - }): CompileTokenMetadata; + equalsTo(token2: CompileTokenMetadata): boolean; toJson(): { [key: string]: any; }; - runtimeCacheKey: any; - assetCacheKey: any; - equalsTo(token2: CompileTokenMetadata): boolean; - name: string; + static fromJson(data: { + [key: string]: any; + }): CompileTokenMetadata; } export declare class CompileTypeMetadata implements CompileIdentifierMetadata, CompileMetadataWithType { - runtime: Type; + diDeps: CompileDiDependencyMetadata[]; + identifier: CompileIdentifierMetadata; + isHost: boolean; + moduleUrl: string; name: string; prefix: string; - moduleUrl: string; - isHost: boolean; + runtime: Type; + type: CompileTypeMetadata; value: any; - diDeps: CompileDiDependencyMetadata[]; constructor({runtime, name, moduleUrl, prefix, isHost, value, diDeps}?: { runtime?: Type; name?: string; @@ -375,14 +377,12 @@ export declare class CompileTypeMetadata implements CompileIdentifierMetadata, C value?: any; diDeps?: CompileDiDependencyMetadata[]; }); - static fromJson(data: { - [key: string]: any; - }): CompileTypeMetadata; - identifier: CompileIdentifierMetadata; - type: CompileTypeMetadata; toJson(): { [key: string]: any; }; + static fromJson(data: { + [key: string]: any; + }): CompileTypeMetadata; } export declare function createOfflineCompileUrlResolver(): UrlResolver; @@ -394,9 +394,9 @@ export declare var DEFAULT_PACKAGE_URL_PROVIDER: { export declare class DirectiveAst implements TemplateAst { directive: CompileDirectiveMetadata; - inputs: BoundDirectivePropertyAst[]; - hostProperties: BoundElementPropertyAst[]; hostEvents: BoundEventAst[]; + hostProperties: BoundElementPropertyAst[]; + inputs: BoundDirectivePropertyAst[]; sourceSpan: ParseSourceSpan; constructor(directive: CompileDirectiveMetadata, inputs: BoundDirectivePropertyAst[], hostProperties: BoundElementPropertyAst[], hostEvents: BoundEventAst[], sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; @@ -408,38 +408,38 @@ export declare class DirectiveResolver { } export declare class ElementAst implements TemplateAst { - name: string; attrs: AttrAst[]; - inputs: BoundElementPropertyAst[]; - outputs: BoundEventAst[]; - references: ReferenceAst[]; - directives: DirectiveAst[]; - providers: ProviderAst[]; - hasViewContainer: boolean; children: TemplateAst[]; + directives: DirectiveAst[]; + hasViewContainer: boolean; + inputs: BoundElementPropertyAst[]; + name: string; ngContentIndex: number; + outputs: BoundEventAst[]; + providers: ProviderAst[]; + references: ReferenceAst[]; sourceSpan: ParseSourceSpan; constructor(name: string, attrs: AttrAst[], inputs: BoundElementPropertyAst[], outputs: BoundEventAst[], references: ReferenceAst[], directives: DirectiveAst[], providers: ProviderAst[], hasViewContainer: boolean, children: TemplateAst[], ngContentIndex: number, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare abstract class ElementSchemaRegistry { + abstract getMappedPropName(propName: string): string; abstract hasProperty(tagName: string, propName: string): boolean; abstract securityContext(tagName: string, propName: string): any; - abstract getMappedPropName(propName: string): string; } export declare class EmbeddedTemplateAst implements TemplateAst { attrs: AttrAst[]; - outputs: BoundEventAst[]; - references: ReferenceAst[]; - variables: VariableAst[]; - directives: DirectiveAst[]; - providers: ProviderAst[]; - hasViewContainer: boolean; children: TemplateAst[]; + directives: DirectiveAst[]; + hasViewContainer: boolean; ngContentIndex: number; + outputs: BoundEventAst[]; + providers: ProviderAst[]; + references: ReferenceAst[]; sourceSpan: ParseSourceSpan; + variables: VariableAst[]; constructor(attrs: AttrAst[], outputs: BoundEventAst[], references: ReferenceAst[], variables: VariableAst[], directives: DirectiveAst[], providers: ProviderAst[], hasViewContainer: boolean, children: TemplateAst[], ngContentIndex: number, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } @@ -461,9 +461,9 @@ export declare class NormalizedComponentWithViewDirectives { export declare class OfflineCompiler { constructor(_directiveNormalizer: DirectiveNormalizer, _templateParser: TemplateParser, _styleCompiler: StyleCompiler, _viewCompiler: ViewCompiler, _outputEmitter: OutputEmitter, _xhr: XHR); - normalizeDirectiveMetadata(directive: CompileDirectiveMetadata): Promise; compileTemplates(components: NormalizedComponentWithViewDirectives[]): SourceModule; loadAndCompileStylesheet(stylesheetUrl: string, shim: boolean, suffix: string): Promise; + normalizeDirectiveMetadata(directive: CompileDirectiveMetadata): Promise; } export declare class PipeResolver { @@ -480,12 +480,12 @@ export declare enum PropertyBindingType { } export declare class ProviderAst implements TemplateAst { - token: CompileTokenMetadata; - multiProvider: boolean; eager: boolean; - providers: CompileProviderMetadata[]; + multiProvider: boolean; providerType: ProviderAstType; + providers: CompileProviderMetadata[]; sourceSpan: ParseSourceSpan; + token: CompileTokenMetadata; constructor(token: CompileTokenMetadata, multiProvider: boolean, eager: boolean, providers: CompileProviderMetadata[], providerType: ProviderAstType, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } @@ -500,25 +500,25 @@ export declare enum ProviderAstType { export declare class ReferenceAst implements TemplateAst { name: string; - value: CompileTokenMetadata; sourceSpan: ParseSourceSpan; + value: CompileTokenMetadata; constructor(name: string, value: CompileTokenMetadata, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } export declare abstract class RenderTypes { - renderer: CompileIdentifierMetadata; - renderText: CompileIdentifierMetadata; - renderElement: CompileIdentifierMetadata; renderComment: CompileIdentifierMetadata; - renderNode: CompileIdentifierMetadata; + renderElement: CompileIdentifierMetadata; renderEvent: CompileIdentifierMetadata; + renderNode: CompileIdentifierMetadata; + renderText: CompileIdentifierMetadata; + renderer: CompileIdentifierMetadata; } export declare class RuntimeCompiler implements ComponentResolver { constructor(_metadataResolver: CompileMetadataResolver, _templateNormalizer: DirectiveNormalizer, _templateParser: TemplateParser, _styleCompiler: StyleCompiler, _viewCompiler: ViewCompiler, _xhr: XHR, _genConfig: CompilerConfig); - resolveComponent(component: Type | string): Promise>; clearCache(): void; + resolveComponent(component: Type | string): Promise>; } export declare class SourceModule { @@ -535,26 +535,26 @@ export interface TemplateAst { } export interface TemplateAstVisitor { - visitNgContent(ast: NgContentAst, context: any): any; - visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any; - visitElement(ast: ElementAst, context: any): any; - visitReference(ast: ReferenceAst, context: any): any; - visitVariable(ast: VariableAst, context: any): any; - visitEvent(ast: BoundEventAst, context: any): any; - visitElementProperty(ast: BoundElementPropertyAst, context: any): any; visitAttr(ast: AttrAst, context: any): any; visitBoundText(ast: BoundTextAst, context: any): any; - visitText(ast: TextAst, context: any): any; visitDirective(ast: DirectiveAst, context: any): any; visitDirectiveProperty(ast: BoundDirectivePropertyAst, context: any): any; + visitElement(ast: ElementAst, context: any): any; + visitElementProperty(ast: BoundElementPropertyAst, context: any): any; + visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any; + visitEvent(ast: BoundEventAst, context: any): any; + visitNgContent(ast: NgContentAst, context: any): any; + visitReference(ast: ReferenceAst, context: any): any; + visitText(ast: TextAst, context: any): any; + visitVariable(ast: VariableAst, context: any): any; } export declare function templateVisitAll(visitor: TemplateAstVisitor, asts: TemplateAst[], context?: any): any[]; export declare class TextAst implements TemplateAst { - value: string; ngContentIndex: number; sourceSpan: ParseSourceSpan; + value: string; constructor(value: string, ngContentIndex: number, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } @@ -566,8 +566,8 @@ export declare class UrlResolver { export declare class VariableAst implements TemplateAst { name: string; - value: string; sourceSpan: ParseSourceSpan; + value: string; constructor(name: string, value: string, sourceSpan: ParseSourceSpan); visit(visitor: TemplateAstVisitor, context: any): any; } diff --git a/tools/public_api_guard/compiler/testing.d.ts b/tools/public_api_guard/compiler/testing.d.ts index 3ba36ffa09..49c5c01b92 100644 --- a/tools/public_api_guard/compiler/testing.d.ts +++ b/tools/public_api_guard/compiler/testing.d.ts @@ -1,18 +1,18 @@ export declare class ComponentFixture { - debugElement: DebugElement; - componentInstance: any; - nativeElement: any; - elementRef: ElementRef; - componentRef: ComponentRef; changeDetectorRef: ChangeDetectorRef; + componentInstance: any; + componentRef: ComponentRef; + debugElement: DebugElement; + elementRef: ElementRef; + nativeElement: any; ngZone: NgZone; constructor(componentRef: ComponentRef, ngZone: NgZone, autoDetect: boolean); - detectChanges(checkNoChanges?: boolean): void; - checkNoChanges(): void; autoDetectChanges(autoDetect?: boolean): void; + checkNoChanges(): void; + destroy(): void; + detectChanges(checkNoChanges?: boolean): void; isStable(): boolean; whenStable(): Promise; - destroy(): void; } export declare var ComponentFixtureAutoDetect: OpaqueToken; @@ -26,44 +26,44 @@ export declare class MockDirectiveResolver extends DirectiveResolver { } export declare class MockSchemaRegistry implements ElementSchemaRegistry { - existingProperties: { - [key: string]: boolean; - }; attrPropMapping: { [key: string]: string; }; + existingProperties: { + [key: string]: boolean; + }; constructor(existingProperties: { [key: string]: boolean; }, attrPropMapping: { [key: string]: string; }); + getMappedPropName(attrName: string): string; hasProperty(tagName: string, property: string): boolean; securityContext(tagName: string, property: string): SecurityContext; - getMappedPropName(attrName: string): string; } export declare class MockViewResolver extends ViewResolver { constructor(); - setView(component: Type, view: ViewMetadata): void; - setInlineTemplate(component: Type, template: string): void; - setAnimations(component: Type, animations: AnimationEntryMetadata[]): void; overrideViewDirective(component: Type, from: Type, to: Type): void; resolve(component: Type): ViewMetadata; + setAnimations(component: Type, animations: AnimationEntryMetadata[]): void; + setInlineTemplate(component: Type, template: string): void; + setView(component: Type, view: ViewMetadata): void; } export declare class TestComponentBuilder { constructor(_injector: Injector); - overrideTemplate(componentType: Type, template: string): TestComponentBuilder; - overrideAnimations(componentType: Type, animations: AnimationEntryMetadata[]): TestComponentBuilder; - overrideView(componentType: Type, view: ViewMetadata): TestComponentBuilder; - overrideDirective(componentType: Type, from: Type, to: Type): TestComponentBuilder; - overrideProviders(type: Type, providers: any[]): TestComponentBuilder; - overrideBindings(type: Type, providers: any[]): TestComponentBuilder; - overrideViewProviders(type: Type, providers: any[]): TestComponentBuilder; - overrideViewBindings(type: Type, providers: any[]): TestComponentBuilder; createAsync(rootComponentType: Type): Promise>; createFakeAsync(rootComponentType: Type): ComponentFixture; createSync(componentFactory: ComponentFactory): ComponentFixture; + overrideAnimations(componentType: Type, animations: AnimationEntryMetadata[]): TestComponentBuilder; + overrideBindings(type: Type, providers: any[]): TestComponentBuilder; + overrideDirective(componentType: Type, from: Type, to: Type): TestComponentBuilder; + overrideProviders(type: Type, providers: any[]): TestComponentBuilder; + overrideTemplate(componentType: Type, template: string): TestComponentBuilder; + overrideView(componentType: Type, view: ViewMetadata): TestComponentBuilder; + overrideViewBindings(type: Type, providers: any[]): TestComponentBuilder; + overrideViewProviders(type: Type, providers: any[]): TestComponentBuilder; } export declare class TestComponentRenderer { diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 4f8b142f0b..64410af2da 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -1,7 +1,7 @@ export declare class AbstractProviderError extends BaseException { + context: any; constructor(injector: ReflectiveInjector, key: ReflectiveKey, constructResolvingMessage: Function); addKey(injector: ReflectiveInjector, key: ReflectiveKey): void; - context: any; } export declare abstract class AfterContentChecked { @@ -23,20 +23,20 @@ export declare abstract class AfterViewInit { export declare function animate(timing: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata): AnimationAnimateMetadata; export declare class AnimationAnimateMetadata extends AnimationMetadata { - timings: string | number; styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata; + timings: string | number; constructor(timings: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata); } export declare class AnimationEntryMetadata { - name: string; definitions: AnimationStateMetadata[]; + name: string; constructor(name: string, definitions: AnimationStateMetadata[]); } export declare class AnimationGroupMetadata extends AnimationWithStepsMetadata { - constructor(_steps: AnimationMetadata[]); steps: AnimationMetadata[]; + constructor(_steps: AnimationMetadata[]); } export declare class AnimationKeyframesSequenceMetadata extends AnimationMetadata { @@ -48,21 +48,21 @@ export declare abstract class AnimationMetadata { } export declare abstract class AnimationPlayer { - abstract onDone(fn: Function): void; - abstract play(): void; - abstract pause(): void; - abstract restart(): void; - abstract finish(): void; - abstract destroy(): void; - abstract reset(): void; - abstract setPosition(p: any): void; - abstract getPosition(): number; parentPlayer: AnimationPlayer; + abstract destroy(): void; + abstract finish(): void; + abstract getPosition(): number; + abstract onDone(fn: Function): void; + abstract pause(): void; + abstract play(): void; + abstract reset(): void; + abstract restart(): void; + abstract setPosition(p: any): void; } export declare class AnimationSequenceMetadata extends AnimationWithStepsMetadata { - constructor(_steps: AnimationMetadata[]); steps: AnimationMetadata[]; + constructor(_steps: AnimationMetadata[]); } export declare class AnimationStateDeclarationMetadata extends AnimationStateMetadata { @@ -81,18 +81,18 @@ export declare class AnimationStateTransitionMetadata extends AnimationStateMeta } export declare class AnimationStyleMetadata extends AnimationMetadata { + offset: number; styles: Array; - offset: number; constructor(styles: Array, offset?: number); } export declare abstract class AnimationWithStepsMetadata extends AnimationMetadata { - constructor(); steps: AnimationMetadata[]; + constructor(); } export declare const APP_ID: any; @@ -104,16 +104,16 @@ export declare const APPLICATION_COMMON_PROVIDERS: Array; export declare abstract class ApplicationRef { - abstract registerBootstrapListener(listener: (ref: ComponentRef) => void): void; - abstract registerDisposeListener(dispose: () => void): void; - abstract waitForAsyncInitializers(): Promise; - abstract run(callback: Function): any; - abstract bootstrap(componentFactory: ComponentFactory): ComponentRef; + componentTypes: Type[]; injector: Injector; zone: NgZone; + abstract bootstrap(componentFactory: ComponentFactory): ComponentRef; abstract dispose(): void; + abstract registerBootstrapListener(listener: (ref: ComponentRef) => void): void; + abstract registerDisposeListener(dispose: () => void): void; + abstract run(callback: Function): any; abstract tick(): void; - componentTypes: Type[]; + abstract waitForAsyncInitializers(): Promise; } export declare function asNativeElements(debugEls: DebugElement[]): any; @@ -124,8 +124,8 @@ export declare var Attribute: AttributeMetadataFactory; export declare class AttributeMetadata extends DependencyMetadata { attributeName: string; - constructor(attributeName: string); token: AttributeMetadata; + constructor(attributeName: string); toString(): string; } @@ -146,6 +146,10 @@ export declare class BaseException extends Error { export declare function bind(token: any): ProviderBuilder; export declare class Binding extends Provider { + toAlias: any; + toClass: Type; + toFactory: Function; + toValue: any; constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: { toClass?: Type; toValue?: any; @@ -154,10 +158,6 @@ export declare class Binding extends Provider { deps?: Object[]; multi?: boolean; }); - toClass: Type; - toAlias: any; - toFactory: Function; - toValue: any; } export declare enum ChangeDetectionStrategy { @@ -170,26 +170,26 @@ export declare enum ChangeDetectionStrategy { } export declare abstract class ChangeDetectorRef { - abstract markForCheck(): void; + abstract checkNoChanges(): void; abstract detach(): void; abstract detectChanges(): void; - abstract checkNoChanges(): void; + abstract markForCheck(): void; abstract reattach(): void; } export declare function Class(clsDef: ClassDefinition): ConcreteType; export interface ClassDefinition { - extends?: Type; constructor: Function | any[]; + extends?: Type; [x: string]: Type | Function | any[]; } export declare class CollectionChangeRecord { - item: any; - trackById: any; currentIndex: number; + item: any; previousIndex: number; + trackById: any; constructor(item: any, trackById: any); toString(): string; } @@ -211,31 +211,31 @@ export interface ComponentDecorator extends TypeDecorator { } export declare class ComponentFactory { + componentType: Type; selector: string; constructor(selector: string, _viewFactory: Function, _componentType: Type); - componentType: Type; create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any): ComponentRef; } export declare abstract class ComponentFactoryResolver { - static NULL: ComponentFactoryResolver; abstract resolveComponentFactory(component: ClassWithConstructor): ComponentFactory; + static NULL: ComponentFactoryResolver; } export declare class ComponentMetadata extends DirectiveMetadata { - changeDetection: ChangeDetectionStrategy; - viewProviders: any[]; - moduleId: string; - templateUrl: string; - template: string; - styleUrls: string[]; - styles: string[]; animations: AnimationEntryMetadata[]; + changeDetection: ChangeDetectionStrategy; directives: Array; - pipes: Array; encapsulation: ViewEncapsulation; interpolation: [string, string]; + moduleId: string; + pipes: Array; precompile: Array; + styleUrls: string[]; + styles: string[]; + template: string; + templateUrl: string; + viewProviders: any[]; constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, providers, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, animations, directives, pipes, encapsulation, interpolation, precompile}?: { selector?: string; inputs?: string[]; @@ -324,19 +324,19 @@ export interface ComponentMetadataFactory { } export declare abstract class ComponentRef { - location: ElementRef; - injector: Injector; - instance: C; - hostView: ViewRef; changeDetectorRef: ChangeDetectorRef; componentType: Type; + hostView: ViewRef; + injector: Injector; + instance: C; + location: ElementRef; abstract destroy(): void; abstract onDestroy(callback: Function): void; } export declare abstract class ComponentResolver { - abstract resolveComponent(component: Type | string): Promise>; abstract clearCache(): void; + abstract resolveComponent(component: Type | string): Promise>; } export declare var ContentChild: ContentChildMetadataFactory; @@ -389,62 +389,62 @@ export declare class CyclicDependencyError extends AbstractProviderError { } export declare class DebugElement extends DebugNode { - name: string; - properties: { - [key: string]: any; - }; attributes: { [key: string]: string; }; + childNodes: DebugNode[]; + children: DebugElement[]; classes: { [key: string]: boolean; }; + name: string; + nativeElement: any; + properties: { + [key: string]: any; + }; styles: { [key: string]: string; }; - childNodes: DebugNode[]; - nativeElement: any; constructor(nativeNode: any, parent: any, _debugInfo: RenderDebugInfo); addChild(child: DebugNode): void; - removeChild(child: DebugNode): void; insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]): void; query(predicate: Predicate): DebugElement; queryAll(predicate: Predicate): DebugElement[]; queryAllNodes(predicate: Predicate): DebugNode[]; - children: DebugElement[]; + removeChild(child: DebugNode): void; triggerEventHandler(eventName: string, eventObj: any): void; } export declare class DebugNode { - nativeNode: any; - listeners: EventListener[]; - parent: DebugElement; - constructor(nativeNode: any, parent: DebugNode, _debugInfo: RenderDebugInfo); - injector: Injector; componentInstance: any; context: any; + injector: Injector; + listeners: EventListener[]; + nativeNode: any; + parent: DebugElement; + providerTokens: any[]; references: { [key: string]: any; }; - providerTokens: any[]; source: string; + constructor(nativeNode: any, parent: DebugNode, _debugInfo: RenderDebugInfo); inject(token: any): any; } export declare class DefaultIterableDiffer implements IterableDiffer { - constructor(_trackByFn?: TrackByFn); collection: any; - length: number; - forEachItem(fn: Function): void; - forEachPreviousItem(fn: Function): void; - forEachAddedItem(fn: Function): void; - forEachMovedItem(fn: Function): void; - forEachRemovedItem(fn: Function): void; - forEachIdentityChange(fn: Function): void; - diff(collection: any): DefaultIterableDiffer; - onDestroy(): void; - check(collection: any): boolean; isDirty: boolean; + length: number; + constructor(_trackByFn?: TrackByFn); + check(collection: any): boolean; + diff(collection: any): DefaultIterableDiffer; + forEachAddedItem(fn: Function): void; + forEachIdentityChange(fn: Function): void; + forEachItem(fn: Function): void; + forEachMovedItem(fn: Function): void; + forEachPreviousItem(fn: Function): void; + forEachRemovedItem(fn: Function): void; + onDestroy(): void; toString(): string; } @@ -454,19 +454,19 @@ export interface DirectiveDecorator extends TypeDecorator { } export declare class DirectiveMetadata extends InjectableMetadata { - selector: string; - inputs: string[]; - properties: string[]; - outputs: string[]; events: string[]; + exportAs: string; host: { [key: string]: string; }; + inputs: string[]; + outputs: string[]; + properties: string[]; providers: any[]; - exportAs: string; queries: { [key: string]: any; }; + selector: string; constructor({selector, inputs, outputs, properties, events, host, providers, exportAs, queries}?: { selector?: string; inputs?: string[]; @@ -549,8 +549,8 @@ export declare class EventEmitter extends Subject { export declare class ExceptionHandler { constructor(_logger: any, _rethrowException?: boolean); - static exceptionToString(exception: any, stackTrace?: any, reason?: string): string; call(exception: any, stackTrace?: any, reason?: string): void; + static exceptionToString(exception: any, stackTrace?: any, reason?: string): string; } export declare class ExpressionChangedAfterItHasBeenCheckedException extends BaseException { @@ -591,8 +591,8 @@ export interface HostBindingMetadataFactory { export declare var HostListener: HostListenerMetadataFactory; export declare class HostListenerMetadata { - eventName: string; args: string[]; + eventName: string; constructor(eventName: string, args?: string[]); } @@ -635,8 +635,8 @@ export interface InjectMetadataFactory { } export declare abstract class Injector { - static THROW_IF_NOT_FOUND: Object; get(token: any, notFoundValue?: any): any; + static THROW_IF_NOT_FOUND: Object; } export declare var Input: InputMetadataFactory; @@ -653,11 +653,11 @@ export interface InputMetadataFactory { } export declare class InstantiationError extends WrappedException { - constructor(injector: ReflectiveInjector, originalException: any, originalStack: any, key: ReflectiveKey); - addKey(injector: ReflectiveInjector, key: ReflectiveKey): void; - wrapperMessage: string; causeKey: ReflectiveKey; context: any; + wrapperMessage: string; + constructor(injector: ReflectiveInjector, originalException: any, originalStack: any, key: ReflectiveKey); + addKey(injector: ReflectiveInjector, key: ReflectiveKey): void; } export declare class InvalidProviderError extends BaseException { @@ -672,24 +672,24 @@ export interface IterableDiffer { } export interface IterableDifferFactory { - supports(objects: any): boolean; create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): IterableDiffer; + supports(objects: any): boolean; } export declare class IterableDiffers { factories: IterableDifferFactory[]; constructor(factories: IterableDifferFactory[]); + find(iterable: any): IterableDifferFactory; static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers; static extend(factories: IterableDifferFactory[]): Provider; - find(iterable: any): IterableDifferFactory; } export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; export declare class KeyValueChangeRecord { + currentValue: any; key: any; previousValue: any; - currentValue: any; constructor(key: any); toString(): string; } @@ -700,37 +700,37 @@ export interface KeyValueDiffer { } export interface KeyValueDifferFactory { - supports(objects: any): boolean; create(cdRef: ChangeDetectorRef): KeyValueDiffer; + supports(objects: any): boolean; } export declare class KeyValueDiffers { factories: KeyValueDifferFactory[]; constructor(factories: KeyValueDifferFactory[]); + find(kv: Object): KeyValueDifferFactory; static create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers; static extend(factories: KeyValueDifferFactory[]): Provider; - find(kv: Object): KeyValueDifferFactory; } export declare function lockRunMode(): void; export declare class NgZone { - static isInAngularZone(): boolean; - static assertInAngularZone(): void; - static assertNotInAngularZone(): void; + hasPendingMacrotasks: boolean; + hasPendingMicrotasks: boolean; + isStable: boolean; + onError: EventEmitter; + onMicrotaskEmpty: EventEmitter; + onStable: EventEmitter; + onUnstable: EventEmitter; constructor({enableLongStackTrace}: { enableLongStackTrace?: boolean; }); - onUnstable: EventEmitter; - onMicrotaskEmpty: EventEmitter; - onStable: EventEmitter; - onError: EventEmitter; - isStable: boolean; - hasPendingMicrotasks: boolean; - hasPendingMacrotasks: boolean; run(fn: () => any): any; runGuarded(fn: () => any): any; runOutsideAngular(fn: () => any): any; + static assertInAngularZone(): void; + static assertNotInAngularZone(): void; + static isInAngularZone(): boolean; } export declare class NgZoneError { @@ -802,11 +802,11 @@ export declare var Pipe: PipeMetadataFactory; export declare class PipeMetadata extends InjectableMetadata { name: string; + pure: boolean; constructor({name, pure}: { name: string; pure?: boolean; }); - pure: boolean; } export interface PipeMetadataFactory { @@ -833,10 +833,10 @@ export declare const PLATFORM_INITIALIZER: any; export declare const PLATFORM_PIPES: OpaqueToken; export declare abstract class PlatformRef { - abstract registerDisposeListener(dispose: () => void): void; + disposed: boolean; injector: Injector; abstract dispose(): void; - disposed: boolean; + abstract registerDisposeListener(dispose: () => void): void; } export declare function provide(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: { @@ -849,12 +849,13 @@ export declare function provide(token: any, {useClass, useValue, useExisting, us }): Provider; export declare class Provider { + dependencies: Object[]; + multi: boolean; token: any; useClass: Type; - useValue: any; useExisting: any; useFactory: Function; - dependencies: Object[]; + useValue: any; constructor(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: { useClass?: Type; useValue?: any; @@ -863,51 +864,50 @@ export declare class Provider { deps?: Object[]; multi?: boolean; }); - multi: boolean; } export declare class ProviderBuilder { token: any; constructor(token: any); - toClass(type: Type): Provider; - toValue(value: any): Provider; toAlias(aliasToken: any): Provider; + toClass(type: Type): Provider; toFactory(factory: Function, dependencies?: any[]): Provider; + toValue(value: any): Provider; } export declare var Query: QueryMetadataFactory; export declare class QueryList { changes: Observable; - length: number; + dirty: boolean; first: T; last: T; - map(fn: (item: T, index: number, array: T[]) => U): U[]; + length: number; filter(fn: (item: T, index: number, array: T[]) => boolean): T[]; - reduce(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U; forEach(fn: (item: T, index: number, array: T[]) => void): void; + map(fn: (item: T, index: number, array: T[]) => U): U[]; + notifyOnChanges(): void; + reduce(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U; + reset(res: Array): void; + setDirty(): void; some(fn: (value: T, index: number, array: T[]) => boolean): boolean; toArray(): T[]; toString(): string; - reset(res: Array): void; - notifyOnChanges(): void; - setDirty(): void; - dirty: boolean; } export declare class QueryMetadata extends DependencyMetadata { descendants: boolean; first: boolean; + isVarBindingQuery: boolean; + isViewQuery: boolean; read: any; + selector: any; + varBindings: string[]; constructor(_selector: Type | string, {descendants, first, read}?: { descendants?: boolean; first?: boolean; read?: any; }); - isViewQuery: boolean; - selector: any; - isVarBindingQuery: boolean; - varBindings: string[]; toString(): string; } @@ -923,70 +923,70 @@ export interface QueryMetadataFactory { } export declare abstract class ReflectiveInjector implements Injector { + parent: Injector; + createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; + abstract get(token: any, notFoundValue?: any): any; + instantiateResolved(provider: ResolvedReflectiveProvider): any; + resolveAndCreateChild(providers: Array): ReflectiveInjector; + resolveAndInstantiate(provider: Type | Provider): any; + static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; + static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; static resolve(providers: Array): ResolvedReflectiveProvider[]; static resolveAndCreate(providers: Array, parent?: Injector): ReflectiveInjector; - static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; - static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; - parent: Injector; - resolveAndCreateChild(providers: Array): ReflectiveInjector; - createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; - resolveAndInstantiate(provider: Type | Provider): any; - instantiateResolved(provider: ResolvedReflectiveProvider): any; - abstract get(token: any, notFoundValue?: any): any; } export declare class ReflectiveKey { - token: Object; - id: number; - constructor(token: Object, id: number); displayName: string; - static get(token: Object): ReflectiveKey; + id: number; + token: Object; + constructor(token: Object, id: number); static numberOfKeys: number; + static get(token: Object): ReflectiveKey; } export declare class RenderComponentType { - id: string; - templateUrl: string; - slotCount: number; encapsulation: ViewEncapsulation; + id: string; + slotCount: number; styles: Array; + templateUrl: string; constructor(id: string, templateUrl: string, slotCount: number, encapsulation: ViewEncapsulation, styles: Array); } export declare abstract class Renderer { - abstract selectRootElement(selectorOrNode: string | any, debugInfo?: RenderDebugInfo): any; + abstract animate(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number, delay: number, easing: string): AnimationPlayer; + abstract attachViewAfter(node: any, viewRootNodes: any[]): void; abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any; - abstract createViewRoot(hostElement: any): any; abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any; abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any; - abstract projectNodes(parentElement: any, nodes: any[]): void; - abstract attachViewAfter(node: any, viewRootNodes: any[]): void; - abstract detachView(viewRootNodes: any[]): void; + abstract createViewRoot(hostElement: any): any; abstract destroyView(hostElement: any, viewAllNodes: any[]): void; + abstract detachView(viewRootNodes: any[]): void; + abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): any; abstract listen(renderElement: any, name: string, callback: Function): Function; abstract listenGlobal(target: string, name: string, callback: Function): Function; - abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void; - abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void; + abstract projectNodes(parentElement: any, nodes: any[]): void; + abstract selectRootElement(selectorOrNode: string | any, debugInfo?: RenderDebugInfo): any; abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void; + abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void; abstract setElementClass(renderElement: any, className: string, isAdd: boolean): any; + abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void; abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): any; - abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): any; abstract setText(renderNode: any, text: string): any; - abstract animate(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number, delay: number, easing: string): AnimationPlayer; } export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider { } export declare class ResolvedReflectiveFactory { - factory: Function; dependencies: ReflectiveDependency[]; + factory: Function; constructor( factory: Function, dependencies: ReflectiveDependency[]); @@ -994,8 +994,8 @@ export declare class ResolvedReflectiveFactory { export interface ResolvedReflectiveProvider { key: ReflectiveKey; - resolvedFactories: ResolvedReflectiveFactory[]; multiProvider: boolean; + resolvedFactories: ResolvedReflectiveFactory[]; } export declare function resolveForwardRef(type: any): any; @@ -1020,8 +1020,8 @@ export declare function sequence(steps: AnimationMetadata[]): AnimationSequenceM export declare function setTestabilityGetter(getter: GetTestability): void; export declare class SimpleChange { - previousValue: any; currentValue: any; + previousValue: any; constructor(previousValue: any, currentValue: any); isFirstChange(): boolean; } @@ -1050,14 +1050,14 @@ export declare function style(tokens: string | { }>): AnimationStyleMetadata; export declare class SystemJsCmpFactoryResolver implements ComponentResolver { - resolveComponent(componentType: string | Type): Promise>; clearCache(): void; + resolveComponent(componentType: string | Type): Promise>; } export declare class SystemJsComponentResolver implements ComponentResolver { constructor(_resolver: ComponentResolver); - resolveComponent(componentType: string | Type): Promise>; clearCache(): void; + resolveComponent(componentType: string | Type): Promise>; } export declare abstract class TemplateRef { @@ -1067,22 +1067,22 @@ export declare abstract class TemplateRef { export declare class Testability { constructor(_ngZone: NgZone); - increasePendingRequestCount(): number; decreasePendingRequestCount(): number; - isStable(): boolean; - whenStable(callback: Function): void; - getPendingRequestCount(): number; findBindings(using: any, provider: string, exactMatch: boolean): any[]; findProviders(using: any, provider: string, exactMatch: boolean): any[]; + getPendingRequestCount(): number; + increasePendingRequestCount(): number; + isStable(): boolean; + whenStable(callback: Function): void; } export declare class TestabilityRegistry { constructor(); - registerApplication(token: any, testability: Testability): void; - getTestability(elem: any): Testability; - getAllTestabilities(): Testability[]; - getAllRootElements(): any[]; findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability; + getAllRootElements(): any[]; + getAllTestabilities(): Testability[]; + getTestability(elem: any): Testability; + registerApplication(token: any, testability: Testability): void; } export interface TrackByFn { @@ -1096,9 +1096,9 @@ export declare function trigger(name: string, animation: AnimationMetadata[]): A export declare var Type: FunctionConstructor; export interface TypeDecorator { - (type: T): T; - (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void; annotations: any[]; + (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void; + (type: T): T; Class(obj: ClassDefinition): ConcreteType; } @@ -1139,16 +1139,16 @@ export interface ViewChildrenMetadataFactory { export declare abstract class ViewContainerRef { element: ElementRef; injector: Injector; + length: number; parentInjector: Injector; abstract clear(): void; - abstract get(index: number): ViewRef; - length: number; - abstract createEmbeddedView(templateRef: TemplateRef, context?: C, index?: number): EmbeddedViewRef; abstract createComponent(componentFactory: ComponentFactory, index?: number, injector?: Injector, projectableNodes?: any[][]): ComponentRef; - abstract insert(viewRef: ViewRef, index?: number): ViewRef; - abstract indexOf(viewRef: ViewRef): number; - abstract remove(index?: number): void; + abstract createEmbeddedView(templateRef: TemplateRef, context?: C, index?: number): EmbeddedViewRef; abstract detach(index?: number): ViewRef; + abstract get(index: number): ViewRef; + abstract indexOf(viewRef: ViewRef): number; + abstract insert(viewRef: ViewRef, index?: number): ViewRef; + abstract remove(index?: number): void; } export interface ViewDecorator extends TypeDecorator { @@ -1172,15 +1172,15 @@ export declare enum ViewEncapsulation { } export declare class ViewMetadata { - templateUrl: string; - template: string; + animations: AnimationEntryMetadata[]; + directives: Array; + encapsulation: ViewEncapsulation; + interpolation: [string, string]; + pipes: Array; styleUrls: string[]; styles: string[]; - directives: Array; - pipes: Array; - encapsulation: ViewEncapsulation; - animations: AnimationEntryMetadata[]; - interpolation: [string, string]; + template: string; + templateUrl: string; constructor({templateUrl, template, directives, pipes, encapsulation, styles, styleUrls, animations, interpolation}?: { templateUrl?: string; template?: string; @@ -1222,12 +1222,12 @@ export interface ViewMetadataFactory { export declare var ViewQuery: QueryMetadataFactory; export declare class ViewQueryMetadata extends QueryMetadata { + isViewQuery: boolean; constructor(_selector: Type | string, {descendants, first, read}?: { descendants?: boolean; first?: boolean; read?: any; }); - isViewQuery: boolean; toString(): string; } @@ -1237,13 +1237,13 @@ export declare abstract class ViewRef { } export declare class WrappedException extends BaseWrappedException { - constructor(_wrapperMessage: string, _originalException: any, _originalStack?: any, _context?: any); - wrapperMessage: string; - wrapperStack: any; - originalException: any; - originalStack: any; context: any; message: string; + originalException: any; + originalStack: any; + wrapperMessage: string; + wrapperStack: any; + constructor(_wrapperMessage: string, _originalException: any, _originalStack?: any, _context?: any); toString(): string; } diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts index 6a94be6a7c..95153e2a58 100644 --- a/tools/public_api_guard/core/testing.d.ts +++ b/tools/public_api_guard/core/testing.d.ts @@ -40,13 +40,13 @@ export declare function resetBaseTestProviders(): void; export declare function setBaseTestProviders(platformProviders: Array, applicationProviders: Array): void; export declare class TestInjector { - reset(): void; - platformProviders: Array; applicationProviders: Array; + platformProviders: Array; addProviders(providers: Array): void; createInjector(): ReflectiveInjector; - get(token: any): any; execute(tokens: any[], fn: Function): any; + get(token: any): any; + reset(): void; } export declare function tick(millis?: number): void; diff --git a/tools/public_api_guard/forms/index.d.ts b/tools/public_api_guard/forms/index.d.ts index e91368802a..1ae5353812 100644 --- a/tools/public_api_guard/forms/index.d.ts +++ b/tools/public_api_guard/forms/index.d.ts @@ -1,100 +1,100 @@ export declare abstract class AbstractControl { - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; - constructor(validator: ValidatorFn, asyncValidator: AsyncValidatorFn); - value: any; - status: string; - valid: boolean; + dirty: boolean; errors: { [key: string]: any; }; + pending: boolean; pristine: boolean; - dirty: boolean; + root: AbstractControl; + status: string; + statusChanges: Observable; touched: boolean; untouched: boolean; + valid: boolean; + validator: ValidatorFn; + value: any; valueChanges: Observable; - statusChanges: Observable; - pending: boolean; - setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[]): void; + constructor(validator: ValidatorFn, asyncValidator: AsyncValidatorFn); clearAsyncValidators(): void; - setValidators(newValidator: ValidatorFn | ValidatorFn[]): void; clearValidators(): void; - markAsTouched(): void; + find(path: Array | string): AbstractControl; + getError(errorCode: string, path?: string[]): any; + hasError(errorCode: string, path?: string[]): boolean; markAsDirty({onlySelf}?: { onlySelf?: boolean; }): void; markAsPending({onlySelf}?: { onlySelf?: boolean; }): void; - setParent(parent: FormGroup | FormArray): void; - updateValueAndValidity({onlySelf, emitEvent}?: { - onlySelf?: boolean; - emitEvent?: boolean; - }): void; + markAsTouched(): void; + setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[]): void; setErrors(errors: { [key: string]: any; }, {emitEvent}?: { emitEvent?: boolean; }): void; - find(path: Array | string): AbstractControl; - getError(errorCode: string, path?: string[]): any; - hasError(errorCode: string, path?: string[]): boolean; - root: AbstractControl; + setParent(parent: FormGroup | FormArray): void; + setValidators(newValidator: ValidatorFn | ValidatorFn[]): void; + updateValueAndValidity({onlySelf, emitEvent}?: { + onlySelf?: boolean; + emitEvent?: boolean; + }): void; } export declare abstract class AbstractControlDirective { control: AbstractControl; - value: any; - valid: boolean; + dirty: boolean; errors: { [key: string]: any; }; + path: string[]; pristine: boolean; - dirty: boolean; touched: boolean; untouched: boolean; - path: string[]; + valid: boolean; + value: any; } export declare class CheckboxControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (_: any) => {}): void; registerOnTouched(fn: () => {}): void; + writeValue(value: any): void; } export declare class ControlContainer extends AbstractControlDirective { - name: string; formDirective: Form; + name: string; path: string[]; } export interface ControlValueAccessor { - writeValue(obj: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; + writeValue(obj: any): void; } export declare class DefaultValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (_: any) => void): void; registerOnTouched(fn: () => void): void; + writeValue(value: any): void; } export declare function disableDeprecatedForms(): any[]; export interface Form { addControl(dir: NgControl): void; - removeControl(dir: NgControl): void; - getControl(dir: NgControl): FormControl; addFormGroup(dir: AbstractFormGroupDirective): void; - removeFormGroup(dir: AbstractFormGroupDirective): void; + getControl(dir: NgControl): FormControl; getFormGroup(dir: AbstractFormGroupDirective): FormGroup; + removeControl(dir: NgControl): void; + removeFormGroup(dir: AbstractFormGroupDirective): void; updateModel(dir: NgControl, value: any): void; } @@ -104,61 +104,61 @@ export declare const FORM_PROVIDERS: Type[]; export declare class FormArray extends AbstractControl { controls: AbstractControl[]; + length: number; constructor(controls: AbstractControl[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); at(index: number): AbstractControl; - push(control: AbstractControl): void; insert(index: number, control: AbstractControl): void; + push(control: AbstractControl): void; removeAt(index: number): void; - length: number; } export declare class FormBuilder { + array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray; + control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl; group(controlsConfig: { [key: string]: any; }, extra?: { [key: string]: any; }): FormGroup; - control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl; - array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray; } export declare class FormControl extends AbstractControl { constructor(value?: any, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]); + registerOnChange(fn: Function): void; updateValue(value: any, {onlySelf, emitEvent, emitModelToViewChange}?: { onlySelf?: boolean; emitEvent?: boolean; emitModelToViewChange?: boolean; }): void; - registerOnChange(fn: Function): void; } export declare class FormControlDirective extends NgControl implements OnChanges { - viewModel: any; - form: FormControl; - model: any; - update: EventEmitter<{}>; - constructor(_validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); - ngOnChanges(changes: SimpleChanges): void; - path: string[]; - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; control: FormControl; + form: FormControl; + model: any; + path: string[]; + update: EventEmitter<{}>; + validator: ValidatorFn; + viewModel: any; + constructor(_validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); + ngOnChanges(changes: SimpleChanges): void; viewToModelUpdate(newValue: any): void; } export declare class FormControlName extends NgControl implements OnChanges, OnDestroy { - name: string; + asyncValidator: AsyncValidatorFn; + control: FormControl; + formDirective: any; model: any; + name: string; + path: string[]; update: EventEmitter<{}>; + validator: ValidatorFn; constructor(_parent: ControlContainer, _validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; viewToModelUpdate(newValue: any): void; - path: string[]; - formDirective: any; - validator: ValidatorFn; - asyncValidator: AsyncValidatorFn; - control: FormControl; } export declare class FormGroup extends AbstractControl { @@ -170,32 +170,32 @@ export declare class FormGroup extends AbstractControl { }, optionals?: { [key: string]: boolean; }, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); - registerControl(name: string, control: AbstractControl): AbstractControl; addControl(name: string, control: AbstractControl): void; - removeControl(name: string): void; - include(controlName: string): void; - exclude(controlName: string): void; contains(controlName: string): boolean; + exclude(controlName: string): void; + include(controlName: string): void; + registerControl(name: string, control: AbstractControl): AbstractControl; + removeControl(name: string): void; } export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges { + control: FormGroup; directives: NgControl[]; form: FormGroup; - ngSubmit: EventEmitter<{}>; - constructor(_validators: any[], _asyncValidators: any[]); - ngOnChanges(changes: SimpleChanges): void; - submitted: boolean; formDirective: Form; - control: FormGroup; + ngSubmit: EventEmitter<{}>; path: string[]; + submitted: boolean; + constructor(_validators: any[], _asyncValidators: any[]); addControl(dir: NgControl): void; - getControl(dir: NgControl): FormControl; - removeControl(dir: NgControl): void; addFormGroup(dir: FormGroupName): void; - removeFormGroup(dir: FormGroupName): void; + getControl(dir: NgControl): FormControl; getFormGroup(dir: FormGroupName): FormGroup; - updateModel(dir: NgControl, value: any): void; + ngOnChanges(changes: SimpleChanges): void; onSubmit(): boolean; + removeControl(dir: NgControl): void; + removeFormGroup(dir: FormGroupName): void; + updateModel(dir: NgControl, value: any): void; } export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { @@ -224,61 +224,61 @@ export declare const NG_VALIDATORS: OpaqueToken; export declare const NG_VALUE_ACCESSOR: OpaqueToken; export declare abstract class NgControl extends AbstractControlDirective { - name: string; - valueAccessor: ControlValueAccessor; - validator: ValidatorFn; asyncValidator: AsyncValidatorFn; + name: string; + validator: ValidatorFn; + valueAccessor: ControlValueAccessor; abstract viewToModelUpdate(newValue: any): void; } export declare class NgControlStatus { - constructor(cd: NgControl); - ngClassUntouched: boolean; - ngClassTouched: boolean; - ngClassPristine: boolean; ngClassDirty: boolean; - ngClassValid: boolean; ngClassInvalid: boolean; + ngClassPristine: boolean; + ngClassTouched: boolean; + ngClassUntouched: boolean; + ngClassValid: boolean; + constructor(cd: NgControl); } export declare class NgForm extends ControlContainer implements Form { - form: FormGroup; - ngSubmit: EventEmitter<{}>; - constructor(validators: any[], asyncValidators: any[]); - submitted: boolean; - formDirective: Form; control: FormGroup; - path: string[]; controls: { [key: string]: AbstractControl; }; + form: FormGroup; + formDirective: Form; + ngSubmit: EventEmitter<{}>; + path: string[]; + submitted: boolean; + constructor(validators: any[], asyncValidators: any[]); addControl(dir: NgModel): void; - getControl(dir: NgModel): FormControl; - removeControl(dir: NgModel): void; addFormGroup(dir: NgModelGroup): void; - removeFormGroup(dir: NgModelGroup): void; + getControl(dir: NgModel): FormControl; getFormGroup(dir: NgModelGroup): FormGroup; - updateModel(dir: NgControl, value: any): void; onSubmit(): boolean; + removeControl(dir: NgModel): void; + removeFormGroup(dir: NgModelGroup): void; + updateModel(dir: NgControl, value: any): void; } export declare class NgModel extends NgControl implements OnChanges, OnDestroy { - viewModel: any; + asyncValidator: AsyncValidatorFn; + control: FormControl; + formDirective: any; model: any; name: string; options: { name?: string; standalone?: boolean; }; + path: string[]; update: EventEmitter<{}>; + validator: ValidatorFn; + viewModel: any; constructor(_parent: ControlContainer, _validators: any[], _asyncValidators: any[], valueAccessors: ControlValueAccessor[]); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; - control: FormControl; - path: string[]; - formDirective: any; - validator: ValidatorFn; - asyncValidator: AsyncValidatorFn; viewToModelUpdate(newValue: any): void; } @@ -289,9 +289,9 @@ export declare class NgModelGroup extends AbstractFormGroupDirective implements export declare class NgSelectOption implements OnDestroy { id: string; - constructor(_element: ElementRef, _renderer: Renderer, _select: SelectControlValueAccessor); ngValue: any; value: any; + constructor(_element: ElementRef, _renderer: Renderer, _select: SelectControlValueAccessor); ngOnDestroy(): void; } @@ -310,13 +310,13 @@ export declare class RequiredValidator { } export declare class SelectControlValueAccessor implements ControlValueAccessor { - value: any; onChange: (_: any) => void; onTouched: () => void; + value: any; constructor(_renderer: Renderer, _elementRef: ElementRef); - writeValue(value: any): void; registerOnChange(fn: (value: any) => any): void; registerOnTouched(fn: () => any): void; + writeValue(value: any): void; } export interface Validator { @@ -326,15 +326,15 @@ export interface Validator { } export declare class Validators { - static required(control: AbstractControl): { - [key: string]: boolean; - }; - static minLength(minLength: number): ValidatorFn; + static compose(validators: ValidatorFn[]): ValidatorFn; + static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; static maxLength(maxLength: number): ValidatorFn; - static pattern(pattern: string): ValidatorFn; + static minLength(minLength: number): ValidatorFn; static nullValidator(c: AbstractControl): { [key: string]: boolean; }; - static compose(validators: ValidatorFn[]): ValidatorFn; - static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; + static pattern(pattern: string): ValidatorFn; + static required(control: AbstractControl): { + [key: string]: boolean; + }; } diff --git a/tools/public_api_guard/http/index.d.ts b/tools/public_api_guard/http/index.d.ts index f6e175a2ff..3eb2c1e58f 100644 --- a/tools/public_api_guard/http/index.d.ts +++ b/tools/public_api_guard/http/index.d.ts @@ -30,33 +30,33 @@ export declare class Headers { constructor(headers?: Headers | { [key: string]: any; }); - static fromResponseHeaderString(headersString: string): Headers; append(name: string, value: string): void; delete(name: string): void; + entries(): void; forEach(fn: (values: string[], name: string, headers: Map) => void): void; get(header: string): string; + getAll(header: string): string[]; has(header: string): boolean; keys(): string[]; set(header: string, value: string | string[]): void; - values(): string[][]; toJSON(): { [key: string]: any; }; - getAll(header: string): string[]; - entries(): void; + values(): string[][]; + static fromResponseHeaderString(headersString: string): Headers; } export declare class Http { protected _backend: ConnectionBackend; protected _defaultOptions: RequestOptions; constructor(_backend: ConnectionBackend, _defaultOptions: RequestOptions); - request(url: string | Request, options?: RequestOptionsArgs): Observable; + delete(url: string, options?: RequestOptionsArgs): Observable; get(url: string, options?: RequestOptionsArgs): Observable; + head(url: string, options?: RequestOptionsArgs): Observable; + patch(url: string, body: any, options?: RequestOptionsArgs): Observable; post(url: string, body: any, options?: RequestOptionsArgs): Observable; put(url: string, body: any, options?: RequestOptionsArgs): Observable; - delete(url: string, options?: RequestOptionsArgs): Observable; - patch(url: string, body: any, options?: RequestOptionsArgs): Observable; - head(url: string, options?: RequestOptionsArgs): Observable; + request(url: string | Request, options?: RequestOptionsArgs): Observable; } export declare const HTTP_BINDINGS: any[]; @@ -94,17 +94,17 @@ export declare enum ReadyState { } export declare class Request { - method: RequestMethod; headers: Headers; + method: RequestMethod; url: string; withCredentials: boolean; constructor(requestOptions: RequestArgs); - text(): string; - json(): string; arrayBuffer(): ArrayBuffer; blob(): Blob; detectContentType(): ContentType; getBody(): any; + json(): string; + text(): string; } export declare enum RequestMethod { @@ -118,46 +118,46 @@ export declare enum RequestMethod { } export declare class RequestOptions { - method: RequestMethod | string; - headers: Headers; body: any; - url: string; + headers: Headers; + method: RequestMethod | string; search: URLSearchParams; + url: string; withCredentials: boolean; constructor({method, headers, body, url, search, withCredentials}?: RequestOptionsArgs); merge(options?: RequestOptionsArgs): RequestOptions; } export interface RequestOptionsArgs { - url?: string; + body?: any; + headers?: Headers; method?: string | RequestMethod; search?: string | URLSearchParams; - headers?: Headers; - body?: any; + url?: string; withCredentials?: boolean; } export declare class Response { - type: ResponseType; + bytesLoaded: number; + headers: Headers; ok: boolean; - url: string; status: number; statusText: string; - bytesLoaded: number; totalBytes: number; - headers: Headers; + type: ResponseType; + url: string; constructor(responseOptions: ResponseOptions); + arrayBuffer(): any; blob(): any; json(): any; text(): string; - arrayBuffer(): any; toString(): string; } export declare class ResponseOptions { body: string | Object; - status: number; headers: Headers; + status: number; url: string; constructor({body, status, headers, statusText, type, url}?: ResponseOptionsArgs); merge(options?: ResponseOptionsArgs): ResponseOptions; @@ -181,20 +181,20 @@ export declare enum ResponseType { } export declare class URLSearchParams { - rawParams: string; paramsMap: Map; + rawParams: string; constructor(rawParams?: string); - clone(): URLSearchParams; - has(param: string): boolean; - get(param: string): string; - getAll(param: string): string[]; - set(param: string, val: string): void; - setAll(searchParams: URLSearchParams): void; append(param: string, val: string): void; appendAll(searchParams: URLSearchParams): void; - replaceAll(searchParams: URLSearchParams): void; - toString(): string; + clone(): URLSearchParams; delete(param: string): void; + get(param: string): string; + getAll(param: string): string[]; + has(param: string): boolean; + replaceAll(searchParams: URLSearchParams): void; + set(param: string, val: string): void; + setAll(searchParams: URLSearchParams): void; + toString(): string; } export declare class XHRBackend implements ConnectionBackend { @@ -203,9 +203,9 @@ export declare class XHRBackend implements ConnectionBackend { } export declare class XHRConnection implements Connection { + readyState: ReadyState; request: Request; response: Observable; - readyState: ReadyState; constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions); setDetectedContentType(req: any, _xhr: any): void; } diff --git a/tools/public_api_guard/http/testing.d.ts b/tools/public_api_guard/http/testing.d.ts index 2591d42ede..77237340f0 100644 --- a/tools/public_api_guard/http/testing.d.ts +++ b/tools/public_api_guard/http/testing.d.ts @@ -3,9 +3,9 @@ export declare class MockBackend implements ConnectionBackend { connectionsArray: MockConnection[]; pendingConnections: any; constructor(); - verifyNoPendingRequests(): void; - resolveAllConnections(): void; createConnection(req: Request): MockConnection; + resolveAllConnections(): void; + verifyNoPendingRequests(): void; } export declare class MockConnection implements Connection { @@ -13,7 +13,7 @@ export declare class MockConnection implements Connection { request: Request; response: ReplaySubject; constructor(req: Request); - mockRespond(res: Response): void; mockDownload(res: Response): void; mockError(err?: Error): void; + mockRespond(res: Response): void; } diff --git a/tools/public_api_guard/platform-browser/index.d.ts b/tools/public_api_guard/platform-browser/index.d.ts index c828c90086..9b2d23b54c 100644 --- a/tools/public_api_guard/platform-browser/index.d.ts +++ b/tools/public_api_guard/platform-browser/index.d.ts @@ -9,17 +9,17 @@ export declare const BROWSER_SANITIZATION_PROVIDERS: Array; export declare function browserPlatform(): PlatformRef; export declare class BrowserPlatformLocation extends PlatformLocation { - constructor(); - getBaseHrefFromDOM(): string; - onPopState(fn: UrlChangeListener): void; - onHashChange(fn: UrlChangeListener): void; + hash: string; pathname: string; search: string; - hash: string; + constructor(); + back(): void; + forward(): void; + getBaseHrefFromDOM(): string; + onHashChange(fn: UrlChangeListener): void; + onPopState(fn: UrlChangeListener): void; pushState(state: any, title: string, url: string): void; replaceState(state: any, title: string, url: string): void; - forward(): void; - back(): void; } export declare class By { @@ -41,18 +41,18 @@ export declare function disableDebugTools(): void; export declare const DOCUMENT: OpaqueToken; export declare class DomEventsPlugin extends EventManagerPlugin { - supports(eventName: string): boolean; addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; addGlobalEventListener(target: string, eventName: string, handler: Function): Function; + supports(eventName: string): boolean; } export declare abstract class DomSanitizationService implements SanitizationService { - abstract sanitize(context: SecurityContext, value: any): string; abstract bypassSecurityTrustHtml(value: string): SafeHtml; - abstract bypassSecurityTrustStyle(value: string): SafeStyle; - abstract bypassSecurityTrustScript(value: string): SafeScript; - abstract bypassSecurityTrustUrl(value: string): SafeUrl; abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl; + abstract bypassSecurityTrustScript(value: string): SafeScript; + abstract bypassSecurityTrustStyle(value: string): SafeStyle; + abstract bypassSecurityTrustUrl(value: string): SafeUrl; + abstract sanitize(context: SecurityContext, value: any): string; } export declare const ELEMENT_PROBE_PROVIDERS: any[]; @@ -69,8 +69,8 @@ export declare class EventManager { } export declare class FnArg { - value: any; type: Type; + value: any; constructor(value: any, type: Type); } @@ -86,40 +86,40 @@ export declare class HammerGestureConfig { export declare class KeyEventsPlugin extends EventManagerPlugin { constructor(); - supports(eventName: string): boolean; addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; + supports(eventName: string): boolean; + static eventCallback(element: HTMLElement, fullKey: any, handler: Function, zone: NgZone): Function; + static getEventFullKey(event: KeyboardEvent): string; static parseEventName(eventName: string): { [key: string]: string; }; - static getEventFullKey(event: KeyboardEvent): string; - static eventCallback(element: HTMLElement, fullKey: any, handler: Function, zone: NgZone): Function; } export declare abstract class MessageBus implements MessageBusSource, MessageBusSink { - abstract initChannel(channel: string, runInZone?: boolean): void; abstract attachToZone(zone: NgZone): void; abstract from(channel: string): EventEmitter; + abstract initChannel(channel: string, runInZone?: boolean): void; abstract to(channel: string): EventEmitter; } export interface MessageBusSink { - initChannel(channel: string, runInZone: boolean): void; attachToZone(zone: NgZone): void; + initChannel(channel: string, runInZone: boolean): void; to(channel: string): EventEmitter; } export interface MessageBusSource { - initChannel(channel: string, runInZone: boolean): void; attachToZone(zone: NgZone): void; from(channel: string): EventEmitter; + initChannel(channel: string, runInZone: boolean): void; } export declare const PRIMITIVE: Type; export declare class ReceivedMessage { - method: string; args: any[]; id: string; + method: string; type: string; constructor(data: { [key: string]: any; @@ -157,14 +157,14 @@ export declare class Title { } export declare class UiArguments { - method: string; args: FnArg[]; + method: string; constructor(method: string, args?: FnArg[]); } export declare class WebWorkerInstance { - worker: Worker; bus: MessageBus; + worker: Worker; } export declare const WORKER_APP_APPLICATION_PROVIDERS: Array; diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index 11a87de264..8ad2de9701 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -1,17 +1,17 @@ export declare class ActivatedRoute { - url: Observable; - params: Observable; - outlet: string; component: Type | string; + outlet: string; + params: Observable; snapshot: ActivatedRouteSnapshot; + url: Observable; toString(): string; } export declare class ActivatedRouteSnapshot { - url: UrlPathWithParams[]; - params: Params; - outlet: string; component: Type | string; + outlet: string; + params: Params; + url: UrlPathWithParams[]; toString(): string; } @@ -50,9 +50,9 @@ export declare class NavigationEnd { } export declare class NavigationError { + error: any; id: number; url: string; - error: any; constructor(id: number, url: string, error: any); toString(): string; } @@ -73,26 +73,26 @@ export declare const PRIMARY_OUTLET: string; export declare function provideRouter(config: RouterConfig, opts?: ExtraOptions): any[]; export interface Route { - path?: string; - terminal?: boolean; - component?: Type | string; - outlet?: string; canActivate?: any[]; canDeactivate?: any[]; - redirectTo?: string; children?: Route[]; + component?: Type | string; + outlet?: string; + path?: string; + redirectTo?: string; + terminal?: boolean; } export declare class Router { + events: Observable; routerState: RouterState; url: string; - events: Observable; - resetConfig(config: RouterConfig): void; createUrlTree(commands: any[], {relativeTo, queryParams, fragment}?: NavigationExtras): UrlTree; - navigateByUrl(url: string | UrlTree): Promise; navigate(commands: any[], extras?: NavigationExtras): Promise; - serializeUrl(url: UrlTree): string; + navigateByUrl(url: string | UrlTree): Promise; parseUrl(url: string): UrlTree; + resetConfig(config: RouterConfig): void; + serializeUrl(url: UrlTree): string; } export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkActive)[]; @@ -104,33 +104,33 @@ export declare class RouterOutletMap { } export declare class RouterState extends Tree { - queryParams: Observable; fragment: Observable; + queryParams: Observable; snapshot: RouterStateSnapshot; toString(): string; } export declare class RouterStateSnapshot extends Tree { - url: string; - queryParams: Params; fragment: string; + queryParams: Params; + url: string; toString(): string; } export declare class RoutesRecognized { id: number; + state: RouterStateSnapshot; url: string; urlAfterRedirects: string; - state: RouterStateSnapshot; constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot); toString(): string; } export declare class UrlPathWithParams { - path: string; parameters: { [key: string]: string; }; + path: string; constructor(path: string, parameters: { [key: string]: string; }); @@ -143,10 +143,10 @@ export declare abstract class UrlSerializer { } export declare class UrlTree { - root: UrlSegment; + fragment: string; queryParams: { [key: string]: string; }; - fragment: string; + root: UrlSegment; toString(): string; } diff --git a/tools/public_api_guard/upgrade/index.d.ts b/tools/public_api_guard/upgrade/index.d.ts index fdf6e4f390..0777067db4 100644 --- a/tools/public_api_guard/upgrade/index.d.ts +++ b/tools/public_api_guard/upgrade/index.d.ts @@ -1,19 +1,19 @@ export declare class UpgradeAdapter { - downgradeNg2Component(type: Type): Function; - upgradeNg1Component(name: string): Type; - bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef; addProvider(provider: Type | Provider | any[] | any): void; + bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef; + downgradeNg2Component(type: Type): Function; + downgradeNg2Provider(token: any): Function; + upgradeNg1Component(name: string): Type; upgradeNg1Provider(name: string, options?: { asToken: any; }): void; - downgradeNg2Provider(token: any): Function; } export declare class UpgradeAdapterRef { - ng1RootScope: angular.IRootScopeService; ng1Injector: angular.IInjectorService; + ng1RootScope: angular.IRootScopeService; ng2ApplicationRef: ApplicationRef; ng2Injector: Injector; - ready(fn: (upgradeAdapterRef?: UpgradeAdapterRef) => void): void; dispose(): void; + ready(fn: (upgradeAdapterRef?: UpgradeAdapterRef) => void): void; }