docs: common with `@publicApi` tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin 2018-10-19 15:06:08 +01:00 committed by Alex Rickabaugh
parent 42c331bbf2
commit 0918adf39d
43 changed files with 87 additions and 97 deletions

View File

@ -20,7 +20,7 @@ import {HttpEvent} from './response';
* *
* In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain. * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
* *
* * @publicApi
*/ */
export abstract class HttpHandler { export abstract class HttpHandler {
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>; abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
@ -34,7 +34,7 @@ export abstract class HttpHandler {
* When injected, `HttpBackend` dispatches requests directly to the backend, without going * When injected, `HttpBackend` dispatches requests directly to the backend, without going
* through the interceptor chain. * through the interceptor chain.
* *
* * @publicApi
*/ */
export abstract class HttpBackend implements HttpHandler { export abstract class HttpBackend implements HttpHandler {
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>; abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;

View File

@ -51,7 +51,7 @@ export type HttpObserve = 'body' | 'events' | 'response';
* Each request method has multiple signatures, and the return type varies according to which * Each request method has multiple signatures, and the return type varies according to which
* signature is called (mainly the values of `observe` and `responseType`). * signature is called (mainly the values of `observe` and `responseType`).
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class HttpClient { export class HttpClient {

View File

@ -15,6 +15,7 @@ interface Update {
/** /**
* Immutable set of Http headers, with lazy parsing. * Immutable set of Http headers, with lazy parsing.
* *
* @publicApi
*/ */
export class HttpHeaders { export class HttpHeaders {
/** /**

View File

@ -22,7 +22,7 @@ import {HttpEvent} from './response';
* In rare cases, interceptors may wish to completely handle a request themselves, * In rare cases, interceptors may wish to completely handle a request themselves,
* and not delegate to the remainder of the chain. This behavior is allowed. * and not delegate to the remainder of the chain. This behavior is allowed.
* *
* * @publicApi
*/ */
export interface HttpInterceptor { export interface HttpInterceptor {
/** /**
@ -61,7 +61,7 @@ export class HttpInterceptorHandler implements HttpHandler {
* A multi-provider token which represents the array of `HttpInterceptor`s that * A multi-provider token which represents the array of `HttpInterceptor`s that
* are registered. * are registered.
* *
* * @publicApi
*/ */
export const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS'); export const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS');

View File

@ -42,7 +42,7 @@ export abstract class JsonpCallbackContext { [key: string]: (data: any) => void;
* `HttpBackend` that only processes `HttpRequest` with the JSONP method, * `HttpBackend` that only processes `HttpRequest` with the JSONP method,
* by performing JSONP style requests. * by performing JSONP style requests.
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class JsonpClientBackend implements HttpBackend { export class JsonpClientBackend implements HttpBackend {
@ -206,7 +206,7 @@ export class JsonpClientBackend implements HttpBackend {
* An `HttpInterceptor` which identifies requests with the method JSONP and * An `HttpInterceptor` which identifies requests with the method JSONP and
* shifts them to the `JsonpClientBackend`. * shifts them to the `JsonpClientBackend`.
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class JsonpInterceptor { export class JsonpInterceptor {

View File

@ -85,7 +85,7 @@ export function jsonpCallbackContext(): Object {
* If no names are supplied, the default cookie name is `XSRF-TOKEN` * If no names are supplied, the default cookie name is `XSRF-TOKEN`
* and the default header name is `X-XSRF-TOKEN`. * and the default header name is `X-XSRF-TOKEN`.
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
providers: [ providers: [
@ -138,7 +138,7 @@ export class HttpClientXsrfModule {
* You can add interceptors to the chain behind `HttpClient` by binding them to the * You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
/** /**
@ -175,7 +175,7 @@ export class HttpClientModule {
* You can add interceptors to the chain behind `HttpClient` by binding them to the * You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
providers: [ providers: [

View File

@ -11,7 +11,7 @@
* *
* Used by `HttpParams`. * Used by `HttpParams`.
* *
* * @publicApi
**/ **/
export interface HttpParameterCodec { export interface HttpParameterCodec {
encodeKey(key: string): string; encodeKey(key: string): string;
@ -25,7 +25,7 @@ export interface HttpParameterCodec {
* A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
* serialize and parse URL parameter keys and values. * serialize and parse URL parameter keys and values.
* *
* * @publicApi
*/ */
export class HttpUrlEncodingCodec implements HttpParameterCodec { export class HttpUrlEncodingCodec implements HttpParameterCodec {
encodeKey(key: string): string { return standardEncoding(key); } encodeKey(key: string): string { return standardEncoding(key); }
@ -94,7 +94,7 @@ export interface HttpParamsOptions {
* *
* This class is immutable - all mutation operations return a new instance. * This class is immutable - all mutation operations return a new instance.
* *
* * @publicApi
*/ */
export class HttpParams { export class HttpParams {
private map: Map<string, string[]>|null; private map: Map<string, string[]>|null;

View File

@ -73,7 +73,7 @@ function isFormData(value: any): value is FormData {
* assumed to be immutable. To modify a `HttpRequest`, the `clone` * assumed to be immutable. To modify a `HttpRequest`, the `clone`
* method should be used. * method should be used.
* *
* * @publicApi
*/ */
export class HttpRequest<T> { export class HttpRequest<T> {
/** /**

View File

@ -11,7 +11,7 @@ import {HttpHeaders} from './headers';
/** /**
* Type enumeration for the different kinds of `HttpEvent`. * Type enumeration for the different kinds of `HttpEvent`.
* *
* * @publicApi
*/ */
export enum HttpEventType { export enum HttpEventType {
/** /**
@ -48,7 +48,7 @@ export enum HttpEventType {
/** /**
* Base interface for progress events. * Base interface for progress events.
* *
* * @publicApi
*/ */
export interface HttpProgressEvent { export interface HttpProgressEvent {
/** /**
@ -71,7 +71,7 @@ export interface HttpProgressEvent {
/** /**
* A download progress event. * A download progress event.
* *
* * @publicApi
*/ */
export interface HttpDownloadProgressEvent extends HttpProgressEvent { export interface HttpDownloadProgressEvent extends HttpProgressEvent {
type: HttpEventType.DownloadProgress; type: HttpEventType.DownloadProgress;
@ -98,7 +98,7 @@ export interface HttpUploadProgressEvent extends HttpProgressEvent {
* when a request may be retried multiple times, to distinguish between * when a request may be retried multiple times, to distinguish between
* retries on the final event stream. * retries on the final event stream.
* *
* * @publicApi
*/ */
export interface HttpSentEvent { type: HttpEventType.Sent; } export interface HttpSentEvent { type: HttpEventType.Sent; }
@ -108,7 +108,7 @@ export interface HttpSentEvent { type: HttpEventType.Sent; }
* Grouping all custom events under this type ensures they will be handled * Grouping all custom events under this type ensures they will be handled
* and forwarded by all implementations of interceptors. * and forwarded by all implementations of interceptors.
* *
* * @publicApi
*/ */
export interface HttpUserEvent<T> { type: HttpEventType.User; } export interface HttpUserEvent<T> { type: HttpEventType.User; }
@ -130,7 +130,7 @@ export interface HttpJsonParseError {
* *
* Typed according to the expected type of the response. * Typed according to the expected type of the response.
* *
* * @publicApi
*/ */
export type HttpEvent<T> = export type HttpEvent<T> =
HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>; HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;
@ -138,7 +138,7 @@ export type HttpEvent<T> =
/** /**
* Base class for both `HttpResponse` and `HttpHeaderResponse`. * Base class for both `HttpResponse` and `HttpHeaderResponse`.
* *
* * @publicApi
*/ */
export abstract class HttpResponseBase { export abstract class HttpResponseBase {
/** /**
@ -207,7 +207,7 @@ export abstract class HttpResponseBase {
* `HttpHeaderResponse` is a `HttpEvent` available on the response * `HttpHeaderResponse` is a `HttpEvent` available on the response
* event stream, only when progress events are requested. * event stream, only when progress events are requested.
* *
* * @publicApi
*/ */
export class HttpHeaderResponse extends HttpResponseBase { export class HttpHeaderResponse extends HttpResponseBase {
/** /**
@ -248,7 +248,7 @@ export class HttpHeaderResponse extends HttpResponseBase {
* `HttpResponse` is a `HttpEvent` available on the response event * `HttpResponse` is a `HttpEvent` available on the response event
* stream. * stream.
* *
* * @publicApi
*/ */
export class HttpResponse<T> extends HttpResponseBase { export class HttpResponse<T> extends HttpResponseBase {
/** /**
@ -298,7 +298,7 @@ export class HttpResponse<T> extends HttpResponseBase {
* will contain either a wrapped Error object or the error response returned * will contain either a wrapped Error object or the error response returned
* from the server. * from the server.
* *
* * @publicApi
*/ */
export class HttpErrorResponse extends HttpResponseBase implements Error { export class HttpErrorResponse extends HttpResponseBase implements Error {
readonly name = 'HttpErrorResponse'; readonly name = 'HttpErrorResponse';

View File

@ -33,7 +33,7 @@ function getResponseUrl(xhr: any): string|null {
/** /**
* A wrapper around the `XMLHttpRequest` constructor. * A wrapper around the `XMLHttpRequest` constructor.
* *
* * @publicApi
*/ */
export abstract class XhrFactory { abstract build(): XMLHttpRequest; } export abstract class XhrFactory { abstract build(): XMLHttpRequest; }
@ -62,7 +62,7 @@ interface PartialResponse {
* An `HttpBackend` which uses the XMLHttpRequest API to send * An `HttpBackend` which uses the XMLHttpRequest API to send
* requests to a backend server. * requests to a backend server.
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class HttpXhrBackend implements HttpBackend { export class HttpXhrBackend implements HttpBackend {

View File

@ -21,7 +21,7 @@ export const XSRF_HEADER_NAME = new InjectionToken<string>('XSRF_HEADER_NAME');
/** /**
* Retrieves the current XSRF token to use with the next outgoing request. * Retrieves the current XSRF token to use with the next outgoing request.
* *
* * @publicApi
*/ */
export abstract class HttpXsrfTokenExtractor { export abstract class HttpXsrfTokenExtractor {
/** /**

View File

@ -13,7 +13,7 @@ import {TestRequest} from './request';
/** /**
* Defines a matcher for requests based on URL, method, or both. * Defines a matcher for requests based on URL, method, or both.
* *
* * @publicApi
*/ */
export interface RequestMatch { export interface RequestMatch {
method?: string; method?: string;
@ -24,7 +24,7 @@ export interface RequestMatch {
* Controller to be injected into tests, that allows for mocking and flushing * Controller to be injected into tests, that allows for mocking and flushing
* of requests. * of requests.
* *
* * @publicApi
*/ */
export abstract class HttpTestingController { export abstract class HttpTestingController {
/** /**

View File

@ -18,7 +18,7 @@ import {HttpClientTestingBackend} from './backend';
* *
* Inject `HttpTestingController` to expect and flush requests in your tests. * Inject `HttpTestingController` to expect and flush requests in your tests.
* *
* * @publicApi
*/ */
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -15,7 +15,7 @@ import {Observer} from 'rxjs';
* This interface allows access to the underlying `HttpRequest`, and allows * This interface allows access to the underlying `HttpRequest`, and allows
* responding with `HttpEvent`s or `HttpErrorResponse`s. * responding with `HttpEvent`s or `HttpErrorResponse`s.
* *
* * @publicApi
*/ */
export class TestRequest { export class TestRequest {
/** /**

View File

@ -26,6 +26,7 @@ import {COMMON_PIPES} from './pipes/index';
* * The `exports` options make the declared directives and pipes available for import * * The `exports` options make the declared directives and pipes available for import
* by other NgModules. * by other NgModules.
* *
* @publicApi
*/ */
@NgModule({ @NgModule({
declarations: [COMMON_DIRECTIVES, COMMON_PIPES], declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
@ -41,6 +42,7 @@ export class CommonModule {
* A module that contains the deprecated i18n pipes. * A module that contains the deprecated i18n pipes.
* *
* @deprecated from v5 * @deprecated from v5
* @publicApi
*/ */
@NgModule({ @NgModule({
declarations: [COMMON_DEPRECATED_I18N_PIPES], declarations: [COMMON_DEPRECATED_I18N_PIPES],

View File

@ -34,7 +34,7 @@ import {Directive, DoCheck, ElementRef, Input, IterableChanges, IterableDiffer,
* - `Object` - keys are CSS classes that get added when the expression given in the value * - `Object` - keys are CSS classes that get added when the expression given in the value
* evaluates to a truthy value, otherwise they are removed. * evaluates to a truthy value, otherwise they are removed.
* *
* * @publicApi
*/ */
@Directive({selector: '[ngClass]'}) @Directive({selector: '[ngClass]'})
export class NgClass implements DoCheck { export class NgClass implements DoCheck {

View File

@ -8,6 +8,9 @@
import {ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core'; import {ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
/**
* @publicApi
*/
export class NgForOfContext<T> { export class NgForOfContext<T> {
constructor( constructor(
public $implicit: T, public ngForOf: NgIterable<T>, public index: number, public $implicit: T, public ngForOf: NgIterable<T>, public index: number,
@ -93,6 +96,7 @@ export class NgForOfContext<T> {
* example. * example.
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Directive({selector: '[ngFor][ngForOf]'}) @Directive({selector: '[ngFor][ngForOf]'})
export class NgForOf<T> implements DoCheck { export class NgForOf<T> implements DoCheck {

View File

@ -100,6 +100,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
* ``` * ```
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Directive({selector: '[ngIf]'}) @Directive({selector: '[ngIf]'})
export class NgIf { export class NgIf {
@ -171,6 +172,9 @@ export class NgIf {
static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E> { return true; } static ngTemplateGuard_ngIf<E>(dir: NgIf, expr: E): expr is NonNullable<E> { return true; }
} }
/**
* @publicApi
*/
export class NgIfContext { export class NgIfContext {
public $implicit: any = null; public $implicit: any = null;
public ngIf: any = null; public ngIf: any = null;

View File

@ -28,7 +28,7 @@ import {Directive, DoCheck, ElementRef, Input, KeyValueChanges, KeyValueDiffer,
* - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'), * - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),
* - values are the values assigned to those properties (expressed in the given unit). * - values are the values assigned to those properties (expressed in the given unit).
* *
* * @publicApi
*/ */
@Directive({selector: '[ngStyle]'}) @Directive({selector: '[ngStyle]'})
export class NgStyle implements DoCheck { export class NgStyle implements DoCheck {

View File

@ -71,7 +71,7 @@ export class SwitchView {
* When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is * When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is
* stamped out. * stamped out.
* *
* * @publicApi
*/ */
@Directive({selector: '[ngSwitch]'}) @Directive({selector: '[ngSwitch]'})
export class NgSwitch { export class NgSwitch {
@ -148,7 +148,7 @@ export class NgSwitch {
* *
* See {@link NgSwitch} for more details and example. * See {@link NgSwitch} for more details and example.
* *
* * @publicApi
*/ */
@Directive({selector: '[ngSwitchCase]'}) @Directive({selector: '[ngSwitchCase]'})
export class NgSwitchCase implements DoCheck { export class NgSwitchCase implements DoCheck {
@ -187,7 +187,7 @@ export class NgSwitchCase implements DoCheck {
* *
* See {@link NgSwitch} for more details and example. * See {@link NgSwitch} for more details and example.
* *
* * @publicApi
*/ */
@Directive({selector: '[ngSwitchDefault]'}) @Directive({selector: '[ngSwitchDefault]'})
export class NgSwitchDefault { export class NgSwitchDefault {

View File

@ -30,6 +30,7 @@ import {Directive, EmbeddedViewRef, Input, OnChanges, SimpleChange, SimpleChange
* *
* {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'} * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
* *
* @publicApi
*/ */
@Directive({selector: '[ngTemplateOutlet]'}) @Directive({selector: '[ngTemplateOutlet]'})
export class NgTemplateOutlet implements OnChanges { export class NgTemplateOutlet implements OnChanges {

View File

@ -14,6 +14,6 @@ import {InjectionToken} from '@angular/core';
* Note: Document might not be available in the Application Context when Application and Rendering * Note: Document might not be available in the Application Context when Application and Rendering
* Contexts are not the same (e.g. when running the application into a Web Worker). * Contexts are not the same (e.g. when running the application into a Web Worker).
* *
* * @publicApi
*/ */
export const DOCUMENT = new InjectionToken<Document>('DocumentToken'); export const DOCUMENT = new InjectionToken<Document>('DocumentToken');

View File

@ -57,6 +57,8 @@ enum TranslationType {
* If not specified, host system settings are used. * If not specified, host system settings are used.
* *
* See {@link DatePipe} for more details. * See {@link DatePipe} for more details.
*
* @publicApi
*/ */
export function formatDate( export function formatDate(
value: string | number | Date, format: string, locale: string, timezone?: string): string { value: string | number | Date, format: string, locale: string, timezone?: string): string {

View File

@ -138,7 +138,7 @@ function formatNumberToLocaleString(
* as `USD` for the US dollar and `EUR` for the euro. * as `USD` for the US dollar and `EUR` for the euro.
* - `digitInfo` See {@link DecimalPipe} for more details. * - `digitInfo` See {@link DecimalPipe} for more details.
* *
* * @publicApi
*/ */
export function formatCurrency( export function formatCurrency(
value: number, locale: string, currency: string, currencyCode?: string, value: number, locale: string, currency: string, currencyCode?: string,
@ -168,7 +168,7 @@ export function formatCurrency(
* - `locale` is a `string` defining the locale to use. * - `locale` is a `string` defining the locale to use.
* - `digitInfo` See {@link DecimalPipe} for more details. * - `digitInfo` See {@link DecimalPipe} for more details.
* *
* * @publicApi
*/ */
export function formatPercent(value: number, locale: string, digitsInfo?: string): string { export function formatPercent(value: number, locale: string, digitsInfo?: string): string {
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent); const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
@ -191,7 +191,7 @@ export function formatPercent(value: number, locale: string, digitsInfo?: string
* - `locale` is a `string` defining the locale to use. * - `locale` is a `string` defining the locale to use.
* - `digitInfo` See {@link DecimalPipe} for more details. * - `digitInfo` See {@link DecimalPipe} for more details.
* *
* * @publicApi
*/ */
export function formatNumber(value: number, locale: string, digitsInfo?: string): string { export function formatNumber(value: number, locale: string, digitsInfo?: string): string {
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal); const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);

View File

@ -31,7 +31,7 @@ import {LocationChangeListener, PlatformLocation} from './platform_location';
* *
* {@example common/location/ts/hash_location_component.ts region='LocationComponent'} * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class HashLocationStrategy extends LocationStrategy { export class HashLocationStrategy extends LocationStrategy {

View File

@ -44,6 +44,7 @@ export interface PopStateEvent {
* *
* {@example common/location/ts/path_location_component.ts region='LocationComponent'} * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
* *
* @publicApi
*/ */
@Injectable() @Injectable()
export class Location { export class Location {

View File

@ -25,7 +25,7 @@ import {LocationChangeListener} from './platform_location';
* *
* See these two classes for more. * See these two classes for more.
* *
* * @publicApi
*/ */
export abstract class LocationStrategy { export abstract class LocationStrategy {
abstract path(includeHash?: boolean): string; abstract path(includeHash?: boolean): string;
@ -61,6 +61,6 @@ export abstract class LocationStrategy {
* class AppModule {} * class AppModule {}
* ``` * ```
* *
* * @publicApi
*/ */
export const APP_BASE_HREF = new InjectionToken<string>('appBaseHref'); export const APP_BASE_HREF = new InjectionToken<string>('appBaseHref');

View File

@ -40,7 +40,7 @@ import {LocationChangeListener, PlatformLocation} from './platform_location';
* *
* {@example common/location/ts/path_location_component.ts region='LocationComponent'} * {@example common/location/ts/path_location_component.ts region='LocationComponent'}
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class PathLocationStrategy extends LocationStrategy { export class PathLocationStrategy extends LocationStrategy {

View File

@ -27,7 +27,7 @@ import {InjectionToken} from '@angular/core';
* {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation` * {@link Location} / {@link LocationStrategy} and DOM apis flow through the `PlatformLocation`
* class they are all platform independent. * class they are all platform independent.
* *
* * @publicApi
*/ */
export abstract class PlatformLocation { export abstract class PlatformLocation {
abstract getBaseHrefFromDOM(): string; abstract getBaseHrefFromDOM(): string;
@ -48,7 +48,9 @@ export abstract class PlatformLocation {
} }
/** /**
* @description Indicates when a location is initialized. * @description
* Indicates when a location is initialized.
*
* @publicApi * @publicApi
*/ */
export const LOCATION_INITIALIZED = new InjectionToken<Promise<any>>('Location Initialized'); export const LOCATION_INITIALIZED = new InjectionToken<Promise<any>>('Location Initialized');

View File

@ -65,6 +65,7 @@ const _observableStrategy = new ObservableStrategy();
* *
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'} * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
* *
* @publicApi
*/ */
@Pipe({name: 'async', pure: false}) @Pipe({name: 'async', pure: false})
export class AsyncPipe implements OnDestroy, PipeTransform { export class AsyncPipe implements OnDestroy, PipeTransform {

View File

@ -22,6 +22,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
* <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example> * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Pipe({name: 'lowercase'}) @Pipe({name: 'lowercase'})
export class LowerCasePipe implements PipeTransform { export class LowerCasePipe implements PipeTransform {
@ -64,6 +65,7 @@ const unicodeWordMatch =
* <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example> * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Pipe({name: 'titlecase'}) @Pipe({name: 'titlecase'})
export class TitleCasePipe implements PipeTransform { export class TitleCasePipe implements PipeTransform {
@ -87,6 +89,7 @@ export class TitleCasePipe implements PipeTransform {
* @see `TitleCasePipe` * @see `TitleCasePipe`
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Pipe({name: 'uppercase'}) @Pipe({name: 'uppercase'})
export class UpperCasePipe implements PipeTransform { export class UpperCasePipe implements PipeTransform {

View File

@ -147,6 +147,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
* } * }
* ``` * ```
* *
* @publicApi
*/ */
// clang-format on // clang-format on
@Pipe({name: 'date', pure: true}) @Pipe({name: 'date', pure: true})

View File

@ -73,7 +73,7 @@ import {DateFormatter} from './intl';
* *
* {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'} * {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}
* *
* * @publicApi
*/ */
@Pipe({name: 'date', pure: true}) @Pipe({name: 'date', pure: true})
export class DeprecatedDatePipe implements PipeTransform { export class DeprecatedDatePipe implements PipeTransform {

View File

@ -83,6 +83,7 @@ function formatNumber(
* {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'} * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
* *
* @ngModule CommonModule * @ngModule CommonModule
* @publicApi
*/ */
@Pipe({name: 'number'}) @Pipe({name: 'number'})
export class DeprecatedDecimalPipe implements PipeTransform { export class DeprecatedDecimalPipe implements PipeTransform {
@ -112,7 +113,7 @@ export class DeprecatedDecimalPipe implements PipeTransform {
* *
* {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'} * {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}
* *
* * @publicApi
*/ */
@Pipe({name: 'percent'}) @Pipe({name: 'percent'})
export class DeprecatedPercentPipe implements PipeTransform { export class DeprecatedPercentPipe implements PipeTransform {
@ -148,7 +149,7 @@ export class DeprecatedPercentPipe implements PipeTransform {
* *
* {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'} * {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}
* *
* * @publicApi
*/ */
@Pipe({name: 'currency'}) @Pipe({name: 'currency'})
export class DeprecatedCurrencyPipe implements PipeTransform { export class DeprecatedCurrencyPipe implements PipeTransform {

View File

@ -21,6 +21,7 @@ import {Pipe, PipeTransform} from '@angular/core';
* *
* {@example common/pipes/ts/json_pipe.ts region='JsonPipe'} * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
* *
* @publicApi
*/ */
@Pipe({name: 'json', pure: false}) @Pipe({name: 'json', pure: false})
export class JsonPipe implements PipeTransform { export class JsonPipe implements PipeTransform {

View File

@ -15,6 +15,8 @@ function makeKeyValuePair<K, V>(key: K, value: V): KeyValue<K, V> {
/** /**
* A key value pair. * A key value pair.
* Usually used to represent the key value pairs from a Map or Object. * Usually used to represent the key value pairs from a Map or Object.
*
* @publicApi
*/ */
export interface KeyValue<K, V> { export interface KeyValue<K, V> {
key: K; key: K;
@ -38,6 +40,8 @@ export interface KeyValue<K, V> {
* pipe. * pipe.
* *
* {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'} * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
*
* @publicApi
*/ */
@Pipe({name: 'keyvalue', pure: false}) @Pipe({name: 'keyvalue', pure: false})
export class KeyValuePipe implements PipeTransform { export class KeyValuePipe implements PipeTransform {

View File

@ -44,6 +44,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
* *
* <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example> * <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example>
* *
* @publicApi
*/ */
@Pipe({name: 'number'}) @Pipe({name: 'number'})
export class DecimalPipe implements PipeTransform { export class DecimalPipe implements PipeTransform {
@ -96,7 +97,7 @@ export class DecimalPipe implements PipeTransform {
* *
* <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example> * <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example>
* *
* * @publicApi
*/ */
@Pipe({name: 'percent'}) @Pipe({name: 'percent'})
export class PercentPipe implements PipeTransform { export class PercentPipe implements PipeTransform {
@ -150,7 +151,7 @@ export class PercentPipe implements PipeTransform {
* *
* <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example> * <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example>
* *
* * @publicApi
*/ */
@Pipe({name: 'currency'}) @Pipe({name: 'currency'})
export class CurrencyPipe implements PipeTransform { export class CurrencyPipe implements PipeTransform {

View File

@ -42,8 +42,8 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
* *
* {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'} * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
* *
* @publicApi
*/ */
@Pipe({name: 'slice', pure: false}) @Pipe({name: 'slice', pure: false})
export class SlicePipe implements PipeTransform { export class SlicePipe implements PipeTransform {
/** /**

View File

@ -14,4 +14,7 @@
import {Version} from '@angular/core'; import {Version} from '@angular/core';
/**
* @publicApi
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER'); export const VERSION = new Version('0.0.0-PLACEHOLDER');

View File

@ -12,6 +12,8 @@ import {DOCUMENT} from './dom_tokens';
/** /**
* Manages the scroll position. * Manages the scroll position.
*
* @publicApi
*/ */
export abstract class ViewportScroller { export abstract class ViewportScroller {
// De-sugared tree-shakable injection // De-sugared tree-shakable injection

View File

@ -15,7 +15,7 @@ import {EventEmitter, Injectable} from '@angular/core';
* A mock implementation of {@link LocationStrategy} that allows tests to fire simulated * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated
* location events. * location events.
* *
* * @publicApi
*/ */
@Injectable() @Injectable()
export class MockLocationStrategy extends LocationStrategy { export class MockLocationStrategy extends LocationStrategy {

View File

@ -61,7 +61,6 @@ export declare function formatNumber(value: number, locale: string, digitsInfo?:
export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string; export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string;
/** @experimental */
export declare enum FormatWidth { export declare enum FormatWidth {
Short = 0, Short = 0,
Medium = 1, Medium = 1,
@ -69,67 +68,47 @@ export declare enum FormatWidth {
Full = 3 Full = 3
} }
/** @experimental */
export declare enum FormStyle { export declare enum FormStyle {
Format = 0, Format = 0,
Standalone = 1 Standalone = 1
} }
/** @experimental */
export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string; export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
/** @experimental */
export declare function getLocaleCurrencyName(locale: string): string | null; export declare function getLocaleCurrencyName(locale: string): string | null;
/** @experimental */
export declare function getLocaleCurrencySymbol(locale: string): string | null; export declare function getLocaleCurrencySymbol(locale: string): string | null;
/** @experimental */
export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string; export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
/** @experimental */
export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string; export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
/** @experimental */
export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[]; export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
/** @experimental */
export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string]; export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string];
/** @experimental */
export declare function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string]; export declare function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string];
/** @experimental */
export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[]; export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
/** @experimental */
export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[]; export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
/** @experimental */
export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay; export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
/** @experimental */
export declare function getLocaleId(locale: string): string; export declare function getLocaleId(locale: string): string;
/** @experimental */
export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[]; export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
/** @experimental */
export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string; export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
/** @experimental */
export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string; export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
/** @experimental */
export declare function getLocalePluralCase(locale: string): (value: number) => Plural; export declare function getLocalePluralCase(locale: string): (value: number) => Plural;
/** @experimental */
export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string; export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
/** @experimental */
export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay]; export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
/** @experimental */
export declare function getNumberOfCurrencyDigits(code: string): number; export declare function getNumberOfCurrencyDigits(code: string): number;
export declare class HashLocationStrategy extends LocationStrategy { export declare class HashLocationStrategy extends LocationStrategy {
@ -144,7 +123,6 @@ export declare class HashLocationStrategy extends LocationStrategy {
replaceState(state: any, title: string, path: string, queryParams: string): void; replaceState(state: any, title: string, path: string, queryParams: string): void;
} }
/** @experimental */
export declare class I18nPluralPipe implements PipeTransform { export declare class I18nPluralPipe implements PipeTransform {
constructor(_localization: NgLocalization); constructor(_localization: NgLocalization);
transform(value: number, pluralMap: { transform(value: number, pluralMap: {
@ -152,23 +130,18 @@ export declare class I18nPluralPipe implements PipeTransform {
}, locale?: string): string; }, locale?: string): string;
} }
/** @experimental */
export declare class I18nSelectPipe implements PipeTransform { export declare class I18nSelectPipe implements PipeTransform {
transform(value: string | null | undefined, mapping: { transform(value: string | null | undefined, mapping: {
[key: string]: string; [key: string]: string;
}): string; }): string;
} }
/** @experimental */
export declare function isPlatformBrowser(platformId: Object): boolean; export declare function isPlatformBrowser(platformId: Object): boolean;
/** @experimental */
export declare function isPlatformServer(platformId: Object): boolean; export declare function isPlatformServer(platformId: Object): boolean;
/** @experimental */
export declare function isPlatformWorkerApp(platformId: Object): boolean; export declare function isPlatformWorkerApp(platformId: Object): boolean;
/** @experimental */
export declare function isPlatformWorkerUi(platformId: Object): boolean; export declare function isPlatformWorkerUi(platformId: Object): boolean;
export declare class JsonPipe implements PipeTransform { export declare class JsonPipe implements PipeTransform {
@ -208,16 +181,13 @@ export declare class Location {
static stripTrailingSlash(url: string): string; static stripTrailingSlash(url: string): string;
} }
/** @experimental */
export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>; export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
/** @experimental */
export interface LocationChangeEvent { export interface LocationChangeEvent {
state: any; state: any;
type: string; type: string;
} }
/** @experimental */
export interface LocationChangeListener { export interface LocationChangeListener {
(event: LocationChangeEvent): any; (event: LocationChangeEvent): any;
} }
@ -246,7 +216,6 @@ export declare class NgClass implements DoCheck {
ngDoCheck(): void; ngDoCheck(): void;
} }
/** @experimental */
export declare class NgComponentOutlet implements OnChanges, OnDestroy { export declare class NgComponentOutlet implements OnChanges, OnDestroy {
ngComponentOutlet: Type<any>; ngComponentOutlet: Type<any>;
ngComponentOutletContent: any[][]; ngComponentOutletContent: any[][];
@ -291,7 +260,6 @@ export declare class NgIfContext {
ngIf: any; ngIf: any;
} }
/** @experimental */
export declare class NgLocaleLocalization extends NgLocalization { export declare class NgLocaleLocalization extends NgLocalization {
/** @deprecated */ protected deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined; /** @deprecated */ protected deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined;
protected locale: string; protected locale: string;
@ -300,19 +268,16 @@ export declare class NgLocaleLocalization extends NgLocalization {
getPluralCategory(value: any, locale?: string): string; getPluralCategory(value: any, locale?: string): string;
} }
/** @experimental */
export declare abstract class NgLocalization { export declare abstract class NgLocalization {
abstract getPluralCategory(value: any, locale?: string): string; abstract getPluralCategory(value: any, locale?: string): string;
} }
/** @experimental */
export declare class NgPlural { export declare class NgPlural {
ngPlural: number; ngPlural: number;
constructor(_localization: NgLocalization); constructor(_localization: NgLocalization);
addCase(value: string, switchView: SwitchView): void; addCase(value: string, switchView: SwitchView): void;
} }
/** @experimental */
export declare class NgPluralCase { export declare class NgPluralCase {
value: string; value: string;
constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural); constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
@ -347,7 +312,6 @@ export declare class NgTemplateOutlet implements OnChanges {
ngOnChanges(changes: SimpleChanges): void; ngOnChanges(changes: SimpleChanges): void;
} }
/** @experimental */
export declare enum NumberFormatStyle { export declare enum NumberFormatStyle {
Decimal = 0, Decimal = 0,
Percent = 1, Percent = 1,
@ -355,7 +319,6 @@ export declare enum NumberFormatStyle {
Scientific = 3 Scientific = 3
} }
/** @experimental */
export declare enum NumberSymbol { export declare enum NumberSymbol {
Decimal = 0, Decimal = 0,
Group = 1, Group = 1,
@ -403,7 +366,6 @@ export declare abstract class PlatformLocation {
abstract replaceState(state: any, title: string, url: string): void; abstract replaceState(state: any, title: string, url: string): void;
} }
/** @experimental */
export declare enum Plural { export declare enum Plural {
Zero = 0, Zero = 0,
One = 1, One = 1,
@ -413,7 +375,6 @@ export declare enum Plural {
Other = 5 Other = 5
} }
/** @experimental */
export interface PopStateEvent { export interface PopStateEvent {
pop?: boolean; pop?: boolean;
state?: any; state?: any;
@ -421,14 +382,12 @@ export interface PopStateEvent {
url?: string; url?: string;
} }
/** @experimental */
export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void; export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
export declare class SlicePipe implements PipeTransform { export declare class SlicePipe implements PipeTransform {
transform(value: any, start: number, end?: number): any; transform(value: any, start: number, end?: number): any;
} }
/** @experimental */
export declare type Time = { export declare type Time = {
hours: number; hours: number;
minutes: number; minutes: number;
@ -438,7 +397,6 @@ export declare class TitleCasePipe implements PipeTransform {
transform(value: string): string; transform(value: string): string;
} }
/** @experimental */
export declare enum TranslationWidth { export declare enum TranslationWidth {
Narrow = 0, Narrow = 0,
Abbreviated = 1, Abbreviated = 1,
@ -461,7 +419,6 @@ export declare abstract class ViewportScroller {
static ngInjectableDef: never; static ngInjectableDef: never;
} }
/** @experimental */
export declare enum WeekDay { export declare enum WeekDay {
Sunday = 0, Sunday = 0,
Monday = 1, Monday = 1,

View File

@ -15,7 +15,6 @@ export declare class MockLocationStrategy extends LocationStrategy {
simulatePopState(url: string): void; simulatePopState(url: string): void;
} }
/** @experimental */
export declare class SpyLocation implements Location { export declare class SpyLocation implements Location {
urlChanges: string[]; urlChanges: string[];
back(): void; back(): void;