diff --git a/gulpfile.js b/gulpfile.js index 121c8245c6..b8068b9b22 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -53,7 +53,8 @@ const publicApiArgs = [ '--stripExportPattern', '^__', '--allowModuleIdentifiers', 'jasmine', '--allowModuleIdentifiers', 'protractor', - '--allowModuleIdentifiers', 'angular' + '--allowModuleIdentifiers', 'angular', + '--onStabilityMissing', 'warn' ].concat(entrypoints); // Note that these two commands work on built d.ts files instead of the source diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 7b900d4bf8..f67ec5d18c 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.3", + "version": "0.1.4", "dependencies": { "ansi-regex": { "version": "2.0.0" diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a8cdeaf9a8..554bada154 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -8418,9 +8418,9 @@ "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.0.tgz" }, "ts-api-guardian": { - "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", + "version": "0.1.4", + "from": "ts-api-guardian@0.1.4", + "resolved": "https://registry.npmjs.org/ts-api-guardian/-/ts-api-guardian-0.1.4.tgz", "dependencies": { "ansi-regex": { "version": "2.0.0", diff --git a/package.json b/package.json index 317a581017..3eef36bf35 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.3", + "ts-api-guardian": "0.1.4", "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 2eecb2c1ee..78a1b58705 100644 --- a/tools/public_api_guard/common/index.d.ts +++ b/tools/public_api_guard/common/index.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare abstract class AbstractControl { asyncValidator: AsyncValidatorFn; dirty: boolean; @@ -38,6 +39,7 @@ export declare abstract class AbstractControl { }): void; } +/** @experimental */ export declare abstract class AbstractControlDirective { control: AbstractControl; dirty: boolean; @@ -52,14 +54,17 @@ export declare abstract class AbstractControlDirective { value: any; } +/** @stable */ export declare const APP_BASE_HREF: OpaqueToken; +/** @stable */ export declare class AsyncPipe implements OnDestroy { constructor(_ref: ChangeDetectorRef); ngOnDestroy(): void; transform(obj: Observable | Promise | EventEmitter): any; } +/** @experimental */ export declare class CheckboxControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -69,10 +74,13 @@ export declare class CheckboxControlValueAccessor implements ControlValueAccesso writeValue(value: any): void; } +/** @experimental */ export declare const COMMON_DIRECTIVES: Type[][]; +/** @experimental */ export declare const COMMON_PIPES: (typeof AsyncPipe | typeof SlicePipe | typeof ReplacePipe | typeof I18nPluralPipe | typeof I18nSelectPipe)[]; +/** @experimental */ export declare class Control extends AbstractControl { constructor(value?: any, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); registerOnChange(fn: Function): void; @@ -83,6 +91,7 @@ export declare class Control extends AbstractControl { }): void; } +/** @experimental */ export declare class ControlArray extends AbstractControl { controls: AbstractControl[]; length: number; @@ -93,12 +102,14 @@ export declare class ControlArray extends AbstractControl { removeAt(index: number): void; } +/** @experimental */ export declare class ControlContainer extends AbstractControlDirective { formDirective: Form; name: string; path: string[]; } +/** @experimental */ export declare class ControlGroup extends AbstractControl { controls: { [key: string]: AbstractControl; @@ -116,26 +127,32 @@ export declare class ControlGroup extends AbstractControl { removeControl(name: string): void; } +/** @experimental */ export interface ControlValueAccessor { registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(obj: any): void; } +/** @stable */ export declare const CORE_DIRECTIVES: Type[]; +/** @experimental */ export declare class CurrencyPipe implements PipeTransform { transform(value: any, currencyCode?: string, symbolDisplay?: boolean, digits?: string): string; } +/** @experimental */ export declare class DatePipe implements PipeTransform { transform(value: any, pattern?: string): string; } +/** @experimental */ export declare class DecimalPipe implements PipeTransform { transform(value: any, digits?: string): string; } +/** @experimental */ export declare class DefaultValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -145,6 +162,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor { writeValue(value: any): void; } +/** @experimental */ export interface Form { addControl(dir: NgControl): void; addControlGroup(dir: NgControlGroup): void; @@ -155,10 +173,13 @@ export interface Form { updateModel(dir: NgControl, value: any): void; } +/** @experimental */ export declare const FORM_DIRECTIVES: Type[]; +/** @experimental */ export declare const FORM_PROVIDERS: Type[]; +/** @experimental */ export declare class FormBuilder { array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): ControlArray; control(value: Object, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): Control; @@ -169,6 +190,7 @@ export declare class FormBuilder { }): ControlGroup; } +/** @stable */ export declare class HashLocationStrategy extends LocationStrategy { constructor(_platformLocation: PlatformLocation, _baseHref?: string); back(): void; @@ -181,6 +203,7 @@ export declare class HashLocationStrategy extends LocationStrategy { replaceState(state: any, title: string, path: string, queryParams: string): void; } +/** @experimental */ export declare class I18nPluralPipe implements PipeTransform { constructor(_localization: NgLocalization); transform(value: number, pluralMap: { @@ -188,16 +211,19 @@ export declare class I18nPluralPipe implements PipeTransform { }): string; } +/** @experimental */ export declare class I18nSelectPipe implements PipeTransform { transform(value: string, mapping: { [key: string]: string; }): string; } +/** @stable */ export declare class JsonPipe implements PipeTransform { transform(value: any): string; } +/** @stable */ export declare class Location { constructor(platformStrategy: LocationStrategy); back(): void; @@ -214,6 +240,7 @@ export declare class Location { static stripTrailingSlash(url: string): string; } +/** @stable */ export declare abstract class LocationStrategy { abstract back(): void; abstract forward(): void; @@ -225,10 +252,12 @@ export declare abstract class LocationStrategy { abstract replaceState(state: any, title: string, url: string, queryParams: string): void; } +/** @experimental */ export declare class LowerCasePipe implements PipeTransform { transform(value: string): string; } +/** @experimental */ export declare class MaxLengthValidator implements Validator { constructor(maxLength: string); validate(c: AbstractControl): { @@ -236,6 +265,7 @@ export declare class MaxLengthValidator implements Validator { }; } +/** @experimental */ export declare class MinLengthValidator implements Validator { constructor(minLength: string); validate(c: AbstractControl): { @@ -243,12 +273,16 @@ export declare class MinLengthValidator implements Validator { }; } +/** @experimental */ export declare const NG_ASYNC_VALIDATORS: OpaqueToken; +/** @experimental */ export declare const NG_VALIDATORS: OpaqueToken; +/** @experimental */ export declare const NG_VALUE_ACCESSOR: OpaqueToken; +/** @stable */ export declare class NgClass implements DoCheck, OnDestroy { initialClasses: string; rawClass: string | string[] | Set | { @@ -259,6 +293,7 @@ export declare class NgClass implements DoCheck, OnDestroy { ngOnDestroy(): void; } +/** @experimental */ export declare abstract class NgControl extends AbstractControlDirective { asyncValidator: AsyncValidatorFn; name: string; @@ -267,6 +302,7 @@ export declare abstract class NgControl extends AbstractControlDirective { abstract viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgControlGroup extends ControlContainer implements OnInit, OnDestroy { asyncValidator: AsyncValidatorFn; control: ControlGroup; @@ -278,6 +314,7 @@ export declare class NgControlGroup extends ControlContainer implements OnInit, ngOnInit(): void; } +/** @experimental */ export declare class NgControlName extends NgControl implements OnChanges, OnDestroy { asyncValidator: AsyncValidatorFn; control: Control; @@ -292,6 +329,7 @@ export declare class NgControlName extends NgControl implements OnChanges, OnDes viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgControlStatus { ngClassDirty: boolean; ngClassInvalid: boolean; @@ -302,6 +340,7 @@ export declare class NgControlStatus { constructor(cd: NgControl); } +/** @stable */ export declare class NgFor implements DoCheck { ngForOf: any; ngForTemplate: TemplateRef; @@ -310,6 +349,7 @@ export declare class NgFor implements DoCheck { ngDoCheck(): void; } +/** @experimental */ export declare class NgForm extends ControlContainer implements Form { control: ControlGroup; controls: { @@ -331,6 +371,7 @@ export declare class NgForm extends ControlContainer implements Form { updateModel(dir: NgControl, value: any): void; } +/** @experimental */ export declare class NgFormControl extends NgControl implements OnChanges { asyncValidator: AsyncValidatorFn; control: Control; @@ -345,6 +386,7 @@ export declare class NgFormControl extends NgControl implements OnChanges { viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgFormModel extends ControlContainer implements Form, OnChanges { control: ControlGroup; directives: NgControl[]; @@ -365,15 +407,18 @@ export declare class NgFormModel extends ControlContainer implements Form, OnCha updateModel(dir: NgControl, value: any): void; } +/** @stable */ export declare class NgIf { ngIf: any; constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef); } +/** @experimental */ export declare abstract class NgLocalization { abstract getPluralCategory(value: any): string; } +/** @experimental */ export declare class NgModel extends NgControl implements OnChanges { asyncValidator: AsyncValidatorFn; control: Control; @@ -387,6 +432,7 @@ export declare class NgModel extends NgControl implements OnChanges { viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgPlural implements AfterContentInit { cases: QueryList; ngPlural: number; @@ -394,11 +440,13 @@ export declare class NgPlural implements AfterContentInit { ngAfterContentInit(): void; } +/** @experimental */ export declare class NgPluralCase { value: string; constructor(value: string, template: TemplateRef, viewContainer: ViewContainerRef); } +/** @experimental */ export declare class NgSelectOption implements OnDestroy { id: string; ngValue: any; @@ -407,6 +455,7 @@ export declare class NgSelectOption implements OnDestroy { ngOnDestroy(): void; } +/** @stable */ export declare class NgStyle implements DoCheck { rawStyle: { [key: string]: string; @@ -415,26 +464,31 @@ export declare class NgStyle implements DoCheck { ngDoCheck(): void; } +/** @experimental */ export declare class NgSwitch { ngSwitch: any; } +/** @experimental */ export declare class NgSwitchCase { ngSwitchCase: any; ngSwitchWhen: any; constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); } +/** @experimental */ export declare class NgSwitchDefault { constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, sswitch: NgSwitch); } +/** @experimental */ export declare class NgTemplateOutlet { ngOutletContext: Object; ngTemplateOutlet: TemplateRef; constructor(_viewContainerRef: ViewContainerRef); } +/** @stable */ export declare class PathLocationStrategy extends LocationStrategy { constructor(_platformLocation: PlatformLocation, href?: string); back(): void; @@ -447,6 +501,7 @@ export declare class PathLocationStrategy extends LocationStrategy { replaceState(state: any, title: string, url: string, queryParams: string): void; } +/** @experimental */ export declare class PatternValidator implements Validator { constructor(pattern: string); validate(c: AbstractControl): { @@ -454,10 +509,12 @@ export declare class PatternValidator implements Validator { }; } +/** @experimental */ export declare class PercentPipe implements PipeTransform { transform(value: any, digits?: string): string; } +/** @stable */ export declare abstract class PlatformLocation { hash: string; pathname: string; @@ -471,19 +528,23 @@ export declare abstract class PlatformLocation { abstract replaceState(state: any, title: string, url: string): void; } +/** @experimental */ export declare class RadioButtonState { checked: boolean; value: string; constructor(checked: boolean, value: string); } +/** @deprecated */ export declare class ReplacePipe implements PipeTransform { transform(value: any, pattern: string | RegExp, replacement: Function | string): any; } +/** @experimental */ export declare class RequiredValidator { } +/** @experimental */ export declare class SelectControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -494,14 +555,17 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor writeValue(value: any): void; } +/** @stable */ export declare class SlicePipe implements PipeTransform { transform(value: any, start: number, end?: number): any; } +/** @experimental */ export declare class UpperCasePipe implements PipeTransform { transform(value: string): string; } +/** @stable */ export interface UrlChangeEvent { type: string; } @@ -516,6 +580,7 @@ export interface Validator { }; } +/** @experimental */ export declare class Validators { static compose(validators: ValidatorFn[]): ValidatorFn; static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 64410af2da..59e92af11f 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -1,21 +1,26 @@ +/** @stable */ export declare class AbstractProviderError extends BaseException { context: any; constructor(injector: ReflectiveInjector, key: ReflectiveKey, constructResolvingMessage: Function); addKey(injector: ReflectiveInjector, key: ReflectiveKey): void; } +/** @stable */ export declare abstract class AfterContentChecked { abstract ngAfterContentChecked(): any; } +/** @stable */ export declare abstract class AfterContentInit { abstract ngAfterContentInit(): any; } +/** @stable */ export declare abstract class AfterViewChecked { abstract ngAfterViewChecked(): any; } +/** @stable */ export declare abstract class AfterViewInit { abstract ngAfterViewInit(): any; } @@ -95,14 +100,18 @@ export declare abstract class AnimationWithStepsMetadata extends AnimationMetada constructor(); } +/** @experimental */ export declare const APP_ID: any; +/** @experimental */ export declare const APP_INITIALIZER: any; +/** @stable */ export declare const APPLICATION_COMMON_PROVIDERS: Array; +/** @stable */ export declare abstract class ApplicationRef { componentTypes: Type[]; injector: Injector; @@ -116,12 +125,16 @@ export declare abstract class ApplicationRef { abstract waitForAsyncInitializers(): Promise; } +/** @experimental */ export declare function asNativeElements(debugEls: DebugElement[]): any; +/** @experimental */ export declare function assertPlatform(requiredToken: any): PlatformRef; +/** @stable */ export declare var Attribute: AttributeMetadataFactory; +/** @stable */ export declare class AttributeMetadata extends DependencyMetadata { attributeName: string; token: AttributeMetadata; @@ -136,6 +149,7 @@ export interface AttributeMetadataFactory { export declare const AUTO_STYLE: string; +/** @stable */ export declare class BaseException extends Error { message: string; stack: any; @@ -143,13 +157,15 @@ export declare class BaseException extends Error { toString(): string; } +/** @deprecated */ export declare function bind(token: any): ProviderBuilder; +/** @deprecated */ export declare class Binding extends Provider { - toAlias: any; - toClass: Type; - toFactory: Function; - toValue: any; + /** @deprecated */ toAlias: any; + /** @deprecated */ toClass: Type; + /** @deprecated */ toFactory: Function; + /** @deprecated */ toValue: any; constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: { toClass?: Type; toValue?: any; @@ -160,6 +176,7 @@ export declare class Binding extends Provider { }); } +/** @stable */ export declare enum ChangeDetectionStrategy { CheckOnce = 0, Checked = 1, @@ -169,6 +186,7 @@ export declare enum ChangeDetectionStrategy { Default = 5, } +/** @stable */ export declare abstract class ChangeDetectorRef { abstract checkNoChanges(): void; abstract detach(): void; @@ -177,6 +195,7 @@ export declare abstract class ChangeDetectorRef { abstract reattach(): void; } +/** @stable */ export declare function Class(clsDef: ClassDefinition): ConcreteType; export interface ClassDefinition { @@ -185,6 +204,7 @@ export interface ClassDefinition { [x: string]: Type | Function | any[]; } +/** @stable */ export declare class CollectionChangeRecord { currentIndex: number; item: any; @@ -194,6 +214,7 @@ export declare class CollectionChangeRecord { toString(): string; } +/** @stable */ export declare var Component: ComponentMetadataFactory; export interface ComponentDecorator extends TypeDecorator { @@ -222,6 +243,7 @@ export declare abstract class ComponentFactoryResolver { static NULL: ComponentFactoryResolver; } +/** @stable */ export declare class ComponentMetadata extends DirectiveMetadata { animations: AnimationEntryMetadata[]; changeDetection: ChangeDetectionStrategy; @@ -323,6 +345,7 @@ export interface ComponentMetadataFactory { }): ComponentMetadata; } +/** @stable */ export declare abstract class ComponentRef { changeDetectorRef: ChangeDetectorRef; componentType: Type; @@ -334,19 +357,23 @@ export declare abstract class ComponentRef { abstract onDestroy(callback: Function): void; } +/** @experimental */ export declare abstract class ComponentResolver { abstract clearCache(): void; abstract resolveComponent(component: Type | string): Promise>; } +/** @stable */ export declare var ContentChild: ContentChildMetadataFactory; +/** @stable */ export declare class ContentChildMetadata extends QueryMetadata { constructor(_selector: Type | string, {read}?: { read?: any; }); } +/** @stable */ export interface ContentChildMetadataFactory { (selector: Type | string, {read}?: { read?: any; @@ -356,8 +383,10 @@ export interface ContentChildMetadataFactory { }): ContentChildMetadataFactory; } +/** @stable */ export declare var ContentChildren: ContentChildrenMetadataFactory; +/** @stable */ export declare class ContentChildrenMetadata extends QueryMetadata { constructor(_selector: Type | string, {descendants, read}?: { descendants?: boolean; @@ -365,6 +394,7 @@ export declare class ContentChildrenMetadata extends QueryMetadata { }); } +/** @stable */ export interface ContentChildrenMetadataFactory { (selector: Type | string, {descendants, read}?: { descendants?: boolean; @@ -376,18 +406,24 @@ export interface ContentChildrenMetadataFactory { }): ContentChildrenMetadata; } +/** @experimental */ export declare function coreBootstrap(componentFactory: ComponentFactory, injector: Injector): ComponentRef; +/** @experimental */ export declare function coreLoadAndBootstrap(componentType: Type, injector: Injector): Promise>; +/** @experimental */ export declare function createNgZone(): NgZone; +/** @experimental */ export declare function createPlatform(injector: Injector): PlatformRef; +/** @stable */ export declare class CyclicDependencyError extends AbstractProviderError { constructor(injector: ReflectiveInjector, key: ReflectiveKey); } +/** @experimental */ export declare class DebugElement extends DebugNode { attributes: { [key: string]: string; @@ -415,6 +451,7 @@ export declare class DebugElement extends DebugNode { triggerEventHandler(eventName: string, eventObj: any): void; } +/** @experimental */ export declare class DebugNode { componentInstance: any; context: any; @@ -428,9 +465,10 @@ export declare class DebugNode { }; source: string; constructor(nativeNode: any, parent: DebugNode, _debugInfo: RenderDebugInfo); - inject(token: any): any; + /** @deprecated */ inject(token: any): any; } +/** @stable */ export declare class DefaultIterableDiffer implements IterableDiffer { collection: any; isDirty: boolean; @@ -448,20 +486,22 @@ export declare class DefaultIterableDiffer implements IterableDiffer { toString(): string; } +/** @stable */ export declare var Directive: DirectiveMetadataFactory; export interface DirectiveDecorator extends TypeDecorator { } +/** @stable */ export declare class DirectiveMetadata extends InjectableMetadata { - events: string[]; + /** @deprecated */ events: string[]; exportAs: string; host: { [key: string]: string; }; inputs: string[]; outputs: string[]; - properties: string[]; + /** @deprecated */ properties: string[]; providers: any[]; queries: { [key: string]: any; @@ -515,56 +555,67 @@ export interface DirectiveMetadataFactory { }): DirectiveMetadata; } +/** @experimental */ export declare function disposePlatform(): void; +/** @stable */ export declare abstract class DoCheck { abstract ngDoCheck(): any; } +/** @deprecated */ export declare abstract class DynamicComponentLoader { abstract loadAsRoot(type: Type, overrideSelectorOrNode: string | any, injector: Injector, onDispose?: () => void, projectableNodes?: any[][]): Promise>; abstract loadNextToLocation(type: Type, location: ViewContainerRef, providers?: ResolvedReflectiveProvider[], projectableNodes?: any[][]): Promise>; } export declare class ElementRef { - nativeElement: any; + /** @stable */ nativeElement: any; constructor(nativeElement: any); } +/** @experimental */ export declare abstract class EmbeddedViewRef extends ViewRef { context: C; rootNodes: any[]; abstract destroy(): any; } +/** @stable */ export declare function enableProdMode(): void; +/** @stable */ export declare class EventEmitter extends Subject { __isAsync: boolean; constructor(isAsync?: boolean); emit(value: T): void; - next(value: any): void; + /** @deprecated */ next(value: any): void; subscribe(generatorOrNext?: any, error?: any, complete?: any): any; } +/** @stable */ export declare class ExceptionHandler { constructor(_logger: any, _rethrowException?: boolean); call(exception: any, stackTrace?: any, reason?: string): void; static exceptionToString(exception: any, stackTrace?: any, reason?: string): string; } +/** @stable */ export declare class ExpressionChangedAfterItHasBeenCheckedException extends BaseException { constructor(oldValue: any, currValue: any, context: any); } +/** @experimental */ export declare function forwardRef(forwardRefFn: ForwardRefFn): Type; export interface ForwardRefFn { (): any; } +/** @experimental */ export declare function getDebugNode(nativeNode: any): DebugNode; +/** @experimental */ export declare function getPlatform(): PlatformRef; export interface GetTestability { @@ -574,84 +625,104 @@ export interface GetTestability { export declare function group(steps: AnimationMetadata[]): AnimationGroupMetadata; +/** @stable */ export declare var Host: HostMetadataFactory; +/** @stable */ export declare var HostBinding: HostBindingMetadataFactory; +/** @stable */ export declare class HostBindingMetadata { hostPropertyName: string; constructor(hostPropertyName?: string); } +/** @stable */ export interface HostBindingMetadataFactory { (hostPropertyName?: string): any; new (hostPropertyName?: string): any; } +/** @stable */ export declare var HostListener: HostListenerMetadataFactory; +/** @stable */ export declare class HostListenerMetadata { args: string[]; eventName: string; constructor(eventName: string, args?: string[]); } +/** @stable */ export interface HostListenerMetadataFactory { (eventName: string, args?: string[]): any; new (eventName: string, args?: string[]): any; } +/** @stable */ export declare class HostMetadata { toString(): string; } +/** @stable */ export interface HostMetadataFactory { (): any; new (): HostMetadata; } +/** @stable */ export declare var Inject: InjectMetadataFactory; +/** @stable */ export declare var Injectable: InjectableMetadataFactory; +/** @stable */ export declare class InjectableMetadata { constructor(); } +/** @stable */ export interface InjectableMetadataFactory { (): any; new (): InjectableMetadata; } +/** @stable */ export declare class InjectMetadata { token: any; constructor(token: any); toString(): string; } +/** @stable */ export interface InjectMetadataFactory { (token: any): any; new (token: any): InjectMetadata; } +/** @stable */ export declare abstract class Injector { get(token: any, notFoundValue?: any): any; static THROW_IF_NOT_FOUND: Object; } +/** @stable */ export declare var Input: InputMetadataFactory; +/** @stable */ export declare class InputMetadata { bindingPropertyName: string; constructor( bindingPropertyName?: string); } +/** @stable */ export interface InputMetadataFactory { (bindingPropertyName?: string): any; new (bindingPropertyName?: string): any; } +/** @stable */ export declare class InstantiationError extends WrappedException { causeKey: ReflectiveKey; context: any; @@ -660,12 +731,14 @@ export declare class InstantiationError extends WrappedException { addKey(injector: ReflectiveInjector, key: ReflectiveKey): void; } +/** @stable */ export declare class InvalidProviderError extends BaseException { constructor(provider: any); } export declare function isDevMode(): boolean; +/** @stable */ export interface IterableDiffer { diff(object: any): any; onDestroy(): any; @@ -676,6 +749,7 @@ export interface IterableDifferFactory { supports(objects: any): boolean; } +/** @stable */ export declare class IterableDiffers { factories: IterableDifferFactory[]; constructor(factories: IterableDifferFactory[]); @@ -686,6 +760,7 @@ export declare class IterableDiffers { export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; +/** @stable */ export declare class KeyValueChangeRecord { currentValue: any; key: any; @@ -704,6 +779,7 @@ export interface KeyValueDifferFactory { supports(objects: any): boolean; } +/** @stable */ export declare class KeyValueDiffers { factories: KeyValueDifferFactory[]; constructor(factories: KeyValueDifferFactory[]); @@ -714,6 +790,7 @@ export declare class KeyValueDiffers { export declare function lockRunMode(): void; +/** @experimental */ export declare class NgZone { hasPendingMacrotasks: boolean; hasPendingMicrotasks: boolean; @@ -733,12 +810,14 @@ export declare class NgZone { static isInAngularZone(): boolean; } +/** @deprecated */ export declare class NgZoneError { error: any; stackTrace: any; constructor(error: any, stackTrace: any); } +/** @stable */ export declare class NoAnnotationError extends BaseException { constructor(typeOrFunc: any, params: any[][]); } @@ -748,58 +827,73 @@ export declare class NoComponentFactoryError extends BaseException { constructor(component: Function); } +/** @stable */ export declare class NoProviderError extends AbstractProviderError { constructor(injector: ReflectiveInjector, key: ReflectiveKey); } +/** @stable */ export declare abstract class OnChanges { abstract ngOnChanges(changes: SimpleChanges): any; } +/** @stable */ export declare abstract class OnDestroy { abstract ngOnDestroy(): any; } +/** @stable */ export declare abstract class OnInit { abstract ngOnInit(): any; } +/** @stable */ export declare class OpaqueToken { constructor(_desc: string); toString(): string; } +/** @stable */ export declare var Optional: OptionalMetadataFactory; +/** @stable */ export declare class OptionalMetadata { toString(): string; } +/** @stable */ export interface OptionalMetadataFactory { (): any; new (): OptionalMetadata; } +/** @stable */ export declare class OutOfBoundsError extends BaseException { constructor(index: any); } +/** @stable */ export declare var Output: OutputMetadataFactory; +/** @stable */ export declare class OutputMetadata { bindingPropertyName: string; constructor(bindingPropertyName?: string); } +/** @stable */ export interface OutputMetadataFactory { (bindingPropertyName?: string): any; new (bindingPropertyName?: string): any; } +/** @experimental */ export declare const PACKAGE_ROOT_URL: any; +/** @stable */ export declare var Pipe: PipeMetadataFactory; +/** @stable */ export declare class PipeMetadata extends InjectableMetadata { name: string; pure: boolean; @@ -809,6 +903,7 @@ export declare class PipeMetadata extends InjectableMetadata { }); } +/** @stable */ export interface PipeMetadataFactory { (obj: { name: string; @@ -824,14 +919,19 @@ export interface PipeTransform { transform(value: any, ...args: any[]): any; } +/** @experimental */ export declare const PLATFORM_COMMON_PROVIDERS: Array; +/** @stable */ export declare const PLATFORM_DIRECTIVES: OpaqueToken; +/** @experimental */ export declare const PLATFORM_INITIALIZER: any; +/** @stable */ export declare const PLATFORM_PIPES: OpaqueToken; +/** @stable */ export declare abstract class PlatformRef { disposed: boolean; injector: Injector; @@ -839,6 +939,7 @@ export declare abstract class PlatformRef { abstract registerDisposeListener(dispose: () => void): void; } +/** @deprecated */ export declare function provide(token: any, {useClass, useValue, useExisting, useFactory, deps, multi}: { useClass?: Type; useValue?: any; @@ -848,6 +949,7 @@ export declare function provide(token: any, {useClass, useValue, useExisting, us multi?: boolean; }): Provider; +/** @deprecated */ export declare class Provider { dependencies: Object[]; multi: boolean; @@ -866,6 +968,7 @@ export declare class Provider { }); } +/** @deprecated */ export declare class ProviderBuilder { token: any; constructor(token: any); @@ -875,8 +978,10 @@ export declare class ProviderBuilder { toValue(value: any): Provider; } +/** @deprecated */ export declare var Query: QueryMetadataFactory; +/** @stable */ export declare class QueryList { changes: Observable; dirty: boolean; @@ -895,6 +1000,7 @@ export declare class QueryList { toString(): string; } +/** @deprecated */ export declare class QueryMetadata extends DependencyMetadata { descendants: boolean; first: boolean; @@ -911,6 +1017,7 @@ export declare class QueryMetadata extends DependencyMetadata { toString(): string; } +/** @deprecated */ export interface QueryMetadataFactory { (selector: Type | string, {descendants, read}?: { descendants?: boolean; @@ -931,8 +1038,8 @@ export declare abstract class ReflectiveInjector implements Injector { [k: string]: any; } | any[]>): ReflectiveInjector; resolveAndInstantiate(provider: Type | Provider): any; - static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; - static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; + /** @deprecated */ static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; + /** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; static resolve(providers: Array): ResolvedReflectiveProvider[]; @@ -941,6 +1048,7 @@ export declare abstract class ReflectiveInjector implements Injector { } | any[]>, parent?: Injector): ReflectiveInjector; } +/** @experimental */ export declare class ReflectiveKey { displayName: string; id: number; @@ -950,6 +1058,7 @@ export declare class ReflectiveKey { static get(token: Object): ReflectiveKey; } +/** @experimental */ export declare class RenderComponentType { encapsulation: ViewEncapsulation; id: string; @@ -959,6 +1068,7 @@ export declare class RenderComponentType { constructor(id: string, templateUrl: string, slotCount: number, encapsulation: ViewEncapsulation, styles: Array); } +/** @experimental */ export declare abstract class Renderer { abstract animate(element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[], duration: number, delay: number, easing: string): AnimationPlayer; abstract attachViewAfter(node: any, viewRootNodes: any[]): void; @@ -981,9 +1091,11 @@ export declare abstract class Renderer { abstract setText(renderNode: any, text: string): any; } +/** @deprecated */ export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider { } +/** @experimental */ export declare class ResolvedReflectiveFactory { dependencies: ReflectiveDependency[]; factory: Function; @@ -998,18 +1110,23 @@ export interface ResolvedReflectiveProvider { resolvedFactories: ResolvedReflectiveFactory[]; } +/** @experimental */ export declare function resolveForwardRef(type: any): any; +/** @experimental */ export declare abstract class RootRenderer { abstract renderComponent(componentType: RenderComponentType): Renderer; } +/** @stable */ export declare var Self: SelfMetadataFactory; +/** @stable */ export declare class SelfMetadata { toString(): string; } +/** @stable */ export interface SelfMetadataFactory { (): any; new (): SelfMetadata; @@ -1017,8 +1134,10 @@ export interface SelfMetadataFactory { export declare function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata; +/** @experimental */ export declare function setTestabilityGetter(getter: GetTestability): void; +/** @stable */ export declare class SimpleChange { currentValue: any; previousValue: any; @@ -1026,16 +1145,20 @@ export declare class SimpleChange { isFirstChange(): boolean; } +/** @stable */ export interface SimpleChanges { [propName: string]: SimpleChange; } +/** @stable */ export declare var SkipSelf: SkipSelfMetadataFactory; +/** @stable */ export declare class SkipSelfMetadata { toString(): string; } +/** @stable */ export interface SkipSelfMetadataFactory { (): any; new (): SkipSelfMetadata; @@ -1049,22 +1172,26 @@ export declare function style(tokens: string | { [key: string]: string | number; }>): AnimationStyleMetadata; +/** @experimental */ export declare class SystemJsCmpFactoryResolver implements ComponentResolver { clearCache(): void; resolveComponent(componentType: string | Type): Promise>; } +/** @experimental */ export declare class SystemJsComponentResolver implements ComponentResolver { constructor(_resolver: ComponentResolver); clearCache(): void; resolveComponent(componentType: string | Type): Promise>; } +/** @stable */ export declare abstract class TemplateRef { elementRef: ElementRef; abstract createEmbeddedView(context: C): EmbeddedViewRef; } +/** @experimental */ export declare class Testability { constructor(_ngZone: NgZone); decreasePendingRequestCount(): number; @@ -1076,6 +1203,7 @@ export declare class Testability { whenStable(callback: Function): void; } +/** @experimental */ export declare class TestabilityRegistry { constructor(); findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability; @@ -1102,14 +1230,17 @@ export interface TypeDecorator { Class(obj: ClassDefinition): ConcreteType; } +/** @stable */ export declare var ViewChild: ViewChildMetadataFactory; +/** @stable */ export declare class ViewChildMetadata extends ViewQueryMetadata { constructor(_selector: Type | string, {read}?: { read?: any; }); } +/** @stable */ export interface ViewChildMetadataFactory { (selector: Type | string, {read}?: { read?: any; @@ -1119,14 +1250,17 @@ export interface ViewChildMetadataFactory { }): ViewChildMetadataFactory; } +/** @stable */ export declare var ViewChildren: ViewChildrenMetadataFactory; +/** @stable */ export declare class ViewChildrenMetadata extends ViewQueryMetadata { constructor(_selector: Type | string, {read}?: { read?: any; }); } +/** @stable */ export interface ViewChildrenMetadataFactory { (selector: Type | string, {read}?: { read?: any; @@ -1136,6 +1270,7 @@ export interface ViewChildrenMetadataFactory { }): ViewChildrenMetadata; } +/** @stable */ export declare abstract class ViewContainerRef { element: ElementRef; injector: Injector; @@ -1165,6 +1300,7 @@ export interface ViewDecorator extends TypeDecorator { }): ViewDecorator; } +/** @stable */ export declare enum ViewEncapsulation { Emulated = 0, Native = 1, @@ -1219,8 +1355,10 @@ export interface ViewMetadataFactory { }): ViewMetadata; } +/** @deprecated */ export declare var ViewQuery: QueryMetadataFactory; +/** @deprecated */ export declare class ViewQueryMetadata extends QueryMetadata { isViewQuery: boolean; constructor(_selector: Type | string, {descendants, first, read}?: { @@ -1231,11 +1369,13 @@ export declare class ViewQueryMetadata extends QueryMetadata { toString(): string; } +/** @stable */ export declare abstract class ViewRef { destroyed: boolean; abstract onDestroy(callback: Function): any; } +/** @stable */ export declare class WrappedException extends BaseWrappedException { context: any; message: string; @@ -1247,20 +1387,25 @@ export declare class WrappedException extends BaseWrappedException { toString(): string; } +/** @stable */ export declare class WrappedValue { wrapped: any; constructor(wrapped: any); static wrap(value: any): WrappedValue; } +/** @experimental */ export declare var wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn; +/** @experimental */ export declare var wtfEndTimeRange: (range: any) => void; +/** @experimental */ export declare var wtfLeave: (scope: any, returnValue?: T) => T; export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } +/** @experimental */ export declare var wtfStartTimeRange: (rangeType: string, action: string) => any; diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts index 8ac98fb651..a71c76033f 100644 --- a/tools/public_api_guard/core/testing.d.ts +++ b/tools/public_api_guard/core/testing.d.ts @@ -1,11 +1,14 @@ export declare function addProviders(providers: Array): void; +/** @deprecated */ export declare var afterEach: Function; export declare function async(fn: Function): (done: any) => any; +/** @deprecated */ export declare var beforeEach: any; +/** @deprecated */ export declare function beforeEachProviders(fn: () => Array): void; export declare class ComponentFixture { @@ -29,24 +32,30 @@ export declare var ComponentFixtureAutoDetect: OpaqueToken; export declare var ComponentFixtureNoNgZone: OpaqueToken; +/** @deprecated */ export declare var ddescribe: any; +/** @deprecated */ export declare var describe: Function; export declare function discardPeriodicTasks(): void; +/** @deprecated */ export declare var expect: Function; export declare function fakeAsync(fn: Function): (...args: any[]) => any; +/** @deprecated */ export declare var fdescribe: any; +/** @deprecated */ export declare var fit: any; export declare function flushMicrotasks(): void; export declare function getTestInjector(): TestInjector; +/** @deprecated */ export declare var iit: any; export declare function inject(tokens: any[], fn: Function): () => any; @@ -56,6 +65,7 @@ export declare class InjectSetupWrapper { inject(tokens: any[], fn: Function): () => any; } +/** @deprecated */ export declare var it: any; export declare function resetBaseTestProviders(): void; @@ -68,7 +78,7 @@ export declare class TestComponentBuilder { createAsync(rootComponentType: Type): Promise>; createFakeAsync(rootComponentType: Type): ComponentFixture; protected createFromFactory(ngZone: NgZone, componentFactory: ComponentFactory): ComponentFixture; - createSync(componentFactory: ComponentFactory): ComponentFixture; + /** @deprecated */ createSync(componentFactory: ComponentFactory): ComponentFixture; overrideAnimations(componentType: Type, animations: AnimationEntryMetadata[]): TestComponentBuilder; overrideDirective(componentType: Type, from: Type, to: Type): TestComponentBuilder; overrideProviders(type: Type, providers: any[]): TestComponentBuilder; @@ -95,6 +105,8 @@ export declare function tick(millis?: number): void; export declare function withProviders(providers: () => any): InjectSetupWrapper; +/** @deprecated */ export declare var xdescribe: Function; +/** @deprecated */ export declare var xit: any; diff --git a/tools/public_api_guard/forms/index.d.ts b/tools/public_api_guard/forms/index.d.ts index 663b5f6344..23a6e566db 100644 --- a/tools/public_api_guard/forms/index.d.ts +++ b/tools/public_api_guard/forms/index.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare abstract class AbstractControl { asyncValidator: AsyncValidatorFn; dirty: boolean; @@ -42,6 +43,7 @@ export declare abstract class AbstractControl { }): void; } +/** @experimental */ export declare abstract class AbstractControlDirective { control: AbstractControl; dirty: boolean; @@ -62,6 +64,7 @@ export interface AsyncValidatorFn { (c: AbstractControl): any; } +/** @experimental */ export declare class CheckboxControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -71,18 +74,21 @@ export declare class CheckboxControlValueAccessor implements ControlValueAccesso writeValue(value: any): void; } +/** @experimental */ export declare class ControlContainer extends AbstractControlDirective { formDirective: Form; name: string; path: string[]; } +/** @experimental */ export interface ControlValueAccessor { registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(obj: any): void; } +/** @experimental */ export declare class DefaultValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -94,6 +100,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor { export declare function disableDeprecatedForms(): any[]; +/** @experimental */ export interface Form { addControl(dir: NgControl): void; addFormGroup(dir: AbstractFormGroupDirective): void; @@ -104,10 +111,12 @@ export interface Form { updateModel(dir: NgControl, value: any): void; } +/** @experimental */ export declare const FORM_DIRECTIVES: Type[]; export declare const FORM_PROVIDERS: Type[]; +/** @experimental */ export declare class FormArray extends AbstractControl { controls: AbstractControl[]; length: number; @@ -118,6 +127,7 @@ export declare class FormArray extends AbstractControl { removeAt(index: number): void; } +/** @experimental */ export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormArray; @@ -130,6 +140,7 @@ export declare class FormArrayName extends ControlContainer implements OnInit, O ngOnInit(): void; } +/** @experimental */ export declare class FormBuilder { array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray; control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl; @@ -140,6 +151,7 @@ export declare class FormBuilder { }): FormGroup; } +/** @experimental */ export declare class FormControl extends AbstractControl { constructor(value?: any, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]); registerOnChange(fn: Function): void; @@ -150,6 +162,7 @@ export declare class FormControl extends AbstractControl { }): void; } +/** @experimental */ export declare class FormControlDirective extends NgControl implements OnChanges { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -164,6 +177,7 @@ export declare class FormControlDirective extends NgControl implements OnChanges viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class FormControlName extends NgControl implements OnChanges, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -179,6 +193,7 @@ export declare class FormControlName extends NgControl implements OnChanges, OnD viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class FormGroup extends AbstractControl { controls: { [key: string]: AbstractControl; @@ -196,6 +211,7 @@ export declare class FormGroup extends AbstractControl { removeControl(name: string): void; } +/** @experimental */ export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges { control: FormGroup; directives: NgControl[]; @@ -219,11 +235,13 @@ export declare class FormGroupDirective extends ControlContainer implements Form updateModel(dir: NgControl, value: any): void; } +/** @experimental */ export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { name: string; constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); } +/** @experimental */ export declare class MaxLengthValidator implements Validator { constructor(maxLength: string); validate(c: AbstractControl): { @@ -231,6 +249,7 @@ export declare class MaxLengthValidator implements Validator { }; } +/** @experimental */ export declare class MinLengthValidator implements Validator { constructor(minLength: string); validate(c: AbstractControl): { @@ -238,12 +257,16 @@ export declare class MinLengthValidator implements Validator { }; } +/** @experimental */ export declare const NG_ASYNC_VALIDATORS: OpaqueToken; +/** @experimental */ export declare const NG_VALIDATORS: OpaqueToken; +/** @experimental */ export declare const NG_VALUE_ACCESSOR: OpaqueToken; +/** @experimental */ export declare abstract class NgControl extends AbstractControlDirective { asyncValidator: AsyncValidatorFn; name: string; @@ -252,6 +275,7 @@ export declare abstract class NgControl extends AbstractControlDirective { abstract viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgControlStatus { ngClassDirty: boolean; ngClassInvalid: boolean; @@ -262,6 +286,7 @@ export declare class NgControlStatus { constructor(cd: NgControl); } +/** @experimental */ export declare class NgForm extends ControlContainer implements Form { control: FormGroup; controls: { @@ -283,6 +308,7 @@ export declare class NgForm extends ControlContainer implements Form { updateModel(dir: NgControl, value: any): void; } +/** @experimental */ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -303,11 +329,13 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { viewToModelUpdate(newValue: any): void; } +/** @experimental */ export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { name: string; constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); } +/** @experimental */ export declare class NgSelectOption implements OnDestroy { id: string; ngValue: any; @@ -316,6 +344,7 @@ export declare class NgSelectOption implements OnDestroy { ngOnDestroy(): void; } +/** @experimental */ export declare class PatternValidator implements Validator { constructor(pattern: string); validate(c: AbstractControl): { @@ -327,9 +356,11 @@ export declare function provideForms(): any[]; export declare const REACTIVE_FORM_DIRECTIVES: Type[]; +/** @experimental */ export declare class RequiredValidator { } +/** @experimental */ export declare class SelectControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -352,6 +383,7 @@ export interface ValidatorFn { }; } +/** @experimental */ export declare class Validators { static compose(validators: ValidatorFn[]): ValidatorFn; static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; diff --git a/tools/public_api_guard/http/index.d.ts b/tools/public_api_guard/http/index.d.ts index 3eb2c1e58f..b396a9839e 100644 --- a/tools/public_api_guard/http/index.d.ts +++ b/tools/public_api_guard/http/index.d.ts @@ -59,12 +59,14 @@ export declare class Http { request(url: string | Request, options?: RequestOptionsArgs): Observable; } +/** @deprecated */ export declare const HTTP_BINDINGS: any[]; export declare const HTTP_PROVIDERS: any[]; export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http; +/** @deprecated */ export declare const JSON_BINDINGS: any[]; export declare class Jsonp extends Http { diff --git a/tools/public_api_guard/platform-browser-dynamic/index.d.ts b/tools/public_api_guard/platform-browser-dynamic/index.d.ts index ab3ec26b67..a388730066 100644 --- a/tools/public_api_guard/platform-browser-dynamic/index.d.ts +++ b/tools/public_api_guard/platform-browser-dynamic/index.d.ts @@ -1,7 +1,9 @@ export declare function bootstrap(appComponentType: Type, customProviders?: Array): Promise>; +/** @experimental */ export declare function bootstrapWorkerApp(appComponentType: Type, customProviders?: Array): Promise>; +/** @experimental */ export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array): Promise; export declare const BROWSER_APP_COMPILER_PROVIDERS: Array; diff --git a/tools/public_api_guard/platform-browser/index.d.ts b/tools/public_api_guard/platform-browser/index.d.ts index 9b2d23b54c..a9e05b81f1 100644 --- a/tools/public_api_guard/platform-browser/index.d.ts +++ b/tools/public_api_guard/platform-browser/index.d.ts @@ -28,10 +28,12 @@ export declare class By { static directive(type: Type): Predicate; } +/** @experimental */ export declare abstract class ClientMessageBroker { abstract runOnService(args: UiArguments, returnType: Type): Promise; } +/** @experimental */ export declare abstract class ClientMessageBrokerFactory { abstract createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker; } @@ -68,6 +70,7 @@ export declare class EventManager { getZone(): NgZone; } +/** @experimental */ export declare class FnArg { type: Type; value: any; @@ -95,6 +98,7 @@ export declare class KeyEventsPlugin extends EventManagerPlugin { }; } +/** @experimental */ export declare abstract class MessageBus implements MessageBusSource, MessageBusSink { abstract attachToZone(zone: NgZone): void; abstract from(channel: string): EventEmitter; @@ -102,20 +106,24 @@ export declare abstract class MessageBus implements MessageBusSource, MessageBus abstract to(channel: string): EventEmitter; } +/** @experimental */ export interface MessageBusSink { attachToZone(zone: NgZone): void; initChannel(channel: string, runInZone: boolean): void; to(channel: string): EventEmitter; } +/** @experimental */ export interface MessageBusSource { attachToZone(zone: NgZone): void; from(channel: string): EventEmitter; initChannel(channel: string, runInZone: boolean): void; } +/** @experimental */ export declare const PRIMITIVE: Type; +/** @experimental */ export declare class ReceivedMessage { args: any[]; id: string; @@ -143,6 +151,7 @@ export interface SafeUrl extends SafeValue { export declare var SecurityContext: typeof t.SecurityContext; +/** @experimental */ export declare abstract class ServiceMessageBroker { abstract registerMethod(methodName: string, signature: Type[], method: Function, returnType?: Type): void; } @@ -151,24 +160,29 @@ export declare abstract class ServiceMessageBrokerFactory { abstract createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker; } +/** @experimental */ export declare class Title { getTitle(): string; setTitle(newTitle: string): void; } +/** @experimental */ export declare class UiArguments { args: FnArg[]; method: string; constructor(method: string, args?: FnArg[]); } +/** @experimental */ export declare class WebWorkerInstance { bus: MessageBus; worker: Worker; } +/** @experimental */ export declare const WORKER_APP_APPLICATION_PROVIDERS: Array; +/** @experimental */ export declare const WORKER_APP_LOCATION_PROVIDERS: ({ provide: typeof PlatformLocation; useClass: typeof WebWorkerPlatformLocation; @@ -179,12 +193,16 @@ export declare const WORKER_APP_LOCATION_PROVIDERS: ({ deps: (typeof PlatformLocation | typeof NgZone)[]; })[]; +/** @experimental */ export declare const WORKER_APP_PLATFORM_PROVIDERS: Array; +/** @experimental */ export declare const WORKER_SCRIPT: OpaqueToken; +/** @experimental */ export declare const WORKER_UI_APPLICATION_PROVIDERS: Array; +/** @experimental */ export declare const WORKER_UI_LOCATION_PROVIDERS: (typeof MessageBasedPlatformLocation | typeof BrowserPlatformLocation | { provide: any; useFactory: (injector: Injector) => () => void; @@ -192,10 +210,14 @@ export declare const WORKER_UI_LOCATION_PROVIDERS: (typeof MessageBasedPlatformL deps: typeof Injector[]; })[]; +/** @experimental */ export declare const WORKER_UI_PLATFORM_PROVIDERS: Array; +/** @experimental */ export declare const WORKER_UI_STARTABLE_MESSAGING_SERVICE: OpaqueToken; +/** @experimental */ export declare function workerAppPlatform(): PlatformRef; +/** @experimental */ export declare function workerUiPlatform(): PlatformRef; diff --git a/tools/public_api_guard/platform-server/index.d.ts b/tools/public_api_guard/platform-server/index.d.ts index cb19fbe693..2d25e646e6 100644 --- a/tools/public_api_guard/platform-server/index.d.ts +++ b/tools/public_api_guard/platform-server/index.d.ts @@ -1,5 +1,8 @@ +/** @experimental */ export declare const SERVER_PLATFORM_PROVIDERS: Array; +/** @experimental */ export declare function serverBootstrap(appComponentType: Type, providers: Array): Promise>; +/** @experimental */ export declare function serverPlatform(): PlatformRef;