docs: update core to use @publicApi tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin
2018-10-19 16:27:04 +01:00
committed by Alex Rickabaugh
parent 0918adf39d
commit 3903e5ebe7
46 changed files with 179 additions and 139 deletions

View File

@ -42,6 +42,7 @@ export function devModeEqual(a: any, b: any): boolean {
* }
* ```
*
* @publicApi
*/
export class WrappedValue {
/** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
@ -65,6 +66,7 @@ export class WrappedValue {
/**
* Represents a basic change from a previous to a new value.
*
* @publicApi
*/
export class SimpleChange {
constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}

View File

@ -48,6 +48,7 @@ import {injectChangeDetectorRef as render3InjectChangeDetectorRef} from '../rend
*
* <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
*
* @publicApi
*/
export abstract class ChangeDetectorRef {
/**

View File

@ -11,6 +11,7 @@
* The strategy that the default change detector uses to detect changes.
* When set, takes effect the next time change detection is triggered.
*
* @publicApi
*/
export enum ChangeDetectionStrategy {
/**
@ -74,7 +75,7 @@ export enum ChangeDetectorStatus {
* @param changeDetectionStrategy The strategy to check.
* @returns True if the given strategy is the current default, false otherwise.
* @see `ChangeDetectorStatus`
* @see `ChangeDetectorRef`
* @see `ChangeDetectorRef`
*/
export function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):
boolean {

View File

@ -24,6 +24,7 @@ const trackByIdentity = (index: number, item: any) => item;
/**
* @deprecated v4.0.0 - Should not be part of public API.
* @publicApi
*/
export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
public readonly length: number = 0;

View File

@ -15,7 +15,7 @@ import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
/**
* A type describing supported iterable types.
*
*
* @publicApi
*/
export type NgIterable<T> = Array<T>| Iterable<T>;
@ -23,7 +23,7 @@ export type NgIterable<T> = Array<T>| Iterable<T>;
* A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
* respond to changes in an iterable by effecting equivalent changes in the DOM.
*
*
* @publicApi
*/
export interface IterableDiffer<V> {
/**
@ -40,7 +40,7 @@ export interface IterableDiffer<V> {
* An object describing the changes in the `Iterable` collection since last time
* `IterableDiffer#diff()` was invoked.
*
*
* @publicApi
*/
export interface IterableChanges<V> {
/**
@ -93,7 +93,7 @@ export interface IterableChanges<V> {
/**
* Record representing the item change information.
*
*
* @publicApi
*/
export interface IterableChangeRecord<V> {
/** Current index of the item in `Iterable` or null if removed. */
@ -111,6 +111,7 @@ export interface IterableChangeRecord<V> {
/**
* @deprecated v4.0.0 - Use IterableChangeRecord instead.
* @publicApi
*/
export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}
@ -118,14 +119,14 @@ export interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {}
* An optional function passed into {@link NgForOf} that defines how to track
* items in an iterable (e.g. fby index or id)
*
*
* @publicApi
*/
export interface TrackByFunction<T> { (index: number, item: T): any; }
/**
* Provides a factory for {@link IterableDiffer}.
*
*
* @publicApi
*/
export interface IterableDifferFactory {
supports(objects: any): boolean;
@ -135,6 +136,7 @@ export interface IterableDifferFactory {
/**
* A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
*
* @publicApi
*/
export class IterableDiffers {
static ngInjectableDef = defineInjectable({

View File

@ -12,7 +12,7 @@ import {Optional, SkipSelf, StaticProvider} from '../../di';
/**
* A differ that tracks changes made to an object over time.
*
*
* @publicApi
*/
export interface KeyValueDiffer<K, V> {
/**
@ -40,7 +40,7 @@ export interface KeyValueDiffer<K, V> {
* An object describing the changes in the `Map` or `{[k:string]: string}` since last time
* `KeyValueDiffer#diff()` was invoked.
*
*
* @publicApi
*/
export interface KeyValueChanges<K, V> {
/**
@ -74,7 +74,7 @@ export interface KeyValueChanges<K, V> {
/**
* Record representing the item change information.
*
*
* @publicApi
*/
export interface KeyValueChangeRecord<K, V> {
/**
@ -96,7 +96,7 @@ export interface KeyValueChangeRecord<K, V> {
/**
* Provides a factory for {@link KeyValueDiffer}.
*
*
* @publicApi
*/
export interface KeyValueDifferFactory {
/**
@ -113,6 +113,7 @@ export interface KeyValueDifferFactory {
/**
* A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
*
* @publicApi
*/
export class KeyValueDiffers {
/**

View File

@ -30,6 +30,6 @@
*
* Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
*
*
* @publicApi
*/
export interface PipeTransform { transform(value: any, ...args: any[]): any; }