fix: public api surface fixes + stability markers
- ts-api-guardian will now error if a new public symbol is added with a stability marker (`@stable`, `@experimental`, `@deprecated`) - DomEventsPlugin and KeyEventsPlugin were removed from public api surface - these classes is an implementation detail - deprecated BROWSER_PROVIDERS was removed completely - `@angular/compiler` was removed from the ts-api-guardian check since this package shouldn't contain anything that users need to directly import - the rest of the api surface was conservatively marked as stable or experimental BREAKING CHANGES: DomEventsPlugin and KeyEventsPlugin previously exported from core are no longer public - these classes are implementation detail. Previously deprecated BROWSER_PROVIDERS was completely removed from platform-browser. Closes #9236 Closes #9235 Ref #9234
This commit is contained in:
4
tools/public_api_guard/common/index.d.ts
vendored
4
tools/public_api_guard/common/index.d.ts
vendored
@ -565,15 +565,17 @@ export declare class UpperCasePipe implements PipeTransform {
|
||||
transform(value: string): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
/** @experimental */
|
||||
export interface UrlChangeEvent {
|
||||
type: string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface UrlChangeListener {
|
||||
(e: UrlChangeEvent): any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface Validator {
|
||||
validate(c: AbstractControl): {
|
||||
[key: string]: any;
|
||||
|
1
tools/public_api_guard/common/testing.d.ts
vendored
1
tools/public_api_guard/common/testing.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare class SpyLocation implements Location {
|
||||
urlChanges: string[];
|
||||
back(): void;
|
||||
|
54
tools/public_api_guard/core/index.d.ts
vendored
54
tools/public_api_guard/core/index.d.ts
vendored
@ -25,33 +25,40 @@ export declare abstract class AfterViewInit {
|
||||
abstract ngAfterViewInit(): any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function animate(timing: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata): AnimationAnimateMetadata;
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationAnimateMetadata extends AnimationMetadata {
|
||||
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata;
|
||||
timings: string | number;
|
||||
constructor(timings: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationEntryMetadata {
|
||||
definitions: AnimationStateMetadata[];
|
||||
name: string;
|
||||
constructor(name: string, definitions: AnimationStateMetadata[]);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationGroupMetadata extends AnimationWithStepsMetadata {
|
||||
steps: AnimationMetadata[];
|
||||
constructor(_steps: AnimationMetadata[]);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
||||
steps: AnimationStyleMetadata[];
|
||||
constructor(steps: AnimationStyleMetadata[]);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class AnimationMetadata {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class AnimationPlayer {
|
||||
parentPlayer: AnimationPlayer;
|
||||
abstract destroy(): void;
|
||||
@ -65,26 +72,31 @@ export declare abstract class AnimationPlayer {
|
||||
abstract setPosition(p: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationSequenceMetadata extends AnimationWithStepsMetadata {
|
||||
steps: AnimationMetadata[];
|
||||
constructor(_steps: AnimationMetadata[]);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationStateDeclarationMetadata extends AnimationStateMetadata {
|
||||
stateNameExpr: string;
|
||||
styles: AnimationStyleMetadata;
|
||||
constructor(stateNameExpr: string, styles: AnimationStyleMetadata);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class AnimationStateMetadata {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationStateTransitionMetadata extends AnimationStateMetadata {
|
||||
stateChangeExpr: string;
|
||||
steps: AnimationMetadata;
|
||||
constructor(stateChangeExpr: string, steps: AnimationMetadata);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class AnimationStyleMetadata extends AnimationMetadata {
|
||||
offset: number;
|
||||
styles: Array<string | {
|
||||
@ -95,6 +107,7 @@ export declare class AnimationStyleMetadata extends AnimationMetadata {
|
||||
}>, offset?: number);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class AnimationWithStepsMetadata extends AnimationMetadata {
|
||||
steps: AnimationMetadata[];
|
||||
constructor();
|
||||
@ -111,7 +124,7 @@ export declare const APPLICATION_COMMON_PROVIDERS: Array<Type | {
|
||||
[k: string]: any;
|
||||
} | any[]>;
|
||||
|
||||
/** @stable */
|
||||
/** @experimental */
|
||||
export declare abstract class ApplicationRef {
|
||||
componentTypes: Type[];
|
||||
injector: Injector;
|
||||
@ -142,11 +155,13 @@ export declare class AttributeMetadata extends DependencyMetadata {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface AttributeMetadataFactory {
|
||||
(name: string): TypeDecorator;
|
||||
new (name: string): AttributeMetadata;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const AUTO_STYLE: string;
|
||||
|
||||
/** @stable */
|
||||
@ -194,6 +209,7 @@ export declare abstract class ChangeDetectorRef {
|
||||
/** @stable */
|
||||
export declare function Class(clsDef: ClassDefinition): ConcreteType;
|
||||
|
||||
/** @stable */
|
||||
export interface ClassDefinition {
|
||||
constructor: Function | any[];
|
||||
extends?: Type;
|
||||
@ -213,6 +229,7 @@ export declare class CollectionChangeRecord {
|
||||
/** @stable */
|
||||
export declare var Component: ComponentMetadataFactory;
|
||||
|
||||
/** @stable */
|
||||
export interface ComponentDecorator extends TypeDecorator {
|
||||
View(obj: {
|
||||
templateUrl?: string;
|
||||
@ -227,6 +244,7 @@ export interface ComponentDecorator extends TypeDecorator {
|
||||
}): ViewDecorator;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class ComponentFactory<C> {
|
||||
componentType: Type;
|
||||
selector: string;
|
||||
@ -234,6 +252,7 @@ export declare class ComponentFactory<C> {
|
||||
create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any): ComponentRef<C>;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class ComponentFactoryResolver {
|
||||
abstract resolveComponentFactory<T>(component: ClassWithConstructor<T>): ComponentFactory<T>;
|
||||
static NULL: ComponentFactoryResolver;
|
||||
@ -282,6 +301,7 @@ export declare class ComponentMetadata extends DirectiveMetadata {
|
||||
});
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface ComponentMetadataFactory {
|
||||
(obj: {
|
||||
selector?: string;
|
||||
@ -485,6 +505,7 @@ export declare class DefaultIterableDiffer implements IterableDiffer {
|
||||
/** @stable */
|
||||
export declare var Directive: DirectiveMetadataFactory;
|
||||
|
||||
/** @stable */
|
||||
export interface DirectiveDecorator extends TypeDecorator {
|
||||
}
|
||||
|
||||
@ -518,6 +539,7 @@ export declare class DirectiveMetadata extends InjectableMetadata {
|
||||
});
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface DirectiveMetadataFactory {
|
||||
(obj: {
|
||||
selector?: string;
|
||||
@ -565,6 +587,7 @@ export declare abstract class DynamicComponentLoader {
|
||||
abstract loadNextToLocation(type: Type, location: ViewContainerRef, providers?: ResolvedReflectiveProvider[], projectableNodes?: any[][]): Promise<ComponentRef<any>>;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class ElementRef {
|
||||
/** @stable */ nativeElement: any;
|
||||
constructor(nativeElement: any);
|
||||
@ -577,7 +600,7 @@ export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||
abstract destroy(): any;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
/** @experimental */
|
||||
export declare function enableProdMode(): void;
|
||||
|
||||
/** @stable */
|
||||
@ -604,6 +627,7 @@ export declare class ExpressionChangedAfterItHasBeenCheckedException extends Bas
|
||||
/** @experimental */
|
||||
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type;
|
||||
|
||||
/** @experimental */
|
||||
export interface ForwardRefFn {
|
||||
(): any;
|
||||
}
|
||||
@ -614,11 +638,13 @@ export declare function getDebugNode(nativeNode: any): DebugNode;
|
||||
/** @experimental */
|
||||
export declare function getPlatform(): PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export interface GetTestability {
|
||||
addToWindow(registry: TestabilityRegistry): void;
|
||||
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function group(steps: AnimationMetadata[]): AnimationGroupMetadata;
|
||||
|
||||
/** @stable */
|
||||
@ -732,6 +758,7 @@ export declare class InvalidProviderError extends BaseException {
|
||||
constructor(provider: any);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function isDevMode(): boolean;
|
||||
|
||||
/** @stable */
|
||||
@ -740,6 +767,7 @@ export interface IterableDiffer {
|
||||
onDestroy(): any;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface IterableDifferFactory {
|
||||
create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): IterableDiffer;
|
||||
supports(objects: any): boolean;
|
||||
@ -754,6 +782,7 @@ export declare class IterableDiffers {
|
||||
static extend(factories: IterableDifferFactory[]): Provider;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata;
|
||||
|
||||
/** @stable */
|
||||
@ -765,11 +794,13 @@ export declare class KeyValueChangeRecord {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface KeyValueDiffer {
|
||||
diff(object: any): any;
|
||||
onDestroy(): any;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface KeyValueDifferFactory {
|
||||
create(cdRef: ChangeDetectorRef): KeyValueDiffer;
|
||||
supports(objects: any): boolean;
|
||||
@ -784,6 +815,7 @@ export declare class KeyValueDiffers {
|
||||
static extend(factories: KeyValueDifferFactory[]): Provider;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function lockRunMode(): void;
|
||||
|
||||
/** @experimental */
|
||||
@ -818,6 +850,7 @@ export declare class NoAnnotationError extends BaseException {
|
||||
constructor(typeOrFunc: any, params: any[][]);
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class NoComponentFactoryError extends BaseException {
|
||||
component: Function;
|
||||
constructor(component: Function);
|
||||
@ -911,6 +944,7 @@ export interface PipeMetadataFactory {
|
||||
}): any;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface PipeTransform {
|
||||
transform(value: any, ...args: any[]): any;
|
||||
}
|
||||
@ -927,7 +961,7 @@ export declare const PLATFORM_INITIALIZER: any;
|
||||
/** @stable */
|
||||
export declare const PLATFORM_PIPES: OpaqueToken;
|
||||
|
||||
/** @stable */
|
||||
/** @experimental */
|
||||
export declare abstract class PlatformRef {
|
||||
disposed: boolean;
|
||||
injector: Injector;
|
||||
@ -1025,6 +1059,7 @@ export interface QueryMetadataFactory {
|
||||
}): QueryMetadata;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class ReflectiveInjector implements Injector {
|
||||
parent: Injector;
|
||||
createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
||||
@ -1100,6 +1135,7 @@ export declare class ResolvedReflectiveFactory {
|
||||
dependencies: ReflectiveDependency[]);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface ResolvedReflectiveProvider {
|
||||
key: ReflectiveKey;
|
||||
multiProvider: boolean;
|
||||
@ -1128,6 +1164,7 @@ export interface SelfMetadataFactory {
|
||||
new (): SelfMetadata;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata;
|
||||
|
||||
/** @experimental */
|
||||
@ -1160,8 +1197,10 @@ export interface SkipSelfMetadataFactory {
|
||||
new (): SkipSelfMetadata;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function state(stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata;
|
||||
|
||||
/** @experimental */
|
||||
export declare function style(tokens: string | {
|
||||
[key: string]: string | number;
|
||||
} | Array<string | {
|
||||
@ -1209,16 +1248,21 @@ export declare class TestabilityRegistry {
|
||||
registerApplication(token: any, testability: Testability): void;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface TrackByFn {
|
||||
(index: number, item: any): any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]): AnimationStateTransitionMetadata;
|
||||
|
||||
/** @experimental */
|
||||
export declare function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata;
|
||||
|
||||
/** @stable */
|
||||
export declare var Type: FunctionConstructor;
|
||||
|
||||
/** @stable */
|
||||
export interface TypeDecorator {
|
||||
annotations: any[];
|
||||
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
||||
@ -1282,6 +1326,7 @@ export declare abstract class ViewContainerRef {
|
||||
abstract remove(index?: number): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface ViewDecorator extends TypeDecorator {
|
||||
View(obj: {
|
||||
templateUrl?: string;
|
||||
@ -1303,6 +1348,7 @@ export declare enum ViewEncapsulation {
|
||||
None = 2,
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ViewMetadata {
|
||||
animations: AnimationEntryMetadata[];
|
||||
directives: Array<Type | any[]>;
|
||||
@ -1326,6 +1372,7 @@ export declare class ViewMetadata {
|
||||
});
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface ViewMetadataFactory {
|
||||
(obj: {
|
||||
templateUrl?: string;
|
||||
@ -1399,6 +1446,7 @@ export declare var wtfEndTimeRange: (range: any) => void;
|
||||
/** @experimental */
|
||||
export declare var wtfLeave: <T>(scope: any, returnValue?: T) => T;
|
||||
|
||||
/** @experimental */
|
||||
export interface WtfScopeFn {
|
||||
(arg0?: any, arg1?: any): any;
|
||||
}
|
||||
|
18
tools/public_api_guard/core/testing.d.ts
vendored
18
tools/public_api_guard/core/testing.d.ts
vendored
@ -1,8 +1,10 @@
|
||||
/** @stable */
|
||||
export declare function addProviders(providers: Array<any>): void;
|
||||
|
||||
/** @deprecated */
|
||||
export declare var afterEach: Function;
|
||||
|
||||
/** @stable */
|
||||
export declare function async(fn: Function): (done: any) => any;
|
||||
|
||||
/** @deprecated */
|
||||
@ -11,6 +13,7 @@ export declare var beforeEach: any;
|
||||
/** @deprecated */
|
||||
export declare function beforeEachProviders(fn: () => Array<any>): void;
|
||||
|
||||
/** @stable */
|
||||
export declare class ComponentFixture<T> {
|
||||
changeDetectorRef: ChangeDetectorRef;
|
||||
componentInstance: any;
|
||||
@ -28,8 +31,10 @@ export declare class ComponentFixture<T> {
|
||||
whenStable(): Promise<any>;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare var ComponentFixtureAutoDetect: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
export declare var ComponentFixtureNoNgZone: OpaqueToken;
|
||||
|
||||
/** @deprecated */
|
||||
@ -38,11 +43,13 @@ export declare var ddescribe: any;
|
||||
/** @deprecated */
|
||||
export declare var describe: Function;
|
||||
|
||||
/** @experimental */
|
||||
export declare function discardPeriodicTasks(): void;
|
||||
|
||||
/** @deprecated */
|
||||
export declare var expect: Function;
|
||||
|
||||
/** @experimental */
|
||||
export declare function fakeAsync(fn: Function): (...args: any[]) => any;
|
||||
|
||||
/** @deprecated */
|
||||
@ -51,15 +58,19 @@ export declare var fdescribe: any;
|
||||
/** @deprecated */
|
||||
export declare var fit: any;
|
||||
|
||||
/** @experimental */
|
||||
export declare function flushMicrotasks(): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function getTestInjector(): TestInjector;
|
||||
|
||||
/** @deprecated */
|
||||
export declare var iit: any;
|
||||
|
||||
/** @stable */
|
||||
export declare function inject(tokens: any[], fn: Function): () => any;
|
||||
|
||||
/** @experimental */
|
||||
export declare class InjectSetupWrapper {
|
||||
constructor(_providers: () => any);
|
||||
inject(tokens: any[], fn: Function): () => any;
|
||||
@ -68,10 +79,13 @@ export declare class InjectSetupWrapper {
|
||||
/** @deprecated */
|
||||
export declare var it: any;
|
||||
|
||||
/** @experimental */
|
||||
export declare function resetBaseTestProviders(): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function setBaseTestProviders(platformProviders: Array<Type | Provider | any[]>, applicationProviders: Array<Type | Provider | any[]>): void;
|
||||
|
||||
/** @stable */
|
||||
export declare class TestComponentBuilder {
|
||||
protected _injector: Injector;
|
||||
constructor(_injector: Injector);
|
||||
@ -87,10 +101,12 @@ export declare class TestComponentBuilder {
|
||||
overrideViewProviders(type: Type, providers: any[]): TestComponentBuilder;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class TestComponentRenderer {
|
||||
insertRootElement(rootElementId: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class TestInjector {
|
||||
applicationProviders: Array<Type | Provider | any[] | any>;
|
||||
platformProviders: Array<Type | Provider | any[] | any>;
|
||||
@ -101,8 +117,10 @@ export declare class TestInjector {
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function tick(millis?: number): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function withProviders(providers: () => any): InjectSetupWrapper;
|
||||
|
||||
/** @deprecated */
|
||||
|
7
tools/public_api_guard/forms/index.d.ts
vendored
7
tools/public_api_guard/forms/index.d.ts
vendored
@ -60,6 +60,7 @@ export declare abstract class AbstractControlDirective {
|
||||
valueChanges: Observable<any>;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface AsyncValidatorFn {
|
||||
(c: AbstractControl): any;
|
||||
}
|
||||
@ -98,6 +99,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor {
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function disableDeprecatedForms(): any[];
|
||||
|
||||
/** @experimental */
|
||||
@ -114,6 +116,7 @@ export interface Form {
|
||||
/** @experimental */
|
||||
export declare const FORM_DIRECTIVES: Type[];
|
||||
|
||||
/** @experimental */
|
||||
export declare const FORM_PROVIDERS: Type[];
|
||||
|
||||
/** @experimental */
|
||||
@ -352,8 +355,10 @@ export declare class PatternValidator implements Validator {
|
||||
};
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function provideForms(): any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare const REACTIVE_FORM_DIRECTIVES: Type[];
|
||||
|
||||
/** @experimental */
|
||||
@ -371,12 +376,14 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface Validator {
|
||||
validate(c: AbstractControl): {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface ValidatorFn {
|
||||
(c: AbstractControl): {
|
||||
[key: string]: any;
|
||||
|
27
tools/public_api_guard/http/index.d.ts
vendored
27
tools/public_api_guard/http/index.d.ts
vendored
@ -1,31 +1,38 @@
|
||||
/** @experimental */
|
||||
export declare class BaseRequestOptions extends RequestOptions {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class BaseResponseOptions extends ResponseOptions {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class BrowserXhr {
|
||||
constructor();
|
||||
build(): any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
response: any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class ConnectionBackend {
|
||||
abstract createConnection(request: any): Connection;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class CookieXSRFStrategy implements XSRFStrategy {
|
||||
constructor(_cookieName?: string, _headerName?: string);
|
||||
configureRequest(req: Request): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class Headers {
|
||||
constructor(headers?: Headers | {
|
||||
[key: string]: any;
|
||||
@ -46,6 +53,7 @@ export declare class Headers {
|
||||
static fromResponseHeaderString(headersString: string): Headers;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class Http {
|
||||
protected _backend: ConnectionBackend;
|
||||
protected _defaultOptions: RequestOptions;
|
||||
@ -62,23 +70,29 @@ export declare class Http {
|
||||
/** @deprecated */
|
||||
export declare const HTTP_BINDINGS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare const HTTP_PROVIDERS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http;
|
||||
|
||||
/** @deprecated */
|
||||
export declare const JSON_BINDINGS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare class Jsonp extends Http {
|
||||
constructor(backend: ConnectionBackend, defaultOptions: RequestOptions);
|
||||
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const JSONP_PROVIDERS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class JSONPBackend extends ConnectionBackend {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class JSONPConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
@ -86,6 +100,7 @@ export declare abstract class JSONPConnection implements Connection {
|
||||
abstract finished(data?: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum ReadyState {
|
||||
Unsent = 0,
|
||||
Open = 1,
|
||||
@ -95,6 +110,7 @@ export declare enum ReadyState {
|
||||
Cancelled = 5,
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class Request {
|
||||
headers: Headers;
|
||||
method: RequestMethod;
|
||||
@ -109,6 +125,7 @@ export declare class Request {
|
||||
text(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum RequestMethod {
|
||||
Get = 0,
|
||||
Post = 1,
|
||||
@ -119,6 +136,7 @@ export declare enum RequestMethod {
|
||||
Patch = 6,
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RequestOptions {
|
||||
body: any;
|
||||
headers: Headers;
|
||||
@ -130,6 +148,7 @@ export declare class RequestOptions {
|
||||
merge(options?: RequestOptionsArgs): RequestOptions;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface RequestOptionsArgs {
|
||||
body?: any;
|
||||
headers?: Headers;
|
||||
@ -139,6 +158,7 @@ export interface RequestOptionsArgs {
|
||||
withCredentials?: boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class Response {
|
||||
bytesLoaded: number;
|
||||
headers: Headers;
|
||||
@ -156,6 +176,7 @@ export declare class Response {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ResponseOptions {
|
||||
body: string | Object;
|
||||
headers: Headers;
|
||||
@ -165,6 +186,7 @@ export declare class ResponseOptions {
|
||||
merge(options?: ResponseOptionsArgs): ResponseOptions;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type ResponseOptionsArgs = {
|
||||
body?: string | Object | FormData;
|
||||
status?: number;
|
||||
@ -174,6 +196,7 @@ export declare type ResponseOptionsArgs = {
|
||||
url?: string;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare enum ResponseType {
|
||||
Basic = 0,
|
||||
Cors = 1,
|
||||
@ -182,6 +205,7 @@ export declare enum ResponseType {
|
||||
Opaque = 4,
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class URLSearchParams {
|
||||
paramsMap: Map<string, string[]>;
|
||||
rawParams: string;
|
||||
@ -199,11 +223,13 @@ export declare class URLSearchParams {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class XHRBackend implements ConnectionBackend {
|
||||
constructor(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions, _xsrfStrategy: XSRFStrategy);
|
||||
createConnection(request: Request): XHRConnection;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class XHRConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
@ -212,6 +238,7 @@ export declare class XHRConnection implements Connection {
|
||||
setDetectedContentType(req: any, _xhr: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class XSRFStrategy {
|
||||
abstract configureRequest(req: Request): void;
|
||||
}
|
||||
|
2
tools/public_api_guard/http/testing.d.ts
vendored
2
tools/public_api_guard/http/testing.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare class MockBackend implements ConnectionBackend {
|
||||
connections: any;
|
||||
connectionsArray: MockConnection[];
|
||||
@ -8,6 +9,7 @@ export declare class MockBackend implements ConnectionBackend {
|
||||
verifyNoPendingRequests(): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class MockConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
|
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
|
||||
|
||||
/** @experimental */
|
||||
@ -6,6 +7,8 @@ export declare function bootstrapWorkerApp(appComponentType: Type, customProvide
|
||||
/** @experimental */
|
||||
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array<any>): Promise<ApplicationRef>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const BROWSER_APP_COMPILER_PROVIDERS: Array<any>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const CACHED_TEMPLATE_PROVIDER: Array<any>;
|
||||
|
@ -1,3 +1,5 @@
|
||||
/** @stable */
|
||||
export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any>;
|
||||
|
||||
/** @stable */
|
||||
export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any>;
|
||||
|
@ -1,13 +1,16 @@
|
||||
/** @experimental */
|
||||
export declare const BROWSER_APP_PROVIDERS: Array<any>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const BROWSER_PLATFORM_PROVIDERS: Array<any>;
|
||||
|
||||
export declare const BROWSER_PROVIDERS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare const BROWSER_SANITIZATION_PROVIDERS: Array<any>;
|
||||
|
||||
/** @experimental */
|
||||
export declare function browserPlatform(): PlatformRef;
|
||||
|
||||
/** @stable */
|
||||
export declare class BrowserPlatformLocation extends PlatformLocation {
|
||||
hash: string;
|
||||
pathname: string;
|
||||
@ -22,6 +25,7 @@ export declare class BrowserPlatformLocation extends PlatformLocation {
|
||||
replaceState(state: any, title: string, url: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class By {
|
||||
static all(): Predicate<DebugElement>;
|
||||
static css(selector: string): Predicate<DebugElement>;
|
||||
@ -38,16 +42,13 @@ export declare abstract class ClientMessageBrokerFactory {
|
||||
abstract createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function disableDebugTools(): void;
|
||||
|
||||
/** @stable */
|
||||
export declare const DOCUMENT: OpaqueToken;
|
||||
|
||||
export declare class DomEventsPlugin extends EventManagerPlugin {
|
||||
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
||||
addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
|
||||
supports(eventName: string): boolean;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class DomSanitizationService implements SanitizationService {
|
||||
abstract bypassSecurityTrustHtml(value: string): SafeHtml;
|
||||
abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
|
||||
@ -57,12 +58,13 @@ export declare abstract class DomSanitizationService implements SanitizationServ
|
||||
abstract sanitize(context: SecurityContext, value: any): string;
|
||||
}
|
||||
|
||||
export declare const ELEMENT_PROBE_PROVIDERS: any[];
|
||||
|
||||
/** @experimental */
|
||||
export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
|
||||
|
||||
/** @stable */
|
||||
export declare const EVENT_MANAGER_PLUGINS: OpaqueToken;
|
||||
|
||||
/** @stable */
|
||||
export declare class EventManager {
|
||||
constructor(plugins: EventManagerPlugin[], _zone: NgZone);
|
||||
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
||||
@ -77,8 +79,10 @@ export declare class FnArg {
|
||||
constructor(value: any, type: Type);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const HAMMER_GESTURE_CONFIG: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
export declare class HammerGestureConfig {
|
||||
events: string[];
|
||||
overrides: {
|
||||
@ -87,17 +91,6 @@ export declare class HammerGestureConfig {
|
||||
buildHammer(element: HTMLElement): HammerInstance;
|
||||
}
|
||||
|
||||
export declare class KeyEventsPlugin extends EventManagerPlugin {
|
||||
constructor();
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class MessageBus implements MessageBusSource, MessageBusSink {
|
||||
abstract attachToZone(zone: NgZone): void;
|
||||
@ -134,21 +127,27 @@ export declare class ReceivedMessage {
|
||||
});
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface SafeHtml extends SafeValue {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface SafeResourceUrl extends SafeValue {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface SafeScript extends SafeValue {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface SafeStyle extends SafeValue {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface SafeUrl extends SafeValue {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare var SecurityContext: typeof t.SecurityContext;
|
||||
|
||||
/** @experimental */
|
||||
@ -156,6 +155,7 @@ export declare abstract class ServiceMessageBroker {
|
||||
abstract registerMethod(methodName: string, signature: Type[], method: Function, returnType?: Type): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class ServiceMessageBrokerFactory {
|
||||
abstract createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
/** @stable */
|
||||
export declare const TEST_BROWSER_APPLICATION_PROVIDERS: Array<any>;
|
||||
|
||||
/** @stable */
|
||||
export declare const TEST_BROWSER_PLATFORM_PROVIDERS: Array<any>;
|
||||
|
@ -1 +1,2 @@
|
||||
/** @experimental */
|
||||
export declare function verifyNoBrowserErrors(): void;
|
||||
|
@ -1,3 +1,5 @@
|
||||
/** @experimental */
|
||||
export declare const TEST_SERVER_APPLICATION_PROVIDERS: Array<any>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const TEST_SERVER_PLATFORM_PROVIDERS: Array<any>;
|
||||
|
28
tools/public_api_guard/router/index.d.ts
vendored
28
tools/public_api_guard/router/index.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare class ActivatedRoute {
|
||||
component: Type | string;
|
||||
data: Observable<Data>;
|
||||
@ -8,6 +9,7 @@ export declare class ActivatedRoute {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ActivatedRouteSnapshot {
|
||||
component: Type | string;
|
||||
data: Data;
|
||||
@ -17,29 +19,36 @@ export declare class ActivatedRouteSnapshot {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface CanActivate {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface CanDeactivate<T> {
|
||||
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Data = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare class DefaultUrlSerializer implements UrlSerializer {
|
||||
parse(url: string): UrlTree;
|
||||
serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
|
||||
|
||||
/** @experimental */
|
||||
export interface ExtraOptions {
|
||||
enableTracing?: boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationCancel {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -47,6 +56,7 @@ export declare class NavigationCancel {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationEnd {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -55,6 +65,7 @@ export declare class NavigationEnd {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationError {
|
||||
error: any;
|
||||
id: number;
|
||||
@ -63,6 +74,7 @@ export declare class NavigationError {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationStart {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -70,27 +82,34 @@ export declare class NavigationStart {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Params = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare const PRIMARY_OUTLET: string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function provideRouter(config: RouterConfig, opts?: ExtraOptions): any[];
|
||||
|
||||
/** @experimental */
|
||||
export interface Resolve<T> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any> | any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type ResolveData = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export interface Route {
|
||||
path?: string;
|
||||
pathMatch?:
|
||||
/** @deprecated */ terminal?: boolean;
|
||||
|
||||
/** @experimental */
|
||||
export declare class Router {
|
||||
events: Observable<Event>;
|
||||
routerState: RouterState;
|
||||
@ -103,14 +122,18 @@ export declare class Router {
|
||||
serializeUrl(url: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkActive)[];
|
||||
|
||||
/** @experimental */
|
||||
export declare type RouterConfig = Route[];
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterOutletMap {
|
||||
registerOutlet(name: string, outlet: RouterOutlet): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterState extends Tree<ActivatedRoute> {
|
||||
fragment: Observable<string>;
|
||||
queryParams: Observable<Params>;
|
||||
@ -118,6 +141,7 @@ export declare class RouterState extends Tree<ActivatedRoute> {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
||||
fragment: string;
|
||||
queryParams: Params;
|
||||
@ -125,6 +149,7 @@ export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RoutesRecognized {
|
||||
id: number;
|
||||
state: RouterStateSnapshot;
|
||||
@ -134,6 +159,7 @@ export declare class RoutesRecognized {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class UrlPathWithParams {
|
||||
parameters: {
|
||||
[key: string]: string;
|
||||
@ -145,11 +171,13 @@ export declare class UrlPathWithParams {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class UrlSerializer {
|
||||
abstract parse(url: string): UrlTree;
|
||||
abstract serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class UrlTree {
|
||||
fragment: string;
|
||||
queryParams: {
|
||||
|
2
tools/public_api_guard/upgrade/index.d.ts
vendored
2
tools/public_api_guard/upgrade/index.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare class UpgradeAdapter {
|
||||
addProvider(provider: Type | Provider | any[] | any): void;
|
||||
bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef;
|
||||
@ -9,6 +10,7 @@ export declare class UpgradeAdapter {
|
||||
}): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class UpgradeAdapterRef {
|
||||
ng1Injector: angular.IInjectorService;
|
||||
ng1RootScope: angular.IRootScopeService;
|
||||
|
Reference in New Issue
Block a user