From 59fe159b78294824fb0a27d0f3c59489df72e513 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 28 Jun 2021 19:54:20 +0200 Subject: [PATCH] build: update API goldens to reflect new tool (#42688) Updates the TS API guardian goldens with their equivalents based on the new shared dev-infra tool. PR Close #42688 --- goldens/public-api/animations/animations.d.ts | 216 ---- goldens/public-api/animations/animations.md | 282 +++++ .../browser/{browser.d.ts => browser.md} | 25 +- .../testing/{testing.d.ts => testing.md} | 73 +- .../common/{common.d.ts => common.md} | 575 +++++++--- .../common/http/{http.d.ts => http.md} | 378 ++++-- .../http/testing/{testing.d.ts => testing.md} | 35 +- .../testing/{testing.d.ts => testing.md} | 114 +- .../upgrade/{upgrade.d.ts => upgrade.md} | 64 +- ...piler_options.d.ts => compiler_options.md} | 18 + .../{error_code.d.ts => error_code.md} | 91 +- .../public-api/core/{core.d.ts => core.md} | 1012 +++++++++++------ goldens/public-api/core/global_utils.d.ts | 37 - goldens/public-api/core/global_utils.md | 65 ++ .../core/testing/{testing.d.ts => testing.md} | 176 ++- goldens/public-api/elements/elements.d.ts | 42 - goldens/public-api/elements/elements.md | 75 ++ .../public-api/forms/{forms.d.ts => forms.md} | 366 +++--- goldens/public-api/localize/index.d.ts | 3 - goldens/public-api/localize/index.md | 16 + goldens/public-api/localize/init/index.d.ts | 0 goldens/public-api/localize/init/index.md | 27 + .../platform-browser-dynamic.d.ts | 9 - .../platform-browser-dynamic.md | 33 + .../testing/testing.d.ts | 4 - .../testing/testing.md | 20 + .../animations/animations.d.ts | 12 - .../platform-browser/animations/animations.md | 30 + ...tform-browser.d.ts => platform-browser.md} | 113 +- .../platform-browser/testing/testing.d.ts | 4 - .../platform-browser/testing/testing.md | 20 + .../public-api/platform-server/init/init.d.ts | 0 .../public-api/platform-server/init/init.md | 10 + .../platform-server/platform-server.d.ts | 40 - .../platform-server/platform-server.md | 69 ++ .../platform-server/testing/testing.d.ts | 4 - .../platform-server/testing/testing.md | 20 + .../platform-webworker-dynamic.d.ts | 5 - .../platform-webworker.d.ts | 92 -- .../router/{router.d.ts => router.md} | 525 ++++++--- .../public-api/router/testing/testing.d.ts | 17 - goldens/public-api/router/testing/testing.md | 50 + .../public-api/router/upgrade/upgrade.d.ts | 8 - goldens/public-api/router/upgrade/upgrade.md | 25 + .../config/{config.d.ts => config.md} | 58 +- ...{service-worker.d.ts => service-worker.md} | 55 +- goldens/public-api/upgrade/static/static.d.ts | 43 - goldens/public-api/upgrade/static/static.md | 81 ++ .../upgrade/static/testing/testing.d.ts | 3 - .../upgrade/static/testing/testing.md | 18 + .../upgrade/{upgrade.d.ts => upgrade.md} | 40 +- packages/core/BUILD.bazel | 8 + 52 files changed, 3488 insertions(+), 1618 deletions(-) delete mode 100644 goldens/public-api/animations/animations.d.ts create mode 100644 goldens/public-api/animations/animations.md rename goldens/public-api/animations/browser/{browser.d.ts => browser.md} (57%) rename goldens/public-api/animations/browser/testing/{testing.d.ts => testing.md} (50%) rename goldens/public-api/common/{common.d.ts => common.md} (52%) rename goldens/public-api/common/http/{http.d.ts => http.md} (93%) rename goldens/public-api/common/http/testing/{testing.d.ts => testing.md} (71%) rename goldens/public-api/common/testing/{testing.d.ts => testing.md} (51%) rename goldens/public-api/common/upgrade/{upgrade.d.ts => upgrade.md} (70%) rename goldens/public-api/compiler-cli/{compiler_options.d.ts => compiler_options.md} (83%) rename goldens/public-api/compiler-cli/{error_code.d.ts => error_code.md} (70%) rename goldens/public-api/core/{core.d.ts => core.md} (57%) delete mode 100644 goldens/public-api/core/global_utils.d.ts create mode 100644 goldens/public-api/core/global_utils.md rename goldens/public-api/core/testing/{testing.d.ts => testing.md} (54%) delete mode 100644 goldens/public-api/elements/elements.d.ts create mode 100644 goldens/public-api/elements/elements.md rename goldens/public-api/forms/{forms.d.ts => forms.md} (73%) delete mode 100644 goldens/public-api/localize/index.d.ts create mode 100644 goldens/public-api/localize/index.md delete mode 100644 goldens/public-api/localize/init/index.d.ts create mode 100644 goldens/public-api/localize/init/index.md delete mode 100644 goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts create mode 100644 goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.md delete mode 100644 goldens/public-api/platform-browser-dynamic/testing/testing.d.ts create mode 100644 goldens/public-api/platform-browser-dynamic/testing/testing.md delete mode 100644 goldens/public-api/platform-browser/animations/animations.d.ts create mode 100644 goldens/public-api/platform-browser/animations/animations.md rename goldens/public-api/platform-browser/{platform-browser.d.ts => platform-browser.md} (50%) delete mode 100644 goldens/public-api/platform-browser/testing/testing.d.ts create mode 100644 goldens/public-api/platform-browser/testing/testing.md delete mode 100644 goldens/public-api/platform-server/init/init.d.ts create mode 100644 goldens/public-api/platform-server/init/init.md delete mode 100644 goldens/public-api/platform-server/platform-server.d.ts create mode 100644 goldens/public-api/platform-server/platform-server.md delete mode 100644 goldens/public-api/platform-server/testing/testing.d.ts create mode 100644 goldens/public-api/platform-server/testing/testing.md delete mode 100644 goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts delete mode 100644 goldens/public-api/platform-webworker/platform-webworker.d.ts rename goldens/public-api/router/{router.d.ts => router.md} (63%) delete mode 100644 goldens/public-api/router/testing/testing.d.ts create mode 100644 goldens/public-api/router/testing/testing.md delete mode 100644 goldens/public-api/router/upgrade/upgrade.d.ts create mode 100644 goldens/public-api/router/upgrade/upgrade.md rename goldens/public-api/service-worker/config/{config.d.ts => config.md} (50%) rename goldens/public-api/service-worker/{service-worker.d.ts => service-worker.md} (63%) delete mode 100644 goldens/public-api/upgrade/static/static.d.ts create mode 100644 goldens/public-api/upgrade/static/static.md delete mode 100644 goldens/public-api/upgrade/static/testing/testing.d.ts create mode 100644 goldens/public-api/upgrade/static/testing/testing.md rename goldens/public-api/upgrade/{upgrade.d.ts => upgrade.md} (51%) diff --git a/goldens/public-api/animations/animations.d.ts b/goldens/public-api/animations/animations.d.ts deleted file mode 100644 index 1c167a632bf..00000000000 --- a/goldens/public-api/animations/animations.d.ts +++ /dev/null @@ -1,216 +0,0 @@ -export declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata; - -export declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata; - -export declare interface AnimateChildOptions extends AnimationOptions { - duration?: number | string; -} - -export declare type AnimateTimings = { - duration: number; - delay: number; - easing: string | null; -}; - -export declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata; - -export declare interface AnimationAnimateChildMetadata extends AnimationMetadata { - options: AnimationOptions | null; -} - -export declare interface AnimationAnimateMetadata extends AnimationMetadata { - styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null; - timings: string | number | AnimateTimings; -} - -export declare interface AnimationAnimateRefMetadata extends AnimationMetadata { - animation: AnimationReferenceMetadata; - options: AnimationOptions | null; -} - -export declare abstract class AnimationBuilder { - abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; -} - -export declare interface AnimationEvent { - disabled: boolean; - element: any; - fromState: string; - phaseName: string; - toState: string; - totalTime: number; - triggerName: string; -} - -export declare abstract class AnimationFactory { - abstract create(element: any, options?: AnimationOptions): AnimationPlayer; -} - -export declare interface AnimationGroupMetadata extends AnimationMetadata { - options: AnimationOptions | null; - steps: AnimationMetadata[]; -} - -export declare interface AnimationKeyframesSequenceMetadata extends AnimationMetadata { - steps: AnimationStyleMetadata[]; -} - -export declare interface AnimationMetadata { - type: AnimationMetadataType; -} - -export declare const enum AnimationMetadataType { - State = 0, - Transition = 1, - Sequence = 2, - Group = 3, - Animate = 4, - Keyframes = 5, - Style = 6, - Trigger = 7, - Reference = 8, - AnimateChild = 9, - AnimateRef = 10, - Query = 11, - Stagger = 12 -} - -export declare interface AnimationOptions { - delay?: number | string; - params?: { - [name: string]: any; - }; -} - -export declare interface AnimationPlayer { - beforeDestroy?: () => any; - parentPlayer: AnimationPlayer | null; - readonly totalTime: number; - destroy(): void; - finish(): void; - getPosition(): number; - hasStarted(): boolean; - init(): void; - onDestroy(fn: () => void): void; - onDone(fn: () => void): void; - onStart(fn: () => void): void; - pause(): void; - play(): void; - reset(): void; - restart(): void; - setPosition(position: any /** TODO #9100 */): void; -} - -export declare interface AnimationQueryMetadata extends AnimationMetadata { - animation: AnimationMetadata | AnimationMetadata[]; - options: AnimationQueryOptions | null; - selector: string; -} - -export declare interface AnimationQueryOptions extends AnimationOptions { - limit?: number; - optional?: boolean; -} - -export declare interface AnimationReferenceMetadata extends AnimationMetadata { - animation: AnimationMetadata | AnimationMetadata[]; - options: AnimationOptions | null; -} - -export declare interface AnimationSequenceMetadata extends AnimationMetadata { - options: AnimationOptions | null; - steps: AnimationMetadata[]; -} - -export declare interface AnimationStaggerMetadata extends AnimationMetadata { - animation: AnimationMetadata | AnimationMetadata[]; - timings: string | number; -} - -export declare interface AnimationStateMetadata extends AnimationMetadata { - name: string; - options?: { - params: { - [name: string]: any; - }; - }; - styles: AnimationStyleMetadata; -} - -export declare interface AnimationStyleMetadata extends AnimationMetadata { - offset: number | null; - styles: '*' | { - [key: string]: string | number; - } | Array<{ - [key: string]: string | number; - } | '*'>; -} - -export declare interface AnimationTransitionMetadata extends AnimationMetadata { - animation: AnimationMetadata | AnimationMetadata[]; - expr: string | ((fromState: string, toState: string, element?: any, params?: { - [key: string]: any; - }) => boolean); - options: AnimationOptions | null; -} - -export declare interface AnimationTriggerMetadata extends AnimationMetadata { - definitions: AnimationMetadata[]; - name: string; - options: { - params?: { - [name: string]: any; - }; - } | null; -} - -export declare const AUTO_STYLE = "*"; - -export declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; - -export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; - -export declare class NoopAnimationPlayer implements AnimationPlayer { - parentPlayer: AnimationPlayer | null; - readonly totalTime: number; - constructor(duration?: number, delay?: number); - destroy(): void; - finish(): void; - getPosition(): number; - hasStarted(): boolean; - init(): void; - onDestroy(fn: () => void): void; - onDone(fn: () => void): void; - onStart(fn: () => void): void; - pause(): void; - play(): void; - reset(): void; - restart(): void; - setPosition(position: number): void; -} - -export declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata; - -export declare function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata; - -export declare function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata; - -export declare function state(name: string, styles: AnimationStyleMetadata, options?: { - params: { - [name: string]: any; - }; -}): AnimationStateMetadata; - -export declare function style(tokens: '*' | { - [key: string]: string | number; -} | Array<'*' | { - [key: string]: string | number; -}>): AnimationStyleMetadata; - -export declare function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: { - [key: string]: any; -}) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata; - -export declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata; - -export declare function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata; diff --git a/goldens/public-api/animations/animations.md b/goldens/public-api/animations/animations.md new file mode 100644 index 00000000000..056da2e9c40 --- /dev/null +++ b/goldens/public-api/animations/animations.md @@ -0,0 +1,282 @@ +## API Report File for "@angular/animations" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata; + +// @public +export function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata; + +// @public +export interface AnimateChildOptions extends AnimationOptions { + // (undocumented) + duration?: number | string; +} + +// @public +export type AnimateTimings = { + duration: number; + delay: number; + easing: string | null; +}; + +// @public +export function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata; + +// @public +export interface AnimationAnimateChildMetadata extends AnimationMetadata { + options: AnimationOptions | null; +} + +// @public +export interface AnimationAnimateMetadata extends AnimationMetadata { + styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null; + timings: string | number | AnimateTimings; +} + +// @public +export interface AnimationAnimateRefMetadata extends AnimationMetadata { + animation: AnimationReferenceMetadata; + options: AnimationOptions | null; +} + +// @public +export abstract class AnimationBuilder { + abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory; +} + +// @public +export interface AnimationEvent { + disabled: boolean; + element: any; + fromState: string; + phaseName: string; + toState: string; + totalTime: number; + triggerName: string; +} + +// @public +export abstract class AnimationFactory { + abstract create(element: any, options?: AnimationOptions): AnimationPlayer; +} + +// @public +export interface AnimationGroupMetadata extends AnimationMetadata { + options: AnimationOptions | null; + steps: AnimationMetadata[]; +} + +// @public +export interface AnimationKeyframesSequenceMetadata extends AnimationMetadata { + steps: AnimationStyleMetadata[]; +} + +// @public +export interface AnimationMetadata { + // (undocumented) + type: AnimationMetadataType; +} + +// @public +export const enum AnimationMetadataType { + Animate = 4, + AnimateChild = 9, + AnimateRef = 10, + Group = 3, + Keyframes = 5, + Query = 11, + Reference = 8, + Sequence = 2, + Stagger = 12, + State = 0, + Style = 6, + Transition = 1, + Trigger = 7 +} + +// @public +export interface AnimationOptions { + delay?: number | string; + params?: { + [name: string]: any; + }; +} + +// @public +export interface AnimationPlayer { + beforeDestroy?: () => any; + destroy(): void; + finish(): void; + getPosition(): number; + hasStarted(): boolean; + init(): void; + onDestroy(fn: () => void): void; + onDone(fn: () => void): void; + onStart(fn: () => void): void; + parentPlayer: AnimationPlayer | null; + pause(): void; + play(): void; + reset(): void; + restart(): void; + setPosition(position: any /** TODO #9100 */): void; + readonly totalTime: number; +} + +// @public +export interface AnimationQueryMetadata extends AnimationMetadata { + animation: AnimationMetadata | AnimationMetadata[]; + options: AnimationQueryOptions | null; + selector: string; +} + +// @public +export interface AnimationQueryOptions extends AnimationOptions { + limit?: number; + optional?: boolean; +} + +// @public +export interface AnimationReferenceMetadata extends AnimationMetadata { + animation: AnimationMetadata | AnimationMetadata[]; + options: AnimationOptions | null; +} + +// @public +export interface AnimationSequenceMetadata extends AnimationMetadata { + options: AnimationOptions | null; + steps: AnimationMetadata[]; +} + +// @public +export interface AnimationStaggerMetadata extends AnimationMetadata { + animation: AnimationMetadata | AnimationMetadata[]; + timings: string | number; +} + +// @public +export interface AnimationStateMetadata extends AnimationMetadata { + name: string; + options?: { + params: { + [name: string]: any; + }; + }; + styles: AnimationStyleMetadata; +} + +// @public +export interface AnimationStyleMetadata extends AnimationMetadata { + offset: number | null; + styles: '*' | { + [key: string]: string | number; + } | Array<{ + [key: string]: string | number; + } | '*'>; +} + +// @public +export interface AnimationTransitionMetadata extends AnimationMetadata { + animation: AnimationMetadata | AnimationMetadata[]; + expr: string | ((fromState: string, toState: string, element?: any, params?: { + [key: string]: any; + }) => boolean); + options: AnimationOptions | null; +} + +// @public +export interface AnimationTriggerMetadata extends AnimationMetadata { + definitions: AnimationMetadata[]; + name: string; + options: { + params?: { + [name: string]: any; + }; + } | null; +} + +// @public +export const AUTO_STYLE = "*"; + +// @public +export function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; + +// @public +export function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; + +// @public +export class NoopAnimationPlayer implements AnimationPlayer { + constructor(duration?: number, delay?: number); + // (undocumented) + destroy(): void; + // (undocumented) + finish(): void; + // (undocumented) + getPosition(): number; + // (undocumented) + hasStarted(): boolean; + // (undocumented) + init(): void; + // (undocumented) + onDestroy(fn: () => void): void; + // (undocumented) + onDone(fn: () => void): void; + // (undocumented) + onStart(fn: () => void): void; + // (undocumented) + parentPlayer: AnimationPlayer | null; + // (undocumented) + pause(): void; + // (undocumented) + play(): void; + // (undocumented) + reset(): void; + // (undocumented) + restart(): void; + // (undocumented) + setPosition(position: number): void; + // (undocumented) + readonly totalTime: number; +} + +// @public +export function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata; + +// @public +export function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata; + +// @public +export function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata; + +// @public +export function state(name: string, styles: AnimationStyleMetadata, options?: { + params: { + [name: string]: any; + }; +}): AnimationStateMetadata; + +// @public +export function style(tokens: '*' | { + [key: string]: string | number; +} | Array<'*' | { + [key: string]: string | number; +}>): AnimationStyleMetadata; + +// @public +export function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: { + [key: string]: any; +}) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata; + +// @public +export function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata; + +// @public +export function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/animations/browser/browser.d.ts b/goldens/public-api/animations/browser/browser.md similarity index 57% rename from goldens/public-api/animations/browser/browser.d.ts rename to goldens/public-api/animations/browser/browser.md index 8fb83d8c95e..c06a6ac2fe8 100644 --- a/goldens/public-api/animations/browser/browser.d.ts +++ b/goldens/public-api/animations/browser/browser.md @@ -1,11 +1,30 @@ -export declare abstract class AnimationDriver { +## API Report File for "@angular/animations_browser" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export abstract class AnimationDriver { + // (undocumented) abstract animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any; + // (undocumented) abstract computeStyle(element: any, prop: string, defaultValue?: string): string; + // (undocumented) abstract containsElement(elm1: any, elm2: any): boolean; + // (undocumented) abstract matchesElement(element: any, selector: string): boolean; - abstract query(element: any, selector: string, multi: boolean): any[]; - abstract validateStyleProperty(prop: string): boolean; + // (undocumented) static NOOP: AnimationDriver; + // (undocumented) + abstract query(element: any, selector: string, multi: boolean): any[]; + // (undocumented) + abstract validateStyleProperty(prop: string): boolean; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/animations/browser/testing/testing.d.ts b/goldens/public-api/animations/browser/testing/testing.md similarity index 50% rename from goldens/public-api/animations/browser/testing/testing.d.ts rename to goldens/public-api/animations/browser/testing/testing.md index b3cc0242e80..0d033d25bac 100644 --- a/goldens/public-api/animations/browser/testing/testing.d.ts +++ b/goldens/public-api/animations/browser/testing/testing.md @@ -1,35 +1,74 @@ -export declare class MockAnimationDriver implements AnimationDriver { +## API Report File for "@angular/animations_browser_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { AnimationDriver } from '@angular/animations/browser'; +import { AnimationPlayer } from '@angular/animations'; +import { NoopAnimationPlayer } from '@angular/animations'; +import { ɵStyleData } from '@angular/animations'; + +// @public (undocumented) +export class MockAnimationDriver implements AnimationDriver { + // (undocumented) animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer; + // (undocumented) computeStyle(element: any, prop: string, defaultValue?: string): string; + // (undocumented) containsElement(elm1: any, elm2: any): boolean; - matchesElement(element: any, selector: string): boolean; - query(element: any, selector: string, multi: boolean): any[]; - validateStyleProperty(prop: string): boolean; + // (undocumented) static log: AnimationPlayer[]; + // (undocumented) + matchesElement(element: any, selector: string): boolean; + // (undocumented) + query(element: any, selector: string, multi: boolean): any[]; + // (undocumented) + validateStyleProperty(prop: string): boolean; } -export declare class MockAnimationPlayer extends NoopAnimationPlayer { - currentSnapshot: ɵStyleData; - delay: number; - duration: number; - easing: string; - element: any; - keyframes: { - [key: string]: string | number; - }[]; - previousPlayers: any[]; - previousStyles: { - [key: string]: string | number; - }; +// @public (undocumented) +export class MockAnimationPlayer extends NoopAnimationPlayer { constructor(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers: any[]); + // (undocumented) beforeDestroy(): void; + // (undocumented) + currentSnapshot: ɵStyleData; + // (undocumented) + delay: number; + // (undocumented) destroy(): void; + // (undocumented) + duration: number; + // (undocumented) + easing: string; + // (undocumented) + element: any; + // (undocumented) finish(): void; + // (undocumented) hasStarted(): boolean; + // (undocumented) + keyframes: { + [key: string]: string | number; + }[]; + // (undocumented) play(): void; + // (undocumented) + previousPlayers: any[]; + // (undocumented) + previousStyles: { + [key: string]: string | number; + }; + // (undocumented) reset(): void; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/common/common.d.ts b/goldens/public-api/common/common.md similarity index 52% rename from goldens/public-api/common/common.d.ts rename to goldens/public-api/common/common.md index 939f137fdc7..79b19c60f9d 100644 --- a/goldens/public-api/common/common.d.ts +++ b/goldens/public-api/common/common.md @@ -1,157 +1,268 @@ -export declare const APP_BASE_HREF: InjectionToken; +## API Report File for "@angular/common" -export declare class AsyncPipe implements OnDestroy, PipeTransform { +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ChangeDetectorRef } from '@angular/core'; +import { DoCheck } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { Injector } from '@angular/core'; +import { IterableDiffers } from '@angular/core'; +import { KeyValueDiffers } from '@angular/core'; +import { NgIterable } from '@angular/core'; +import { NgModuleFactory } from '@angular/core'; +import { Observable } from 'rxjs'; +import { OnChanges } from '@angular/core'; +import { OnDestroy } from '@angular/core'; +import { PipeTransform } from '@angular/core'; +import { Renderer2 } from '@angular/core'; +import { SimpleChanges } from '@angular/core'; +import { Subscribable } from 'rxjs'; +import { SubscriptionLike } from 'rxjs'; +import { TemplateRef } from '@angular/core'; +import { TrackByFunction } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; +import { ViewContainerRef } from '@angular/core'; + +// @public +export const APP_BASE_HREF: InjectionToken; + +// @public +export class AsyncPipe implements OnDestroy, PipeTransform { constructor(_ref: ChangeDetectorRef); + // (undocumented) ngOnDestroy(): void; + // (undocumented) transform(obj: Observable | Subscribable | Promise): T | null; + // (undocumented) transform(obj: null | undefined): null; + // (undocumented) transform(obj: Observable | Subscribable | Promise | null | undefined): T | null; + } + +// @public +export class CommonModule { } -export declare class CommonModule { -} - -export declare class CurrencyPipe implements PipeTransform { +// @public +export class CurrencyPipe implements PipeTransform { constructor(_locale: string, _defaultCurrencyCode?: string); + // (undocumented) transform(value: number | string, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null; + // (undocumented) transform(value: null | undefined, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): null; + // (undocumented) transform(value: number | string | null | undefined, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null; } -export declare class DatePipe implements PipeTransform { +// @public +export class DatePipe implements PipeTransform { constructor(locale: string); + // (undocumented) transform(value: Date | string | number, format?: string, timezone?: string, locale?: string): string | null; + // (undocumented) transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null; + // (undocumented) transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null; } -export declare class DecimalPipe implements PipeTransform { +// @public +export class DecimalPipe implements PipeTransform { constructor(_locale: string); + // (undocumented) transform(value: number | string, digitsInfo?: string, locale?: string): string | null; + // (undocumented) transform(value: null | undefined, digitsInfo?: string, locale?: string): null; + // (undocumented) transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null; } -export declare const DOCUMENT: InjectionToken; +// @public +export const DOCUMENT: InjectionToken; -export declare function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string; +// @public +export function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string; -export declare function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string; +// @public +export function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string; -export declare function formatNumber(value: number, locale: string, digitsInfo?: string): string; +// @public +export function formatNumber(value: number, locale: string, digitsInfo?: string): string; -export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string; +// @public +export function formatPercent(value: number, locale: string, digitsInfo?: string): string; -export declare enum FormatWidth { - Short = 0, - Medium = 1, +// @public +export enum FormatWidth { + Full = 3, Long = 2, - Full = 3 + Medium = 1, + Short = 0 } -export declare enum FormStyle { +// @public +export enum FormStyle { + // (undocumented) Format = 0, + // (undocumented) Standalone = 1 } -export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string; +// @public +export function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string; -export declare function getLocaleCurrencyCode(locale: string): string | null; +// @public +export function getLocaleCurrencyCode(locale: string): string | null; -export declare function getLocaleCurrencyName(locale: string): string | null; +// @public +export function getLocaleCurrencyName(locale: string): string | null; -export declare function getLocaleCurrencySymbol(locale: string): string | null; +// @public +export function getLocaleCurrencySymbol(locale: string): string | null; -export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string; +// @public +export function getLocaleDateFormat(locale: string, width: FormatWidth): string; -export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string; +// @public +export function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string; -export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray; +// @public +export function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray; -export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>; +// @public +export function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>; -export declare function getLocaleDirection(locale: string): 'ltr' | 'rtl'; +// @public +export function getLocaleDirection(locale: string): 'ltr' | 'rtl'; -export declare function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>; +// @public +export function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>; -export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[]; +// @public +export function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[]; -export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[]; +// @public +export function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[]; -export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay; +// @public +export function getLocaleFirstDayOfWeek(locale: string): WeekDay; -export declare function getLocaleId(locale: string): string; +// @public +export function getLocaleId(locale: string): string; -export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray; +// @public +export function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray; -export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string; +// @public +export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string; -export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string; +// @public +export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string; -export declare const getLocalePluralCase: (locale: string) => ((value: number) => Plural); +// @public +export const getLocalePluralCase: (locale: string) => ((value: number) => Plural); -export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string; +// @public +export function getLocaleTimeFormat(locale: string, width: FormatWidth): string; -export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay]; +// @public +export function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay]; -export declare function getNumberOfCurrencyDigits(code: string): number; +// @public +export function getNumberOfCurrencyDigits(code: string): number; -export declare class HashLocationStrategy extends LocationStrategy implements OnDestroy { +// @public +export class HashLocationStrategy extends LocationStrategy implements OnDestroy { constructor(_platformLocation: PlatformLocation, _baseHref?: string); + // (undocumented) back(): void; + // (undocumented) forward(): void; + // (undocumented) getBaseHref(): string; + // (undocumented) historyGo(relativePosition?: number): void; + // (undocumented) ngOnDestroy(): void; + // (undocumented) onPopState(fn: LocationChangeListener): void; + // (undocumented) path(includeHash?: boolean): string; + // (undocumented) prepareExternalUrl(internal: string): string; + // (undocumented) pushState(state: any, title: string, path: string, queryParams: string): void; + // (undocumented) replaceState(state: any, title: string, path: string, queryParams: string): void; } -export declare class I18nPluralPipe implements PipeTransform { +// @public +export class I18nPluralPipe implements PipeTransform { constructor(_localization: NgLocalization); + // (undocumented) transform(value: number | null | undefined, pluralMap: { [count: string]: string; }, locale?: string): string; } -export declare class I18nSelectPipe implements PipeTransform { +// @public +export class I18nSelectPipe implements PipeTransform { + // (undocumented) transform(value: string | null | undefined, mapping: { [key: string]: string; }): string; } -export declare function isPlatformBrowser(platformId: Object): boolean; +// @public +export function isPlatformBrowser(platformId: Object): boolean; -export declare function isPlatformServer(platformId: Object): boolean; +// @public +export function isPlatformServer(platformId: Object): boolean; -export declare function isPlatformWorkerApp(platformId: Object): boolean; +// @public +export function isPlatformWorkerApp(platformId: Object): boolean; -export declare function isPlatformWorkerUi(platformId: Object): boolean; +// @public +export function isPlatformWorkerUi(platformId: Object): boolean; -export declare class JsonPipe implements PipeTransform { +// @public +export class JsonPipe implements PipeTransform { + // (undocumented) transform(value: any): string; } -export declare interface KeyValue { +// @public +export interface KeyValue { + // (undocumented) key: K; + // (undocumented) value: V; } -export declare class KeyValuePipe implements PipeTransform { +// @public +export class KeyValuePipe implements PipeTransform { constructor(differs: KeyValueDiffers); + // (undocumented) transform(input: ReadonlyMap, compareFn?: (a: KeyValue, b: KeyValue) => number): Array>; + // (undocumented) transform(input: Record, compareFn?: (a: KeyValue, b: KeyValue) => number): Array>; + // (undocumented) transform(input: Record | ReadonlyMap, compareFn?: (a: KeyValue, b: KeyValue) => number): Array>; + // (undocumented) transform(input: null | undefined, compareFn?: (a: KeyValue, b: KeyValue) => number): null; + // (undocumented) transform(input: ReadonlyMap | null | undefined, compareFn?: (a: KeyValue, b: KeyValue) => number): Array> | null; + // (undocumented) transform(input: Record | null | undefined, compareFn?: (a: KeyValue, b: KeyValue) => number): Array> | null; + // (undocumented) transform(input: Record | ReadonlyMap | null | undefined, compareFn?: (a: KeyValue, b: KeyValue) => number): Array> | null; } -export declare class Location { +// @public +export class Location { constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation); back(): void; forward(): void; @@ -159,286 +270,434 @@ export declare class Location { go(path: string, query?: string, state?: any): void; historyGo(relativePosition?: number): void; isCurrentPathEqualTo(path: string, query?: string): boolean; + static joinWithSlash: (start: string, end: string) => string; normalize(url: string): string; + static normalizeQueryParams: (params: string) => string; onUrlChange(fn: (url: string, state: unknown) => void): void; path(includeHash?: boolean): string; prepareExternalUrl(url: string): string; replaceState(path: string, query?: string, state?: any): void; - subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike; - static joinWithSlash: (start: string, end: string) => string; - static normalizeQueryParams: (params: string) => string; static stripTrailingSlash: (url: string) => string; + subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike; } -export declare const LOCATION_INITIALIZED: InjectionToken>; +// @public +export const LOCATION_INITIALIZED: InjectionToken>; -export declare interface LocationChangeEvent { +// @public +export interface LocationChangeEvent { + // (undocumented) state: any; + // (undocumented) type: string; } -export declare interface LocationChangeListener { +// @public (undocumented) +export interface LocationChangeListener { + // (undocumented) (event: LocationChangeEvent): any; } -export declare abstract class LocationStrategy { +// @public +export abstract class LocationStrategy { + // (undocumented) abstract back(): void; + // (undocumented) abstract forward(): void; + // (undocumented) abstract getBaseHref(): string; + // (undocumented) historyGo?(relativePosition: number): void; + // (undocumented) abstract onPopState(fn: LocationChangeListener): void; + // (undocumented) abstract path(includeHash?: boolean): string; + // (undocumented) abstract prepareExternalUrl(internal: string): string; + // (undocumented) abstract pushState(state: any, title: string, url: string, queryParams: string): void; + // (undocumented) abstract replaceState(state: any, title: string, url: string, queryParams: string): void; } -export declare class LowerCasePipe implements PipeTransform { +// @public +export class LowerCasePipe implements PipeTransform { + // (undocumented) transform(value: string): string; + // (undocumented) transform(value: null | undefined): null; + // (undocumented) transform(value: string | null | undefined): string | null; } -export declare class NgClass implements DoCheck { +// @public +export class NgClass implements DoCheck { + constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2); + // (undocumented) set klass(value: string); + // (undocumented) set ngClass(value: string | string[] | Set | { [klass: string]: any; }); - constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2); + // (undocumented) ngDoCheck(): void; -} + } -export declare class NgComponentOutlet implements OnChanges, OnDestroy { - ngComponentOutlet: Type; - ngComponentOutletContent: any[][]; - ngComponentOutletInjector: Injector; - ngComponentOutletNgModuleFactory: NgModuleFactory; +// @public +export class NgComponentOutlet implements OnChanges, OnDestroy { constructor(_viewContainerRef: ViewContainerRef); + // (undocumented) + ngComponentOutlet: Type; + // (undocumented) + ngComponentOutletContent: any[][]; + // (undocumented) + ngComponentOutletInjector: Injector; + // (undocumented) + ngComponentOutletNgModuleFactory: NgModuleFactory; + // (undocumented) ngOnChanges(changes: SimpleChanges): void; + // (undocumented) ngOnDestroy(): void; -} + } -export declare class NgForOf = NgIterable> implements DoCheck { +// @public +export class NgForOf = NgIterable> implements DoCheck { + constructor(_viewContainer: ViewContainerRef, _template: TemplateRef>, _differs: IterableDiffers); + ngDoCheck(): void; set ngForOf(ngForOf: U & NgIterable | undefined | null); set ngForTemplate(value: TemplateRef>); set ngForTrackBy(fn: TrackByFunction); + // (undocumented) get ngForTrackBy(): TrackByFunction; - constructor(_viewContainer: ViewContainerRef, _template: TemplateRef>, _differs: IterableDiffers); - ngDoCheck(): void; static ngTemplateContextGuard>(dir: NgForOf, ctx: any): ctx is NgForOfContext; -} + } -export declare class NgForOfContext = NgIterable> { +// @public (undocumented) +export class NgForOfContext = NgIterable> { + // (undocumented) $implicit: T; - count: number; - get even(): boolean; - get first(): boolean; - index: number; - get last(): boolean; - ngForOf: U; - get odd(): boolean; constructor($implicit: T, ngForOf: U, index: number, count: number); + // (undocumented) + count: number; + // (undocumented) + get even(): boolean; + // (undocumented) + get first(): boolean; + // (undocumented) + index: number; + // (undocumented) + get last(): boolean; + // (undocumented) + ngForOf: U; + // (undocumented) + get odd(): boolean; } -export declare class NgIf { +// @public +export class NgIf { + constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef>); set ngIf(condition: T); set ngIfElse(templateRef: TemplateRef> | null); set ngIfThen(templateRef: TemplateRef> | null); - constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef>); - static ngTemplateGuard_ngIf: 'binding'; static ngTemplateContextGuard(dir: NgIf, ctx: any): ctx is NgIfContext>; -} + static ngTemplateGuard_ngIf: 'binding'; + } -export declare class NgIfContext { +// @public (undocumented) +export class NgIfContext { + // (undocumented) $implicit: T; + // (undocumented) ngIf: T; } -export declare class NgLocaleLocalization extends NgLocalization { - protected locale: string; +// @public +export class NgLocaleLocalization extends NgLocalization { constructor(locale: string); + // (undocumented) getPluralCategory(value: any, locale?: string): string; + // (undocumented) + protected locale: string; } -export declare abstract class NgLocalization { +// @public (undocumented) +export abstract class NgLocalization { + // (undocumented) abstract getPluralCategory(value: any, locale?: string): string; } -export declare class NgPlural { - set ngPlural(value: number); +// @public +export class NgPlural { constructor(_localization: NgLocalization); + // (undocumented) addCase(value: string, switchView: SwitchView): void; -} + // (undocumented) + set ngPlural(value: number); + } -export declare class NgPluralCase { - value: string; +// @public +export class NgPluralCase { constructor(value: string, template: TemplateRef, viewContainer: ViewContainerRef, ngPlural: NgPlural); + // (undocumented) + value: string; } -export declare class NgStyle implements DoCheck { +// @public +export class NgStyle implements DoCheck { + constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2); + // (undocumented) + ngDoCheck(): void; + // (undocumented) set ngStyle(values: { [klass: string]: any; } | null); - constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2); - ngDoCheck(): void; -} + } -export declare class NgSwitch { +// @public +export class NgSwitch { + // (undocumented) set ngSwitch(newValue: any); -} + } -export declare class NgSwitchCase implements DoCheck { - ngSwitchCase: any; +// @public +export class NgSwitchCase implements DoCheck { constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); ngDoCheck(): void; -} + ngSwitchCase: any; + } -export declare class NgSwitchDefault { +// @public +export class NgSwitchDefault { constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, ngSwitch: NgSwitch); } -export declare class NgTemplateOutlet implements OnChanges { +// @public +export class NgTemplateOutlet implements OnChanges { + constructor(_viewContainerRef: ViewContainerRef); + // (undocumented) + ngOnChanges(changes: SimpleChanges): void; ngTemplateOutlet: TemplateRef | null; ngTemplateOutletContext: Object | null; - constructor(_viewContainerRef: ViewContainerRef); - ngOnChanges(changes: SimpleChanges): void; -} + } -export declare enum NumberFormatStyle { - Decimal = 0, - Percent = 1, +// @public +export enum NumberFormatStyle { + // (undocumented) Currency = 2, + // (undocumented) + Decimal = 0, + // (undocumented) + Percent = 1, + // (undocumented) Scientific = 3 } -export declare enum NumberSymbol { - Decimal = 0, - Group = 1, - List = 2, - PercentSign = 3, - PlusSign = 4, - MinusSign = 5, - Exponential = 6, - SuperscriptingExponent = 7, - PerMille = 8, - Infinity = 9, - NaN = 10, - TimeSeparator = 11, +// @public +export enum NumberSymbol { CurrencyDecimal = 12, - CurrencyGroup = 13 + CurrencyGroup = 13, + Decimal = 0, + Exponential = 6, + Group = 1, + Infinity = 9, + List = 2, + MinusSign = 5, + NaN = 10, + PercentSign = 3, + PerMille = 8, + PlusSign = 4, + SuperscriptingExponent = 7, + TimeSeparator = 11 } -export declare class PathLocationStrategy extends LocationStrategy implements OnDestroy { +// @public +export class PathLocationStrategy extends LocationStrategy implements OnDestroy { constructor(_platformLocation: PlatformLocation, href?: string); + // (undocumented) back(): void; + // (undocumented) forward(): void; + // (undocumented) getBaseHref(): string; + // (undocumented) historyGo(relativePosition?: number): void; + // (undocumented) ngOnDestroy(): void; + // (undocumented) onPopState(fn: LocationChangeListener): void; + // (undocumented) path(includeHash?: boolean): string; + // (undocumented) prepareExternalUrl(internal: string): string; + // (undocumented) pushState(state: any, title: string, url: string, queryParams: string): void; + // (undocumented) replaceState(state: any, title: string, url: string, queryParams: string): void; } -export declare class PercentPipe implements PipeTransform { +// @public +export class PercentPipe implements PipeTransform { constructor(_locale: string); + // (undocumented) transform(value: number | string, digitsInfo?: string, locale?: string): string | null; + // (undocumented) transform(value: null | undefined, digitsInfo?: string, locale?: string): null; + // (undocumented) transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null; } -export declare abstract class PlatformLocation { - abstract get hash(): string; - abstract get hostname(): string; - abstract get href(): string; - abstract get pathname(): string; - abstract get port(): string; - abstract get protocol(): string; - abstract get search(): string; +// @public +export abstract class PlatformLocation { + // (undocumented) abstract back(): void; + // (undocumented) abstract forward(): void; + // (undocumented) abstract getBaseHrefFromDOM(): string; + // (undocumented) abstract getState(): unknown; + // (undocumented) + abstract get hash(): string; + // (undocumented) historyGo?(relativePosition: number): void; + // (undocumented) + abstract get hostname(): string; + // (undocumented) + abstract get href(): string; abstract onHashChange(fn: LocationChangeListener): VoidFunction; abstract onPopState(fn: LocationChangeListener): VoidFunction; + // (undocumented) + abstract get pathname(): string; + // (undocumented) + abstract get port(): string; + // (undocumented) + abstract get protocol(): string; + // (undocumented) abstract pushState(state: any, title: string, url: string): void; + // (undocumented) abstract replaceState(state: any, title: string, url: string): void; + // (undocumented) + abstract get search(): string; } -export declare enum Plural { - Zero = 0, - One = 1, - Two = 2, +// @public +export enum Plural { + // (undocumented) Few = 3, + // (undocumented) Many = 4, - Other = 5 + // (undocumented) + One = 1, + // (undocumented) + Other = 5, + // (undocumented) + Two = 2, + // (undocumented) + Zero = 0 } -export declare interface PopStateEvent { +// @public (undocumented) +export interface PopStateEvent { + // (undocumented) pop?: boolean; + // (undocumented) state?: any; + // (undocumented) type?: string; + // (undocumented) url?: string; } -export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void; +// @public +export function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void; -export declare class SlicePipe implements PipeTransform { +// @public +export class SlicePipe implements PipeTransform { + // (undocumented) transform(value: ReadonlyArray, start: number, end?: number): Array; + // (undocumented) transform(value: null | undefined, start: number, end?: number): null; + // (undocumented) transform(value: ReadonlyArray | null | undefined, start: number, end?: number): Array | null; + // (undocumented) transform(value: string, start: number, end?: number): string; + // (undocumented) transform(value: string | null | undefined, start: number, end?: number): string | null; } -export declare type Time = { +// @public +export type Time = { hours: number; minutes: number; }; -export declare class TitleCasePipe implements PipeTransform { +// @public +export class TitleCasePipe implements PipeTransform { + // (undocumented) transform(value: string): string; + // (undocumented) transform(value: null | undefined): null; + // (undocumented) transform(value: string | null | undefined): string | null; } -export declare enum TranslationWidth { - Narrow = 0, +// @public +export enum TranslationWidth { Abbreviated = 1, - Wide = 2, - Short = 3 + Narrow = 0, + Short = 3, + Wide = 2 } -export declare class UpperCasePipe implements PipeTransform { +// @public +export class UpperCasePipe implements PipeTransform { + // (undocumented) transform(value: string): string; + // (undocumented) transform(value: null | undefined): null; + // (undocumented) transform(value: string | null | undefined): string | null; } -export declare const VERSION: Version; +// @public (undocumented) +export const VERSION: Version; -export declare abstract class ViewportScroller { +// @public +export abstract class ViewportScroller { abstract getScrollPosition(): [number, number]; abstract scrollToAnchor(anchor: string): void; abstract scrollToPosition(position: [number, number]): void; abstract setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void; abstract setOffset(offset: [number, number] | (() => [number, number])): void; + // (undocumented) static ɵprov: unknown; } -export declare enum WeekDay { - Sunday = 0, - Monday = 1, - Tuesday = 2, - Wednesday = 3, - Thursday = 4, +// @public +export enum WeekDay { + // (undocumented) Friday = 5, - Saturday = 6 + // (undocumented) + Monday = 1, + // (undocumented) + Saturday = 6, + // (undocumented) + Sunday = 0, + // (undocumented) + Thursday = 4, + // (undocumented) + Tuesday = 2, + // (undocumented) + Wednesday = 3 } -export declare abstract class XhrFactory { +// @public +export abstract class XhrFactory { + // (undocumented) abstract build(): XMLHttpRequest; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/common/http/http.d.ts b/goldens/public-api/common/http/http.md similarity index 93% rename from goldens/public-api/common/http/http.d.ts rename to goldens/public-api/common/http/http.md index 2eaea73e0a4..79f4fe37405 100644 --- a/goldens/public-api/common/http/http.d.ts +++ b/goldens/public-api/common/http/http.md @@ -1,10 +1,25 @@ -export declare const HTTP_INTERCEPTORS: InjectionToken; +## API Report File for "@angular/common_http" -export declare abstract class HttpBackend implements HttpHandler { +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { InjectionToken } from '@angular/core'; +import { ModuleWithProviders } from '@angular/core'; +import { Observable } from 'rxjs'; +import { XhrFactory as XhrFactory_2 } from '@angular/common'; + +// @public +export const HTTP_INTERCEPTORS: InjectionToken; + +// @public +export abstract class HttpBackend implements HttpHandler { + // (undocumented) abstract handle(req: HttpRequest): Observable>; } -export declare class HttpClient { +// @public +export class HttpClient { constructor(handler: HttpHandler); delete(url: string, options: { headers?: HttpHeaders | { @@ -1615,13 +1630,16 @@ export declare class HttpClient { }): Observable; } -export declare class HttpClientJsonpModule { +// @public +export class HttpClientJsonpModule { } -export declare class HttpClientModule { +// @public +export class HttpClientModule { } -export declare class HttpClientXsrfModule { +// @public +export class HttpClientXsrfModule { static disable(): ModuleWithProviders; static withOptions(options?: { cookieName?: string; @@ -1629,28 +1647,31 @@ export declare class HttpClientXsrfModule { }): ModuleWithProviders; } -export declare class HttpContext { +// @public +export class HttpContext { delete(token: HttpContextToken): HttpContext; get(token: HttpContextToken): T; + // (undocumented) keys(): IterableIterator>; set(token: HttpContextToken, value: T): HttpContext; } -export declare class HttpContextToken { - readonly defaultValue: () => T; +// @public +export class HttpContextToken { constructor(defaultValue: () => T); + // (undocumented) + readonly defaultValue: () => T; } -export declare interface HttpDownloadProgressEvent extends HttpProgressEvent { +// @public +export interface HttpDownloadProgressEvent extends HttpProgressEvent { partialText?: string; + // (undocumented) type: HttpEventType.DownloadProgress; } -export declare class HttpErrorResponse extends HttpResponseBase implements Error { - readonly error: any | null; - readonly message: string; - readonly name = "HttpErrorResponse"; - readonly ok = false; +// @public +export class HttpErrorResponse extends HttpResponseBase implements Error { constructor(init: { error?: any; headers?: HttpHeaders; @@ -1658,25 +1679,36 @@ export declare class HttpErrorResponse extends HttpResponseBase implements Error statusText?: string; url?: string; }); + // (undocumented) + readonly error: any | null; + // (undocumented) + readonly message: string; + // (undocumented) + readonly name = "HttpErrorResponse"; + readonly ok = false; } -export declare type HttpEvent = HttpSentEvent | HttpHeaderResponse | HttpResponse | HttpProgressEvent | HttpUserEvent; +// @public +export type HttpEvent = HttpSentEvent | HttpHeaderResponse | HttpResponse | HttpProgressEvent | HttpUserEvent; -export declare enum HttpEventType { - Sent = 0, - UploadProgress = 1, - ResponseHeader = 2, +// @public +export enum HttpEventType { DownloadProgress = 3, Response = 4, + ResponseHeader = 2, + Sent = 0, + UploadProgress = 1, User = 5 } -export declare abstract class HttpHandler { +// @public +export abstract class HttpHandler { + // (undocumented) abstract handle(req: HttpRequest): Observable>; } -export declare class HttpHeaderResponse extends HttpResponseBase { - readonly type: HttpEventType.ResponseHeader; +// @public +export class HttpHeaderResponse extends HttpResponseBase { constructor(init?: { headers?: HttpHeaders; status?: number; @@ -1689,9 +1721,12 @@ export declare class HttpHeaderResponse extends HttpResponseBase { statusText?: string; url?: string; }): HttpHeaderResponse; + // (undocumented) + readonly type: HttpEventType.ResponseHeader; } -export declare class HttpHeaders { +// @public +export class HttpHeaders { constructor(headers?: string | { [name: string]: string | string[]; }); @@ -1704,18 +1739,25 @@ export declare class HttpHeaders { set(name: string, value: string | string[]): HttpHeaders; } -export declare interface HttpInterceptor { +// @public +export interface HttpInterceptor { intercept(req: HttpRequest, next: HttpHandler): Observable>; } -export declare interface HttpParameterCodec { +// @public +export interface HttpParameterCodec { + // (undocumented) decodeKey(key: string): string; + // (undocumented) decodeValue(value: string): string; + // (undocumented) encodeKey(key: string): string; + // (undocumented) encodeValue(value: string): string; } -export declare class HttpParams { +// @public +export class HttpParams { constructor(options?: HttpParamsOptions); append(param: string, value: string | number | boolean): HttpParams; appendAll(params: { @@ -1728,9 +1770,10 @@ export declare class HttpParams { keys(): string[]; set(param: string, value: string | number | boolean): HttpParams; toString(): string; -} + } -export declare interface HttpParamsOptions { +// @public +export interface HttpParamsOptions { encoder?: HttpParameterCodec; fromObject?: { [param: string]: string | number | boolean | ReadonlyArray; @@ -1738,23 +1781,15 @@ export declare interface HttpParamsOptions { fromString?: string; } -export declare interface HttpProgressEvent { +// @public +export interface HttpProgressEvent { loaded: number; total?: number; type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress; } -export declare class HttpRequest { - readonly body: T | null; - readonly context: HttpContext; - readonly headers: HttpHeaders; - readonly method: string; - readonly params: HttpParams; - readonly reportProgress: boolean; - readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text'; - readonly url: string; - readonly urlWithParams: string; - readonly withCredentials: boolean; +// @public +export class HttpRequest { constructor(method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS', url: string, init?: { headers?: HttpHeaders; context?: HttpContext; @@ -1779,7 +1814,10 @@ export declare class HttpRequest { responseType?: 'arraybuffer' | 'blob' | 'json' | 'text'; withCredentials?: boolean; }); + readonly body: T | null; + // (undocumented) clone(): HttpRequest; + // (undocumented) clone(update: { headers?: HttpHeaders; context?: HttpContext; @@ -1797,6 +1835,7 @@ export declare class HttpRequest { [param: string]: string; }; }): HttpRequest; + // (undocumented) clone(update: { headers?: HttpHeaders; context?: HttpContext; @@ -1814,13 +1853,22 @@ export declare class HttpRequest { [param: string]: string; }; }): HttpRequest; + readonly context: HttpContext; detectContentTypeHeader(): string | null; + readonly headers: HttpHeaders; + readonly method: string; + readonly params: HttpParams; + readonly reportProgress: boolean; + readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text'; serializeBody(): ArrayBuffer | Blob | FormData | string | null; + // (undocumented) + readonly url: string; + readonly urlWithParams: string; + readonly withCredentials: boolean; } -export declare class HttpResponse extends HttpResponseBase { - readonly body: T | null; - readonly type: HttpEventType.Response; +// @public +export class HttpResponse extends HttpResponseBase { constructor(init?: { body?: T | null; headers?: HttpHeaders; @@ -1828,13 +1876,17 @@ export declare class HttpResponse extends HttpResponseBase { statusText?: string; url?: string; }); + readonly body: T | null; + // (undocumented) clone(): HttpResponse; + // (undocumented) clone(update: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; }): HttpResponse; + // (undocumented) clone(update: { body?: V | null; headers?: HttpHeaders; @@ -1842,126 +1894,212 @@ export declare class HttpResponse extends HttpResponseBase { statusText?: string; url?: string; }): HttpResponse; + // (undocumented) + readonly type: HttpEventType.Response; } -export declare abstract class HttpResponseBase { - readonly headers: HttpHeaders; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly type: HttpEventType.Response | HttpEventType.ResponseHeader; - readonly url: string | null; +// @public +export abstract class HttpResponseBase { constructor(init: { headers?: HttpHeaders; status?: number; statusText?: string; url?: string; }, defaultStatus?: number, defaultStatusText?: string); + readonly headers: HttpHeaders; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly type: HttpEventType.Response | HttpEventType.ResponseHeader; + readonly url: string | null; } -export declare interface HttpSentEvent { +// @public +export interface HttpSentEvent { + // (undocumented) type: HttpEventType.Sent; } -export declare const enum HttpStatusCode { - Continue = 100, - SwitchingProtocols = 101, - Processing = 102, - EarlyHints = 103, - Ok = 200, - Created = 201, +// @public +export const enum HttpStatusCode { + // (undocumented) Accepted = 202, - NonAuthoritativeInformation = 203, - NoContent = 204, - ResetContent = 205, - PartialContent = 206, - MultiStatus = 207, + // (undocumented) AlreadyReported = 208, - ImUsed = 226, - MultipleChoices = 300, - MovedPermanently = 301, - Found = 302, - SeeOther = 303, - NotModified = 304, - UseProxy = 305, - Unused = 306, - TemporaryRedirect = 307, - PermanentRedirect = 308, - BadRequest = 400, - Unauthorized = 401, - PaymentRequired = 402, - Forbidden = 403, - NotFound = 404, - MethodNotAllowed = 405, - NotAcceptable = 406, - ProxyAuthenticationRequired = 407, - RequestTimeout = 408, - Conflict = 409, - Gone = 410, - LengthRequired = 411, - PreconditionFailed = 412, - PayloadTooLarge = 413, - UriTooLong = 414, - UnsupportedMediaType = 415, - RangeNotSatisfiable = 416, - ExpectationFailed = 417, - ImATeapot = 418, - MisdirectedRequest = 421, - UnprocessableEntity = 422, - Locked = 423, - FailedDependency = 424, - TooEarly = 425, - UpgradeRequired = 426, - PreconditionRequired = 428, - TooManyRequests = 429, - RequestHeaderFieldsTooLarge = 431, - UnavailableForLegalReasons = 451, - InternalServerError = 500, - NotImplemented = 501, + // (undocumented) BadGateway = 502, - ServiceUnavailable = 503, + // (undocumented) + BadRequest = 400, + // (undocumented) + Conflict = 409, + // (undocumented) + Continue = 100, + // (undocumented) + Created = 201, + // (undocumented) + EarlyHints = 103, + // (undocumented) + ExpectationFailed = 417, + // (undocumented) + FailedDependency = 424, + // (undocumented) + Forbidden = 403, + // (undocumented) + Found = 302, + // (undocumented) GatewayTimeout = 504, + // (undocumented) + Gone = 410, + // (undocumented) HttpVersionNotSupported = 505, - VariantAlsoNegotiates = 506, + // (undocumented) + ImATeapot = 418, + // (undocumented) + ImUsed = 226, + // (undocumented) InsufficientStorage = 507, + // (undocumented) + InternalServerError = 500, + // (undocumented) + LengthRequired = 411, + // (undocumented) + Locked = 423, + // (undocumented) LoopDetected = 508, + // (undocumented) + MethodNotAllowed = 405, + // (undocumented) + MisdirectedRequest = 421, + // (undocumented) + MovedPermanently = 301, + // (undocumented) + MultipleChoices = 300, + // (undocumented) + MultiStatus = 207, + // (undocumented) + NetworkAuthenticationRequired = 511, + // (undocumented) + NoContent = 204, + // (undocumented) + NonAuthoritativeInformation = 203, + // (undocumented) + NotAcceptable = 406, + // (undocumented) NotExtended = 510, - NetworkAuthenticationRequired = 511 + // (undocumented) + NotFound = 404, + // (undocumented) + NotImplemented = 501, + // (undocumented) + NotModified = 304, + // (undocumented) + Ok = 200, + // (undocumented) + PartialContent = 206, + // (undocumented) + PayloadTooLarge = 413, + // (undocumented) + PaymentRequired = 402, + // (undocumented) + PermanentRedirect = 308, + // (undocumented) + PreconditionFailed = 412, + // (undocumented) + PreconditionRequired = 428, + // (undocumented) + Processing = 102, + // (undocumented) + ProxyAuthenticationRequired = 407, + // (undocumented) + RangeNotSatisfiable = 416, + // (undocumented) + RequestHeaderFieldsTooLarge = 431, + // (undocumented) + RequestTimeout = 408, + // (undocumented) + ResetContent = 205, + // (undocumented) + SeeOther = 303, + // (undocumented) + ServiceUnavailable = 503, + // (undocumented) + SwitchingProtocols = 101, + // (undocumented) + TemporaryRedirect = 307, + // (undocumented) + TooEarly = 425, + // (undocumented) + TooManyRequests = 429, + // (undocumented) + Unauthorized = 401, + // (undocumented) + UnavailableForLegalReasons = 451, + // (undocumented) + UnprocessableEntity = 422, + // (undocumented) + UnsupportedMediaType = 415, + // (undocumented) + Unused = 306, + // (undocumented) + UpgradeRequired = 426, + // (undocumented) + UriTooLong = 414, + // (undocumented) + UseProxy = 305, + // (undocumented) + VariantAlsoNegotiates = 506 } -export declare interface HttpUploadProgressEvent extends HttpProgressEvent { +// @public +export interface HttpUploadProgressEvent extends HttpProgressEvent { + // (undocumented) type: HttpEventType.UploadProgress; } -export declare class HttpUrlEncodingCodec implements HttpParameterCodec { +// @public +export class HttpUrlEncodingCodec implements HttpParameterCodec { decodeKey(key: string): string; decodeValue(value: string): string; encodeKey(key: string): string; encodeValue(value: string): string; } -export declare interface HttpUserEvent { +// @public +export interface HttpUserEvent { + // (undocumented) type: HttpEventType.User; } -export declare class HttpXhrBackend implements HttpBackend { +// @public +export class HttpXhrBackend implements HttpBackend { constructor(xhrFactory: XhrFactory_2); handle(req: HttpRequest): Observable>; -} + } -export declare abstract class HttpXsrfTokenExtractor { +// @public +export abstract class HttpXsrfTokenExtractor { abstract getToken(): string | null; } -export declare class JsonpClientBackend implements HttpBackend { +// @public +export class JsonpClientBackend implements HttpBackend { constructor(callbackMap: ɵangular_packages_common_http_http_b, document: any); handle(req: HttpRequest): Observable>; -} + } -export declare class JsonpInterceptor { +// @public +export class JsonpInterceptor { constructor(jsonp: JsonpClientBackend); intercept(req: HttpRequest, next: HttpHandler): Observable>; -} + } -/** @deprecated */ -export declare type XhrFactory = XhrFactory_2; +// @public @deprecated +export type XhrFactory = XhrFactory_2; + +// @public @deprecated +export const XhrFactory: typeof XhrFactory_2; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/common/http/testing/testing.d.ts b/goldens/public-api/common/http/testing/testing.md similarity index 71% rename from goldens/public-api/common/http/testing/testing.d.ts rename to goldens/public-api/common/http/testing/testing.md index 8143ffd6a03..da8cb5ecd0e 100644 --- a/goldens/public-api/common/http/testing/testing.d.ts +++ b/goldens/public-api/common/http/testing/testing.md @@ -1,7 +1,20 @@ -export declare class HttpClientTestingModule { +## API Report File for "@angular/common_http_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { HttpEvent } from '@angular/common/http'; +import { HttpHeaders } from '@angular/common/http'; +import { HttpRequest } from '@angular/common/http'; +import { Observer } from 'rxjs'; + +// @public +export class HttpClientTestingModule { } -export declare abstract class HttpTestingController { +// @public +export abstract class HttpTestingController { abstract expectNone(url: string, description?: string): void; abstract expectNone(params: RequestMatch, description?: string): void; abstract expectNone(matchFn: ((req: HttpRequest) => boolean), description?: string): void; @@ -16,15 +29,18 @@ export declare abstract class HttpTestingController { }): void; } -export declare interface RequestMatch { +// @public +export interface RequestMatch { + // (undocumented) method?: string; + // (undocumented) url?: string; } -export declare class TestRequest { - get cancelled(): boolean; - request: HttpRequest; +// @public +export class TestRequest { constructor(request: HttpRequest, observer: Observer>); + get cancelled(): boolean; error(error: ErrorEvent, opts?: { headers?: HttpHeaders | { [name: string]: string | string[]; @@ -40,4 +56,11 @@ export declare class TestRequest { status?: number; statusText?: string; }): void; + // (undocumented) + request: HttpRequest; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/common/testing/testing.d.ts b/goldens/public-api/common/testing/testing.md similarity index 51% rename from goldens/public-api/common/testing/testing.d.ts rename to goldens/public-api/common/testing/testing.md index 5d4b193bb46..98bda235c1f 100644 --- a/goldens/public-api/common/testing/testing.d.ts +++ b/goldens/public-api/common/testing/testing.md @@ -1,66 +1,140 @@ -export declare const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken; +## API Report File for "@angular/common_testing" -export declare class MockLocationStrategy extends LocationStrategy { - internalBaseHref: string; - internalPath: string; - internalTitle: string; - urlChanges: string[]; +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { InjectionToken } from '@angular/core'; +import { Location } from '@angular/common'; +import { LocationChangeListener } from '@angular/common'; +import { LocationStrategy } from '@angular/common'; +import { PlatformLocation } from '@angular/common'; +import { SubscriptionLike } from 'rxjs'; + +// @public +export const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken; + +// @public +export class MockLocationStrategy extends LocationStrategy { constructor(); + // (undocumented) back(): void; + // (undocumented) forward(): void; + // (undocumented) getBaseHref(): string; + // (undocumented) getState(): unknown; + // (undocumented) + internalBaseHref: string; + // (undocumented) + internalPath: string; + // (undocumented) + internalTitle: string; + // (undocumented) onPopState(fn: (value: any) => void): void; + // (undocumented) path(includeHash?: boolean): string; + // (undocumented) prepareExternalUrl(internal: string): string; + // (undocumented) pushState(ctx: any, title: string, path: string, query: string): void; + // (undocumented) replaceState(ctx: any, title: string, path: string, query: string): void; + // (undocumented) simulatePopState(url: string): void; + // (undocumented) + urlChanges: string[]; } -export declare class MockPlatformLocation implements PlatformLocation { - get hash(): string; - get hostname(): string; - get href(): string; - get pathname(): string; - get port(): string; - get protocol(): string; - get search(): string; - get state(): unknown; - get url(): string; +// @public +export class MockPlatformLocation implements PlatformLocation { constructor(config?: MockPlatformLocationConfig); + // (undocumented) back(): void; + // (undocumented) forward(): void; + // (undocumented) getBaseHrefFromDOM(): string; + // (undocumented) getState(): unknown; + // (undocumented) + get hash(): string; + // (undocumented) historyGo(relativePosition?: number): void; + // (undocumented) + get hostname(): string; + // (undocumented) + get href(): string; + // (undocumented) onHashChange(fn: LocationChangeListener): VoidFunction; + // (undocumented) onPopState(fn: LocationChangeListener): VoidFunction; + // (undocumented) + get pathname(): string; + // (undocumented) + get port(): string; + // (undocumented) + get protocol(): string; + // (undocumented) pushState(state: any, title: string, newUrl: string): void; + // (undocumented) replaceState(state: any, title: string, newUrl: string): void; -} + // (undocumented) + get search(): string; + // (undocumented) + get state(): unknown; + // (undocumented) + get url(): string; + } -export declare interface MockPlatformLocationConfig { +// @public +export interface MockPlatformLocationConfig { + // (undocumented) appBaseHref?: string; + // (undocumented) startUrl?: string; } -export declare class SpyLocation implements Location { - urlChanges: string[]; +// @public +export class SpyLocation implements Location { + // (undocumented) back(): void; + // (undocumented) forward(): void; + // (undocumented) getState(): unknown; + // (undocumented) go(path: string, query?: string, state?: any): void; + // (undocumented) historyGo(relativePosition?: number): void; + // (undocumented) isCurrentPathEqualTo(path: string, query?: string): boolean; + // (undocumented) normalize(url: string): string; + // (undocumented) onUrlChange(fn: (url: string, state: unknown) => void): void; + // (undocumented) path(): string; + // (undocumented) prepareExternalUrl(url: string): string; + // (undocumented) replaceState(path: string, query?: string, state?: any): void; + // (undocumented) setBaseHref(url: string): void; + // (undocumented) setInitialPath(url: string): void; + // (undocumented) simulateHashChange(pathname: string): void; + // (undocumented) simulateUrlPop(pathname: string): void; + // (undocumented) subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike; + // (undocumented) + urlChanges: string[]; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/common/upgrade/upgrade.d.ts b/goldens/public-api/common/upgrade/upgrade.md similarity index 70% rename from goldens/public-api/common/upgrade/upgrade.d.ts rename to goldens/public-api/common/upgrade/upgrade.md index 5176998e005..1d9213764bb 100644 --- a/goldens/public-api/common/upgrade/upgrade.d.ts +++ b/goldens/public-api/common/upgrade/upgrade.md @@ -1,13 +1,29 @@ -export declare class $locationShim { - constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); +## API Report File for "@angular/common_upgrade" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { InjectionToken } from '@angular/core'; +import { Location } from '@angular/common'; +import { LocationStrategy } from '@angular/common'; +import { ModuleWithProviders } from '@angular/core'; +import { PlatformLocation } from '@angular/common'; +import { UpgradeModule } from '@angular/upgrade/static'; + +// @public +export class $locationShim { $$parse(url: string): void; $$parseLinkUrl(url: string, relHref?: string | null): boolean; + constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); absUrl(): string; hash(): string; + // (undocumented) hash(hash: string | number | null): this; host(): string; onChange(fn: (url: string, state: unknown, oldUrl: string, oldState: unknown) => void, err?: (e: Error) => void): void; path(): string; + // (undocumented) path(path: string | number | null): this; port(): number | null; protocol(): string; @@ -15,41 +31,57 @@ export declare class $locationShim { search(): { [key: string]: unknown; }; + // (undocumented) search(search: string | number | { [key: string]: unknown; }): this; + // (undocumented) search(search: string | number | { [key: string]: unknown; }, paramValue: null | undefined | string | number | boolean | string[]): this; state(): unknown; + // (undocumented) state(state: unknown): this; url(): string; + // (undocumented) url(url: string): this; -} + } -export declare class $locationShimProvider { - constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); +// @public +export class $locationShimProvider { $get(): $locationShim; + constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy); hashPrefix(prefix?: string): void; html5Mode(mode?: any): void; -} + } -export declare class AngularJSUrlCodec implements UrlCodec { +// @public +export class AngularJSUrlCodec implements UrlCodec { + // (undocumented) areEqual(valA: string, valB: string): boolean; + // (undocumented) decodeHash(hash: string): string; + // (undocumented) decodePath(path: string, html5Mode?: boolean): string; + // (undocumented) decodeSearch(search: string): { [k: string]: unknown; }; + // (undocumented) encodeHash(hash: string): string; + // (undocumented) encodePath(path: string): string; + // (undocumented) encodeSearch(search: string | { [k: string]: unknown; }): string; + // (undocumented) normalize(href: string): string; + // (undocumented) normalize(path: string, search: { [k: string]: unknown; }, hash: string, baseUrl?: string): string; + // (undocumented) parse(url: string, base?: string): { href: string; protocol: string; @@ -62,9 +94,11 @@ export declare class AngularJSUrlCodec implements UrlCodec { }; } -export declare const LOCATION_UPGRADE_CONFIGURATION: InjectionToken; +// @public +export const LOCATION_UPGRADE_CONFIGURATION: InjectionToken; -export declare interface LocationUpgradeConfig { +// @public +export interface LocationUpgradeConfig { appBaseHref?: string; hashPrefix?: string; serverBaseHref?: string; @@ -72,11 +106,14 @@ export declare interface LocationUpgradeConfig { useHash?: boolean; } -export declare class LocationUpgradeModule { +// @public +export class LocationUpgradeModule { + // (undocumented) static config(config?: LocationUpgradeConfig): ModuleWithProviders; } -export declare abstract class UrlCodec { +// @public +export abstract class UrlCodec { abstract areEqual(valA: string, valB: string): boolean; abstract decodeHash(hash: string): string; abstract decodePath(path: string): string; @@ -103,3 +140,8 @@ export declare abstract class UrlCodec { pathname: string; }; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/compiler-cli/compiler_options.d.ts b/goldens/public-api/compiler-cli/compiler_options.md similarity index 83% rename from goldens/public-api/compiler-cli/compiler_options.d.ts rename to goldens/public-api/compiler-cli/compiler_options.md index 2c3fb6bda2d..0ad279085db 100644 --- a/goldens/public-api/compiler-cli/compiler_options.d.ts +++ b/goldens/public-api/compiler-cli/compiler_options.md @@ -1,8 +1,16 @@ +## API Report File for "angular-srcs" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public export interface BazelAndG3Options { annotateForClosureCompiler?: boolean; generateDeepReexports?: boolean; } +// @public export interface I18nOptions { enableI18nLegacyMessageIdFormat?: boolean; i18nInLocale?: string; @@ -13,6 +21,7 @@ export interface I18nOptions { i18nUseExternalIds?: boolean; } +// @public export interface LegacyNgcOptions { allowEmptyCodegenFiles?: boolean; flatModuleId?: string; @@ -22,17 +31,20 @@ export interface LegacyNgcOptions { strictInjectionParameters?: boolean; } +// @public export interface MiscOptions { compileNonExportedClasses?: boolean; disableTypeScriptVersionCheck?: boolean; } +// @public export interface NgcCompatibilityOptions { enableIvy?: boolean | 'ngtsc'; generateNgFactoryShims?: boolean; generateNgSummaryShims?: boolean; } +// @public export interface StrictTemplateOptions { strictAttributeTypes?: boolean; strictContextGenerics?: boolean; @@ -47,6 +59,12 @@ export interface StrictTemplateOptions { strictTemplates?: boolean; } +// @public export interface TargetOptions { compilationMode?: 'full' | 'partial'; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/compiler-cli/error_code.d.ts b/goldens/public-api/compiler-cli/error_code.md similarity index 70% rename from goldens/public-api/compiler-cli/error_code.d.ts rename to goldens/public-api/compiler-cli/error_code.md index 25154c5c608..cdccfd018dc 100644 --- a/goldens/public-api/compiler-cli/error_code.d.ts +++ b/goldens/public-api/compiler-cli/error_code.md @@ -1,45 +1,72 @@ -export declare enum ErrorCode { - DECORATOR_ARG_NOT_LITERAL = 1001, - DECORATOR_ARITY_WRONG = 1002, - DECORATOR_NOT_CALLED = 1003, - DECORATOR_ON_ANONYMOUS_CLASS = 1004, - DECORATOR_UNEXPECTED = 1005, - DECORATOR_COLLISION = 1006, - VALUE_HAS_WRONG_TYPE = 1010, - VALUE_NOT_LITERAL = 1011, - COMPONENT_MISSING_TEMPLATE = 2001, - PIPE_MISSING_NAME = 2002, - PARAM_MISSING_TOKEN = 2003, - DIRECTIVE_MISSING_SELECTOR = 2004, - UNDECORATED_PROVIDER = 2005, - DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006, - UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007, - COMPONENT_RESOURCE_NOT_FOUND = 2008, +## API Report File for "angular-srcs" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export enum ErrorCode { COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009, - SYMBOL_NOT_EXPORTED = 3001, - SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002, - IMPORT_CYCLE_DETECTED = 3003, + // (undocumented) + COMPONENT_MISSING_TEMPLATE = 2001, + COMPONENT_RESOURCE_NOT_FOUND = 2008, + // (undocumented) CONFIG_FLAT_MODULE_NO_INDEX = 4001, + // (undocumented) CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002, + // (undocumented) + DECORATOR_ARG_NOT_LITERAL = 1001, + // (undocumented) + DECORATOR_ARITY_WRONG = 1002, + DECORATOR_COLLISION = 1006, + // (undocumented) + DECORATOR_NOT_CALLED = 1003, + // (undocumented) + DECORATOR_ON_ANONYMOUS_CLASS = 1004, + // (undocumented) + DECORATOR_UNEXPECTED = 1005, + DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006, + // (undocumented) + DIRECTIVE_MISSING_SELECTOR = 2004, + DUPLICATE_VARIABLE_DECLARATION = 8006, HOST_BINDING_PARSE_ERROR = 5001, - TEMPLATE_PARSE_ERROR = 5002, + IMPORT_CYCLE_DETECTED = 3003, + INJECTABLE_DUPLICATE_PROV = 9001, + INLINE_TCB_REQUIRED = 8900, + INLINE_TYPE_CTOR_REQUIRED = 8901, + MISSING_PIPE = 8004, + MISSING_REFERENCE_TARGET = 8003, + NGMODULE_DECLARATION_NOT_UNIQUE = 6007, NGMODULE_INVALID_DECLARATION = 6001, - NGMODULE_INVALID_IMPORT = 6002, NGMODULE_INVALID_EXPORT = 6003, + NGMODULE_INVALID_IMPORT = 6002, NGMODULE_INVALID_REEXPORT = 6004, NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005, NGMODULE_REEXPORT_NAME_COLLISION = 6006, - NGMODULE_DECLARATION_NOT_UNIQUE = 6007, NGMODULE_VE_DEPENDENCY_ON_IVY_LIB = 6999, - SCHEMA_INVALID_ELEMENT = 8001, + // (undocumented) + PARAM_MISSING_TOKEN = 2003, + // (undocumented) + PIPE_MISSING_NAME = 2002, SCHEMA_INVALID_ATTRIBUTE = 8002, - MISSING_REFERENCE_TARGET = 8003, - MISSING_PIPE = 8004, - WRITE_TO_READ_ONLY_VARIABLE = 8005, - DUPLICATE_VARIABLE_DECLARATION = 8006, - INLINE_TCB_REQUIRED = 8900, - INLINE_TYPE_CTOR_REQUIRED = 8901, - INJECTABLE_DUPLICATE_PROV = 9001, + SCHEMA_INVALID_ELEMENT = 8001, SUGGEST_STRICT_TEMPLATES = 10001, - SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002 + SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002, + // (undocumented) + SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002, + // (undocumented) + SYMBOL_NOT_EXPORTED = 3001, + TEMPLATE_PARSE_ERROR = 5002, + UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007, + UNDECORATED_PROVIDER = 2005, + // (undocumented) + VALUE_HAS_WRONG_TYPE = 1010, + // (undocumented) + VALUE_NOT_LITERAL = 1011, + WRITE_TO_READ_ONLY_VARIABLE = 8005 } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/core/core.d.ts b/goldens/public-api/core/core.md similarity index 57% rename from goldens/public-api/core/core.d.ts rename to goldens/public-api/core/core.md index 79aa358ef65..99a77a2fb9a 100644 --- a/goldens/public-api/core/core.d.ts +++ b/goldens/public-api/core/core.md @@ -1,74 +1,106 @@ -export declare interface AbstractType extends Function { +## API Report File for "@angular/core" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Observable } from 'rxjs'; +import { Subject } from 'rxjs'; +import { Subscription } from 'rxjs'; + +// @public +export interface AbstractType extends Function { + // (undocumented) prototype: T; } -export declare interface AfterContentChecked { +// @public +export interface AfterContentChecked { ngAfterContentChecked(): void; } -export declare interface AfterContentInit { +// @public +export interface AfterContentInit { ngAfterContentInit(): void; } -export declare interface AfterViewChecked { +// @public +export interface AfterViewChecked { ngAfterViewChecked(): void; } -export declare interface AfterViewInit { +// @public +export interface AfterViewInit { ngAfterViewInit(): void; } -/** @deprecated */ -export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken; +// @public @deprecated +export const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken; -export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef) => void)[]>; +// @public +export const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef) => void)[]>; -export declare const APP_ID: InjectionToken; +// @public +export const APP_ID: InjectionToken; -export declare const APP_INITIALIZER: InjectionToken Observable | Promise | void)[]>; +// @public +export const APP_INITIALIZER: InjectionToken Observable | Promise | void)[]>; -export declare class ApplicationInitStatus { - readonly done = false; - readonly donePromise: Promise; +// @public +export class ApplicationInitStatus { constructor(appInits: ReadonlyArray<() => Observable | Promise | void>); -} + // (undocumented) + readonly done = false; + // (undocumented) + readonly donePromise: Promise; + } -export declare class ApplicationModule { +// @public +export class ApplicationModule { constructor(appRef: ApplicationRef); } -export declare class ApplicationRef { - readonly componentTypes: Type[]; - readonly components: ComponentRef[]; - readonly isStable: Observable; - get viewCount(): number; +// @public +export class ApplicationRef { attachView(viewRef: ViewRef): void; bootstrap(componentOrFactory: ComponentFactory | Type, rootSelectorOrNode?: string | any): ComponentRef; + readonly components: ComponentRef[]; + readonly componentTypes: Type[]; detachView(viewRef: ViewRef): void; + readonly isStable: Observable; tick(): void; -} + get viewCount(): number; + } -export declare function asNativeElements(debugEls: DebugElement[]): any; +// @public (undocumented) +export function asNativeElements(debugEls: DebugElement[]): any; -export declare function assertPlatform(requiredToken: any): PlatformRef; +// @public +export function assertPlatform(requiredToken: any): PlatformRef; -export declare interface Attribute { +// @public +export interface Attribute { attributeName: string; } -export declare const Attribute: AttributeDecorator; +// @public +export const Attribute: AttributeDecorator; -export declare interface AttributeDecorator { +// @public +export interface AttributeDecorator { (name: string): any; + // (undocumented) new (name: string): Attribute; } -export declare enum ChangeDetectionStrategy { - OnPush = 0, - Default = 1 +// @public +export enum ChangeDetectionStrategy { + Default = 1, + OnPush = 0 } -export declare abstract class ChangeDetectorRef { +// @public +export abstract class ChangeDetectorRef { abstract checkNoChanges(): void; abstract detach(): void; abstract detectChanges(): void; @@ -76,32 +108,39 @@ export declare abstract class ChangeDetectorRef { abstract reattach(): void; } -export declare interface ClassProvider extends ClassSansProvider { +// @public +export interface ClassProvider extends ClassSansProvider { multi?: boolean; provide: any; } -export declare interface ClassSansProvider { +// @public +export interface ClassSansProvider { useClass: Type; } -export declare class Compiler { +// @public +export class Compiler { + clearCache(): void; + clearCacheFor(type: Type): void; compileModuleAndAllComponentsAsync: (moduleType: Type) => Promise>; compileModuleAndAllComponentsSync: (moduleType: Type) => ModuleWithComponentFactories; compileModuleAsync: (moduleType: Type) => Promise>; compileModuleSync: (moduleType: Type) => NgModuleFactory; - clearCache(): void; - clearCacheFor(type: Type): void; getModuleId(moduleType: Type): string | undefined; } -export declare const COMPILER_OPTIONS: InjectionToken; +// @public +export const COMPILER_OPTIONS: InjectionToken; -export declare abstract class CompilerFactory { +// @public +export abstract class CompilerFactory { + // (undocumented) abstract createCompiler(options?: CompilerOptions[]): Compiler; } -export declare type CompilerOptions = { +// @public +export type CompilerOptions = { useJit?: boolean; defaultEncapsulation?: ViewEncapsulation; providers?: StaticProvider[]; @@ -109,74 +148,111 @@ export declare type CompilerOptions = { preserveWhitespaces?: boolean; }; -export declare interface Component extends Directive { +// @public +export interface Component extends Directive { animations?: any[]; changeDetection?: ChangeDetectionStrategy; encapsulation?: ViewEncapsulation; - /** @deprecated */ entryComponents?: Array | any[]>; + // @deprecated + entryComponents?: Array | any[]>; interpolation?: [string, string]; moduleId?: string; preserveWhitespaces?: boolean; - styleUrls?: string[]; styles?: string[]; + styleUrls?: string[]; template?: string; templateUrl?: string; viewProviders?: Provider[]; } -export declare const Component: ComponentDecorator; +// @public +export const Component: ComponentDecorator; -export declare interface ComponentDecorator { +// @public +export interface ComponentDecorator { (obj: Component): TypeDecorator; new (obj: Component): Component; } -export declare abstract class ComponentFactoryResolver { - abstract resolveComponentFactory(component: Type): ComponentFactory; - static NULL: ComponentFactoryResolver; +// @public +export abstract class ComponentFactory { + abstract get componentType(): Type; + abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef): ComponentRef; + abstract get inputs(): { + propName: string; + templateName: string; + }[]; + abstract get ngContentSelectors(): string[]; + abstract get outputs(): { + propName: string; + templateName: string; + }[]; + abstract get selector(): string; } -export declare abstract class ComponentRef { +// @public +export abstract class ComponentFactoryResolver { + // (undocumented) + static NULL: ComponentFactoryResolver; + abstract resolveComponentFactory(component: Type): ComponentFactory; +} + +// @public +export abstract class ComponentRef { abstract get changeDetectorRef(): ChangeDetectorRef; abstract get componentType(): Type; + abstract destroy(): void; abstract get hostView(): ViewRef; abstract get injector(): Injector; abstract get instance(): C; abstract get location(): ElementRef; - abstract destroy(): void; abstract onDestroy(callback: Function): void; } -export declare interface ConstructorProvider extends ConstructorSansProvider { +// @public +export interface ConstructorProvider extends ConstructorSansProvider { multi?: boolean; provide: Type; } -export declare interface ConstructorSansProvider { +// @public +export interface ConstructorSansProvider { deps?: any[]; } -export declare type ContentChild = Query; +// @public +export type ContentChild = Query; -export declare interface ContentChildDecorator { +// @public +export const ContentChild: ContentChildDecorator; + +// @public +export interface ContentChildDecorator { (selector: ProviderToken | Function | string, opts?: { read?: any; static?: boolean; }): any; + // (undocumented) new (selector: ProviderToken | Function | string, opts?: { read?: any; static?: boolean; }): ContentChild; } -export declare type ContentChildren = Query; +// @public +export type ContentChildren = Query; -export declare interface ContentChildrenDecorator { +// @public +export const ContentChildren: ContentChildrenDecorator; + +// @public +export interface ContentChildrenDecorator { (selector: ProviderToken | Function | string, opts?: { descendants?: boolean; emitDistinctChangesOnly?: boolean; read?: any; }): any; + // (undocumented) new (selector: ProviderToken | Function | string, opts?: { descendants?: boolean; emitDistinctChangesOnly?: boolean; @@ -184,13 +260,17 @@ export declare interface ContentChildrenDecorator { }): Query; } -export declare function createPlatform(injector: Injector): PlatformRef; +// @public +export function createPlatform(injector: Injector): PlatformRef; -export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef; +// @public +export function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef; -export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata; +// @public +export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata; -export declare interface DebugElement extends DebugNode { +// @public +export interface DebugElement extends DebugNode { readonly attributes: { [key: string]: string | null; }; @@ -204,26 +284,34 @@ export declare interface DebugElement extends DebugNode { readonly properties: { [key: string]: any; }; + // (undocumented) + query(predicate: Predicate): DebugElement; + // (undocumented) + queryAll(predicate: Predicate): DebugElement[]; + // (undocumented) + queryAllNodes(predicate: Predicate): DebugNode[]; readonly styles: { [key: string]: string | null; }; - query(predicate: Predicate): DebugElement; - queryAll(predicate: Predicate): DebugElement[]; - queryAllNodes(predicate: Predicate): DebugNode[]; triggerEventHandler(eventName: string, eventObj: any): void; } -export declare const DebugElement: { +// @public (undocumented) +export const DebugElement: { new (...args: any[]): DebugElement; }; -export declare class DebugEventListener { - callback: Function; - name: string; +// @public (undocumented) +export class DebugEventListener { constructor(name: string, callback: Function); + // (undocumented) + callback: Function; + // (undocumented) + name: string; } -export declare interface DebugNode { +// @public (undocumented) +export interface DebugNode { readonly componentInstance: any; readonly context: any; readonly injector: Injector; @@ -236,36 +324,53 @@ export declare interface DebugNode { }; } -export declare const DebugNode: { +// @public (undocumented) +export const DebugNode: { new (...args: any[]): DebugNode; }; -export declare const DEFAULT_CURRENCY_CODE: InjectionToken; +// @public +export const DEFAULT_CURRENCY_CODE: InjectionToken; -/** @deprecated */ -export declare class DefaultIterableDiffer implements IterableDiffer, IterableChanges { - readonly collection: V[] | Iterable | null; - get isDirty(): boolean; - readonly length: number; +// @public @deprecated (undocumented) +export class DefaultIterableDiffer implements IterableDiffer, IterableChanges { constructor(trackByFn?: TrackByFunction); + // (undocumented) check(collection: NgIterable): boolean; + // (undocumented) + readonly collection: V[] | Iterable | null; + // (undocumented) diff(collection: NgIterable | null | undefined): DefaultIterableDiffer | null; + // (undocumented) forEachAddedItem(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) forEachIdentityChange(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) forEachItem(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) forEachMovedItem(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) forEachOperation(fn: (item: IterableChangeRecord, previousIndex: number | null, currentIndex: number | null) => void): void; + // (undocumented) forEachPreviousItem(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) forEachRemovedItem(fn: (record: IterableChangeRecord_) => void): void; + // (undocumented) + get isDirty(): boolean; + // (undocumented) + readonly length: number; + // (undocumented) onDestroy(): void; -} + } -/** @deprecated */ -export declare const defineInjectable: typeof ɵɵdefineInjectable; +// @public @deprecated (undocumented) +export const defineInjectable: typeof ɵɵdefineInjectable; -export declare function destroyPlatform(): void; +// @public +export function destroyPlatform(): void; -export declare interface Directive { +// @public +export interface Directive { exportAs?: string; host?: { [key: string]: string; @@ -280,215 +385,287 @@ export declare interface Directive { selector?: string; } -export declare const Directive: DirectiveDecorator; +// @public +export const Directive: DirectiveDecorator; -export declare interface DirectiveDecorator { +// @public +export interface DirectiveDecorator { (obj?: Directive): TypeDecorator; new (obj?: Directive): Directive; } -export declare interface DoBootstrap { +// @public +export interface DoBootstrap { + // (undocumented) ngDoBootstrap(appRef: ApplicationRef): void; } -export declare interface DoCheck { +// @public +export interface DoCheck { ngDoCheck(): void; } -export declare class ElementRef { - nativeElement: T; +// @public +export class ElementRef { constructor(nativeElement: T); + nativeElement: T; } -export declare abstract class EmbeddedViewRef extends ViewRef { +// @public +export abstract class EmbeddedViewRef extends ViewRef { abstract context: C; abstract get rootNodes(): any[]; } -export declare function enableProdMode(): void; +// @public +export function enableProdMode(): void; -export declare class ErrorHandler { +// @public +export class ErrorHandler { + // (undocumented) handleError(error: any): void; } -export declare interface EventEmitter extends Subject { +// @public +export interface EventEmitter extends Subject { new (isAsync?: boolean): EventEmitter; emit(value?: T): void; subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription; subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription; } -export declare const EventEmitter: { +// @public (undocumented) +export const EventEmitter: { new (isAsync?: boolean): EventEmitter; new (isAsync?: boolean): EventEmitter; readonly prototype: EventEmitter; }; -export declare interface ExistingProvider extends ExistingSansProvider { +// @public +export interface ExistingProvider extends ExistingSansProvider { multi?: boolean; provide: any; } -export declare interface ExistingSansProvider { +// @public +export interface ExistingSansProvider { useExisting: any; } -export declare interface FactoryProvider extends FactorySansProvider { +// @public +export interface FactoryProvider extends FactorySansProvider { multi?: boolean; provide: any; } -export declare interface FactorySansProvider { +// @public +export interface FactorySansProvider { deps?: any[]; useFactory: Function; } -export declare function forwardRef(forwardRefFn: ForwardRefFn): Type; +// @public +export function forwardRef(forwardRefFn: ForwardRefFn): Type; -export declare interface ForwardRefFn { +// @public +export interface ForwardRefFn { + // (undocumented) (): any; } -export declare const getDebugNode: (nativeNode: any) => DebugNode | null; +// @public (undocumented) +export const getDebugNode: (nativeNode: any) => DebugNode | null; -export declare const getModuleFactory: (id: string) => NgModuleFactory; +// @public +export const getModuleFactory: (id: string) => NgModuleFactory; -export declare function getPlatform(): PlatformRef | null; +// @public +export function getPlatform(): PlatformRef | null; -export declare interface GetTestability { +// @public +export interface GetTestability { + // (undocumented) addToWindow(registry: TestabilityRegistry): void; + // (undocumented) findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null; } -export declare interface Host { +// @public +export interface Host { } -export declare const Host: HostDecorator; +// @public +export const Host: HostDecorator; -export declare interface HostBinding { +// @public +export interface HostBinding { hostPropertyName?: string; } -export declare const HostBinding: HostBindingDecorator; +// @public (undocumented) +export const HostBinding: HostBindingDecorator; -export declare interface HostBindingDecorator { +// @public +export interface HostBindingDecorator { (hostPropertyName?: string): any; + // (undocumented) new (hostPropertyName?: string): any; } -export declare interface HostDecorator { +// @public +export interface HostDecorator { (): any; + // (undocumented) new (): Host; } -export declare interface HostListener { +// @public +export interface HostListener { args?: string[]; eventName?: string; } -export declare const HostListener: HostListenerDecorator; +// @public +export const HostListener: HostListenerDecorator; -export declare interface HostListenerDecorator { +// @public +export interface HostListenerDecorator { (eventName: string, args?: string[]): any; + // (undocumented) new (eventName: string, args?: string[]): any; } -export declare const inject: typeof ɵɵinject; - -export declare interface Inject { +// @public +export interface Inject { token: any; } -export declare const Inject: InjectDecorator; +// @public +export const Inject: InjectDecorator; -export declare interface Injectable { +// @public +export const inject: typeof ɵɵinject; + +// @public +export interface Injectable { providedIn?: Type | 'root' | 'platform' | 'any' | null; } -export declare const Injectable: InjectableDecorator; +// @public +export const Injectable: InjectableDecorator; -export declare interface InjectableDecorator { +// @public +export interface InjectableDecorator { (): TypeDecorator; + // (undocumented) (options?: { providedIn: Type | 'root' | 'platform' | 'any' | null; } & InjectableProvider): TypeDecorator; + // (undocumented) new (): Injectable; + // (undocumented) new (options?: { providedIn: Type | 'root' | 'platform' | 'any' | null; } & InjectableProvider): Injectable; } -export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider; +// @public +export type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider; -export declare interface InjectableType extends Type { +// @public +export interface InjectableType extends Type { ɵprov: unknown; } -export declare interface InjectDecorator { +// @public +export interface InjectDecorator { (token: any): any; + // (undocumented) new (token: any): Inject; } -export declare enum InjectFlags { +// @public +export enum InjectFlags { Default = 0, Host = 1, + Optional = 8, Self = 2, - SkipSelf = 4, - Optional = 8 + SkipSelf = 4 } -export declare class InjectionToken { - protected _desc: string; - readonly ɵprov: unknown; +// @public +export class InjectionToken { constructor(_desc: string, options?: { providedIn?: Type | 'root' | 'platform' | 'any' | null; factory: () => T; }); + // (undocumented) + protected _desc: string; + // (undocumented) toString(): string; + // (undocumented) + readonly ɵprov: unknown; } -export declare abstract class Injector { - abstract get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T; - /** @deprecated */ abstract get(token: any, notFoundValue?: any): any; - static NULL: Injector; - static THROW_IF_NOT_FOUND: {}; - static ɵprov: unknown; - /** @deprecated */ static create(providers: StaticProvider[], parent?: Injector): Injector; +// @public +export const INJECTOR: InjectionToken; + +// @public +export abstract class Injector { + // @deprecated (undocumented) + static create(providers: StaticProvider[], parent?: Injector): Injector; static create(options: { providers: StaticProvider[]; parent?: Injector; name?: string; }): Injector; + abstract get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T; + // @deprecated (undocumented) + abstract get(token: any, notFoundValue?: any): any; + // (undocumented) + static NULL: Injector; + // (undocumented) + static THROW_IF_NOT_FOUND: {}; + // (undocumented) + static ɵprov: unknown; } -export declare const INJECTOR: InjectionToken; - -export declare interface InjectorType extends Type { +// @public +export interface InjectorType extends Type { + // (undocumented) ɵfac?: unknown; + // (undocumented) ɵinj: unknown; } -export declare interface Input { +// @public +export interface Input { bindingPropertyName?: string; } -export declare const Input: InputDecorator; +// @public (undocumented) +export const Input: InputDecorator; -export declare interface InputDecorator { +// @public (undocumented) +export interface InputDecorator { (bindingPropertyName?: string): any; + // (undocumented) new (bindingPropertyName?: string): any; } -export declare function isDevMode(): boolean; +// @public +export function isDevMode(): boolean; -export declare interface IterableChangeRecord { +// @public +export interface IterableChangeRecord { readonly currentIndex: number | null; readonly item: V; readonly previousIndex: number | null; readonly trackById: any; } -export declare interface IterableChanges { +// @public +export interface IterableChanges { forEachAddedItem(fn: (record: IterableChangeRecord) => void): void; forEachIdentityChange(fn: (record: IterableChangeRecord) => void): void; forEachItem(fn: (record: IterableChangeRecord) => void): void; @@ -498,31 +675,42 @@ export declare interface IterableChanges { forEachRemovedItem(fn: (record: IterableChangeRecord) => void): void; } -export declare interface IterableDiffer { +// @public +export interface IterableDiffer { diff(object: NgIterable | undefined | null): IterableChanges | null; } -export declare interface IterableDifferFactory { +// @public +export interface IterableDifferFactory { + // (undocumented) create(trackByFn?: TrackByFunction): IterableDiffer; + // (undocumented) supports(objects: any): boolean; } -export declare class IterableDiffers { - /** @deprecated */ factories: IterableDifferFactory[]; +// @public +export class IterableDiffers { constructor(factories: IterableDifferFactory[]); - find(iterable: any): IterableDifferFactory; - static ɵprov: unknown; + // (undocumented) static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers; static extend(factories: IterableDifferFactory[]): StaticProvider; + // @deprecated (undocumented) + factories: IterableDifferFactory[]; + // (undocumented) + find(iterable: any): IterableDifferFactory; + // (undocumented) + static ɵprov: unknown; } -export declare interface KeyValueChangeRecord { +// @public +export interface KeyValueChangeRecord { readonly currentValue: V | null; readonly key: K; readonly previousValue: V | null; } -export declare interface KeyValueChanges { +// @public +export interface KeyValueChanges { forEachAddedItem(fn: (r: KeyValueChangeRecord) => void): void; forEachChangedItem(fn: (r: KeyValueChangeRecord) => void): void; forEachItem(fn: (r: KeyValueChangeRecord) => void): void; @@ -530,52 +718,73 @@ export declare interface KeyValueChanges { forEachRemovedItem(fn: (r: KeyValueChangeRecord) => void): void; } -export declare interface KeyValueDiffer { +// @public +export interface KeyValueDiffer { diff(object: Map): KeyValueChanges | null; diff(object: { [key: string]: V; }): KeyValueChanges | null; } -export declare interface KeyValueDifferFactory { +// @public +export interface KeyValueDifferFactory { create(): KeyValueDiffer; supports(objects: any): boolean; } -export declare class KeyValueDiffers { - /** @deprecated */ factories: KeyValueDifferFactory[]; +// @public +export class KeyValueDiffers { constructor(factories: KeyValueDifferFactory[]); - find(kv: any): KeyValueDifferFactory; - static ɵprov: unknown; + // (undocumented) static create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers; static extend(factories: KeyValueDifferFactory[]): StaticProvider; + // @deprecated (undocumented) + factories: KeyValueDifferFactory[]; + // (undocumented) + find(kv: any): KeyValueDifferFactory; + // (undocumented) + static ɵprov: unknown; } -export declare const LOCALE_ID: InjectionToken; +// @public +export const LOCALE_ID: InjectionToken; -export declare enum MissingTranslationStrategy { +// @public +export enum MissingTranslationStrategy { + // (undocumented) Error = 0, - Warning = 1, - Ignore = 2 + // (undocumented) + Ignore = 2, + // (undocumented) + Warning = 1 } -export declare class ModuleWithComponentFactories { - componentFactories: ComponentFactory[]; - ngModuleFactory: NgModuleFactory; +// @public +export class ModuleWithComponentFactories { constructor(ngModuleFactory: NgModuleFactory, componentFactories: ComponentFactory[]); + // (undocumented) + componentFactories: ComponentFactory[]; + // (undocumented) + ngModuleFactory: NgModuleFactory; } -export declare interface ModuleWithProviders { +// @public +export interface ModuleWithProviders { + // (undocumented) ngModule: Type; + // (undocumented) providers?: Provider[]; } -export declare type NgIterable = Array | Iterable; +// @public +export type NgIterable = Array | Iterable; -export declare interface NgModule { +// @public +export interface NgModule { bootstrap?: Array | any[]>; declarations?: Array | any[]>; - /** @deprecated */ entryComponents?: Array | any[]>; + // @deprecated + entryComponents?: Array | any[]>; exports?: Array | any[]>; id?: string; imports?: Array | ModuleWithProviders<{}> | any[]>; @@ -584,175 +793,220 @@ export declare interface NgModule { schemas?: Array; } -export declare const NgModule: NgModuleDecorator; +// @public (undocumented) +export const NgModule: NgModuleDecorator; -export declare interface NgModuleDecorator { +// @public +export interface NgModuleDecorator { (obj?: NgModule): TypeDecorator; + // (undocumented) new (obj?: NgModule): NgModule; } -export declare abstract class NgModuleFactory { - abstract get moduleType(): Type; +// @public (undocumented) +export abstract class NgModuleFactory { + // (undocumented) abstract create(parentInjector: Injector | null): NgModuleRef; + // (undocumented) + abstract get moduleType(): Type; } -/** @deprecated */ -export declare abstract class NgModuleFactoryLoader { +// @public @deprecated +export abstract class NgModuleFactoryLoader { + // (undocumented) abstract load(path: string): Promise>; } -export declare abstract class NgModuleRef { +// @public +export abstract class NgModuleRef { abstract get componentFactoryResolver(): ComponentFactoryResolver; + abstract destroy(): void; abstract get injector(): Injector; abstract get instance(): T; - abstract destroy(): void; abstract onDestroy(callback: () => void): void; } -export declare class NgProbeToken { - name: string; - token: any; +// @public +export class NgProbeToken { constructor(name: string, token: any); + // (undocumented) + name: string; + // (undocumented) + token: any; } -export declare class NgZone { - readonly hasPendingMacrotasks: boolean; - readonly hasPendingMicrotasks: boolean; - readonly isStable: boolean; - readonly onError: EventEmitter; - readonly onMicrotaskEmpty: EventEmitter; - readonly onStable: EventEmitter; - readonly onUnstable: EventEmitter; +// @public +export class NgZone { constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: { enableLongStackTrace?: boolean | undefined; shouldCoalesceEventChangeDetection?: boolean | undefined; shouldCoalesceRunChangeDetection?: boolean | undefined; }); + // (undocumented) + static assertInAngularZone(): void; + // (undocumented) + static assertNotInAngularZone(): void; + // (undocumented) + readonly hasPendingMacrotasks: boolean; + // (undocumented) + readonly hasPendingMicrotasks: boolean; + // (undocumented) + static isInAngularZone(): boolean; + readonly isStable: boolean; + readonly onError: EventEmitter; + readonly onMicrotaskEmpty: EventEmitter; + readonly onStable: EventEmitter; + readonly onUnstable: EventEmitter; run(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T; runGuarded(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T; runOutsideAngular(fn: (...args: any[]) => T): T; runTask(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T; - static assertInAngularZone(): void; - static assertNotInAngularZone(): void; - static isInAngularZone(): boolean; } -export declare const NO_ERRORS_SCHEMA: SchemaMetadata; +// @public +export const NO_ERRORS_SCHEMA: SchemaMetadata; -export declare interface OnChanges { +// @public +export interface OnChanges { ngOnChanges(changes: SimpleChanges): void; } -export declare interface OnDestroy { +// @public +export interface OnDestroy { ngOnDestroy(): void; } -export declare interface OnInit { +// @public +export interface OnInit { ngOnInit(): void; } -export declare interface Optional { +// @public +export interface Optional { } -export declare const Optional: OptionalDecorator; +// @public +export const Optional: OptionalDecorator; -export declare interface OptionalDecorator { +// @public +export interface OptionalDecorator { (): any; + // (undocumented) new (): Optional; } -export declare interface Output { +// @public +export interface Output { bindingPropertyName?: string; } -export declare const Output: OutputDecorator; +// @public (undocumented) +export const Output: OutputDecorator; -export declare interface OutputDecorator { +// @public +export interface OutputDecorator { (bindingPropertyName?: string): any; + // (undocumented) new (bindingPropertyName?: string): any; } -/** @codeGenApi */ -export declare function ɵɵdefineInjectable(opts: { - token: unknown; - providedIn?: Type | 'root' | 'platform' | 'any' | null; - factory: () => T; -}): unknown; +// @public +export const PACKAGE_ROOT_URL: InjectionToken; -/** @codeGenApi */ -export declare function ɵɵinject(token: ProviderToken): T; -export declare function ɵɵinject(token: ProviderToken, flags?: InjectFlags): T | null; - -/** @codeGenApi */ -export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null; - -export declare const PACKAGE_ROOT_URL: InjectionToken; - -export declare interface Pipe { +// @public +export interface Pipe { name: string; pure?: boolean; } -export declare const Pipe: PipeDecorator; +// @public (undocumented) +export const Pipe: PipeDecorator; -export declare interface PipeDecorator { +// @public +export interface PipeDecorator { (obj: Pipe): TypeDecorator; new (obj: Pipe): Pipe; } -export declare interface PipeTransform { +// @public +export interface PipeTransform { + // (undocumented) transform(value: any, ...args: any[]): any; } -export declare const PLATFORM_ID: InjectionToken; +// @public +export const PLATFORM_ID: InjectionToken; -export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>; +// @public +export const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>; -export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; +// @public +export const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; -export declare class PlatformRef { - get destroyed(): boolean; - get injector(): Injector; +// @public +export class PlatformRef { bootstrapModule(moduleType: Type, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array): Promise>; bootstrapModuleFactory(moduleFactory: NgModuleFactory, options?: BootstrapOptions): Promise>; destroy(): void; + // (undocumented) + get destroyed(): boolean; + get injector(): Injector; onDestroy(callback: () => void): void; } -export declare interface Predicate { +// @public +export interface Predicate { + // (undocumented) (value: T): boolean; } -export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[]; +// @public +export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[]; -export declare type ProviderToken = Type | AbstractType | InjectionToken; +// @public +export type ProviderToken = Type | AbstractType | InjectionToken; -export declare interface Query { +// @public +export interface Query { + // (undocumented) descendants: boolean; + // (undocumented) emitDistinctChangesOnly: boolean; + // (undocumented) first: boolean; + // (undocumented) isViewQuery: boolean; + // (undocumented) read: any; + // (undocumented) selector: any; + // (undocumented) static?: boolean; } -export declare abstract class Query { +// @public +export abstract class Query { } -export declare class QueryList implements Iterable { +// @public +export class QueryList implements Iterable { + // (undocumented) [Symbol.iterator]: () => Iterator; - get changes(): Observable; - readonly dirty = true; - readonly first: T; - readonly last: T; - readonly length: number; constructor(_emitDistinctChangesOnly?: boolean); + get changes(): Observable; destroy(): void; + // (undocumented) + readonly dirty = true; filter(fn: (item: T, index: number, array: T[]) => boolean): T[]; find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined; + // (undocumented) + readonly first: T; forEach(fn: (item: T, index: number, array: T[]) => void): void; get(index: number): T | undefined; + // (undocumented) + readonly last: T; + // (undocumented) + readonly length: number; map(fn: (item: T, index: number, array: T[]) => U): U[]; notifyOnChanges(): void; reduce(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U; @@ -760,43 +1014,50 @@ export declare class QueryList implements Iterable { setDirty(): void; some(fn: (value: T, index: number, array: T[]) => boolean): boolean; toArray(): T[]; + // (undocumented) toString(): string; } -/** @deprecated */ -export declare abstract class ReflectiveInjector implements Injector { - abstract get parent(): Injector | null; +// @public @deprecated +export abstract class ReflectiveInjector implements Injector { abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; + static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; + // (undocumented) abstract get(token: any, notFoundValue?: any): any; abstract instantiateResolved(provider: ResolvedReflectiveProvider): any; - abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector; - abstract resolveAndInstantiate(provider: Provider): any; - static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; + abstract get parent(): Injector | null; static resolve(providers: Provider[]): ResolvedReflectiveProvider[]; static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector; + abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector; + abstract resolveAndInstantiate(provider: Provider): any; } -/** @deprecated */ -export declare class ReflectiveKey { - readonly displayName: string; - id: number; - token: Object; +// @public @deprecated +export class ReflectiveKey { constructor(token: Object, id: number); - static get numberOfKeys(): number; + // (undocumented) + readonly displayName: string; static get(token: Object): ReflectiveKey; + // (undocumented) + id: number; + // (undocumented) + static get numberOfKeys(): number; + // (undocumented) + token: Object; } -export declare abstract class Renderer2 { - abstract get data(): { - [key: string]: any; - }; - destroyNode: ((node: any) => void) | null; +// @public +export abstract class Renderer2 { abstract addClass(el: any, name: string): void; abstract appendChild(parent: any, newChild: any): void; abstract createComment(value: string): any; abstract createElement(name: string, namespace?: string | null): any; abstract createText(value: string): any; + abstract get data(): { + [key: string]: any; + }; abstract destroy(): void; + destroyNode: ((node: any) => void) | null; abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void; abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void; abstract nextSibling(node: any): any; @@ -812,19 +1073,22 @@ export declare abstract class Renderer2 { abstract setValue(node: any, value: string): void; } -export declare abstract class RendererFactory2 { +// @public +export abstract class RendererFactory2 { abstract begin?(): void; abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2; abstract end?(): void; abstract whenRenderingDone?(): Promise; } -export declare enum RendererStyleFlags2 { - Important = 1, - DashCase = 2 +// @public +export enum RendererStyleFlags2 { + DashCase = 2, + Important = 1 } -export declare interface RendererType2 { +// @public +export interface RendererType2 { data: { [kind: string]: any; }; @@ -833,114 +1097,154 @@ export declare interface RendererType2 { styles: (string | any[])[]; } -export declare class ResolvedReflectiveFactory { - dependencies: ɵangular_packages_core_core_e[]; - factory: Function; +// @public +export class ResolvedReflectiveFactory { constructor( factory: Function, dependencies: ɵangular_packages_core_core_e[]); + dependencies: ɵangular_packages_core_core_e[]; + factory: Function; } -export declare interface ResolvedReflectiveProvider { +// @public +export interface ResolvedReflectiveProvider { key: ReflectiveKey; multiProvider: boolean; resolvedFactories: ResolvedReflectiveFactory[]; } -export declare function resolveForwardRef(type: T): T; +// @public +export function resolveForwardRef(type: T): T; -export declare abstract class Sanitizer { +// @public +export abstract class Sanitizer { + // (undocumented) abstract sanitize(context: SecurityContext, value: {} | string | null): string | null; + // (undocumented) static ɵprov: unknown; } -export declare interface SchemaMetadata { +// @public +export interface SchemaMetadata { + // (undocumented) name: string; } -export declare enum SecurityContext { - NONE = 0, +// @public +export enum SecurityContext { + // (undocumented) HTML = 1, - STYLE = 2, + // (undocumented) + NONE = 0, + // (undocumented) + RESOURCE_URL = 5, + // (undocumented) SCRIPT = 3, - URL = 4, - RESOURCE_URL = 5 + // (undocumented) + STYLE = 2, + // (undocumented) + URL = 4 } -export declare interface Self { +// @public +export interface Self { } -export declare const Self: SelfDecorator; +// @public +export const Self: SelfDecorator; -export declare interface SelfDecorator { +// @public +export interface SelfDecorator { (): any; + // (undocumented) new (): Self; } -export declare function setTestabilityGetter(getter: GetTestability): void; +// @public +export function setTestabilityGetter(getter: GetTestability): void; -export declare class SimpleChange { - currentValue: any; - firstChange: boolean; - previousValue: any; +// @public +export class SimpleChange { constructor(previousValue: any, currentValue: any, firstChange: boolean); + // (undocumented) + currentValue: any; + // (undocumented) + firstChange: boolean; isFirstChange(): boolean; + // (undocumented) + previousValue: any; } -export declare interface SimpleChanges { +// @public +export interface SimpleChanges { + // (undocumented) [propName: string]: SimpleChange; } -export declare interface SkipSelf { +// @public +export interface SkipSelf { } -export declare const SkipSelf: SkipSelfDecorator; +// @public +export const SkipSelf: SkipSelfDecorator; -export declare interface SkipSelfDecorator { +// @public +export interface SkipSelfDecorator { (): any; + // (undocumented) new (): SkipSelf; } -export declare interface StaticClassProvider extends StaticClassSansProvider { +// @public +export interface StaticClassProvider extends StaticClassSansProvider { multi?: boolean; provide: any; } -export declare interface StaticClassSansProvider { +// @public +export interface StaticClassSansProvider { deps: any[]; useClass: Type; } -export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[]; +// @public +export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[]; -/** @deprecated */ -export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader { +// @public @deprecated +export class SystemJsNgModuleLoader implements NgModuleFactoryLoader { constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig); + // (undocumented) load(path: string): Promise>; -} + } -/** @deprecated */ -export declare abstract class SystemJsNgModuleLoaderConfig { +// @public @deprecated +export abstract class SystemJsNgModuleLoaderConfig { factoryPathPrefix: string; factoryPathSuffix: string; } -export declare abstract class TemplateRef { - abstract get elementRef(): ElementRef; +// @public +export abstract class TemplateRef { abstract createEmbeddedView(context: C): EmbeddedViewRef; + abstract get elementRef(): ElementRef; } -export declare class Testability implements PublicTestability { +// @public +export class Testability implements PublicTestability { constructor(_ngZone: NgZone); - /** @deprecated */ decreasePendingRequestCount(): number; + // @deprecated + decreasePendingRequestCount(): number; findProviders(using: any, provider: string, exactMatch: boolean): any[]; - /** @deprecated */ getPendingRequestCount(): number; - /** @deprecated */ increasePendingRequestCount(): number; + // @deprecated + getPendingRequestCount(): number; + // @deprecated + increasePendingRequestCount(): number; isStable(): boolean; whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void; } -export declare class TestabilityRegistry { +// @public +export class TestabilityRegistry { constructor(); findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null; getAllRootElements(): any[]; @@ -951,102 +1255,162 @@ export declare class TestabilityRegistry { unregisterApplication(token: any): void; } -export declare interface TrackByFunction { +// @public +export interface TrackByFunction { + // (undocumented) (index: number, item: U): any; } -export declare const TRANSLATIONS: InjectionToken; +// @public +export const TRANSLATIONS: InjectionToken; -export declare const TRANSLATIONS_FORMAT: InjectionToken; +// @public +export const TRANSLATIONS_FORMAT: InjectionToken; -export declare const Type: FunctionConstructor; +// @public +export const Type: FunctionConstructor; -export declare interface TypeDecorator { - (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void; +// @public (undocumented) +export interface Type extends Function { + // (undocumented) + new (...args: any[]): T; +} + +// @public +export interface TypeDecorator { >(type: T): T; + // (undocumented) + (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void; } -export declare interface TypeProvider extends Type { +// @public +export interface TypeProvider extends Type { } -export declare interface ValueProvider extends ValueSansProvider { +// @public +export interface ValueProvider extends ValueSansProvider { multi?: boolean; provide: any; } -export declare interface ValueSansProvider { +// @public +export interface ValueSansProvider { useValue: any; } -export declare class Version { - full: string; - readonly major: string; - readonly minor: string; - readonly patch: string; +// @public (undocumented) +export const VERSION: Version; + +// @public +export class Version { constructor(full: string); + // (undocumented) + full: string; + // (undocumented) + readonly major: string; + // (undocumented) + readonly minor: string; + // (undocumented) + readonly patch: string; } -export declare const VERSION: Version; +// @public +export type ViewChild = Query; -export declare type ViewChild = Query; +// @public +export const ViewChild: ViewChildDecorator; -export declare interface ViewChildDecorator { +// @public +export interface ViewChildDecorator { (selector: ProviderToken | Function | string, opts?: { read?: any; static?: boolean; }): any; + // (undocumented) new (selector: ProviderToken | Function | string, opts?: { read?: any; static?: boolean; }): ViewChild; } -export declare type ViewChildren = Query; +// @public +export type ViewChildren = Query; -export declare interface ViewChildrenDecorator { +// @public +export const ViewChildren: ViewChildrenDecorator; + +// @public +export interface ViewChildrenDecorator { (selector: ProviderToken | Function | string, opts?: { read?: any; emitDistinctChangesOnly?: boolean; }): any; + // (undocumented) new (selector: ProviderToken | Function | string, opts?: { read?: any; emitDistinctChangesOnly?: boolean; }): ViewChildren; } -export declare abstract class ViewContainerRef { - abstract get element(): ElementRef; - abstract get injector(): Injector; - abstract get length(): number; - /** @deprecated */ abstract get parentInjector(): Injector; +// @public +export abstract class ViewContainerRef { abstract clear(): void; abstract createComponent(componentFactory: ComponentFactory, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef): ComponentRef; abstract createEmbeddedView(templateRef: TemplateRef, context?: C, index?: number): EmbeddedViewRef; abstract detach(index?: number): ViewRef | null; + abstract get element(): ElementRef; abstract get(index: number): ViewRef | null; abstract indexOf(viewRef: ViewRef): number; + abstract get injector(): Injector; abstract insert(viewRef: ViewRef, index?: number): ViewRef; + abstract get length(): number; abstract move(viewRef: ViewRef, currentIndex: number): ViewRef; + // @deprecated (undocumented) + abstract get parentInjector(): Injector; abstract remove(index?: number): void; } -export declare enum ViewEncapsulation { +// @public +export enum ViewEncapsulation { Emulated = 0, None = 2, ShadowDom = 3 } -export declare abstract class ViewRef extends ChangeDetectorRef { - abstract get destroyed(): boolean; +// @public +export abstract class ViewRef extends ChangeDetectorRef { abstract destroy(): void; + abstract get destroyed(): boolean; abstract onDestroy(callback: Function): any /** TODO #9100 */; } -/** @deprecated */ -export declare class WrappedValue { - /** @deprecated */ wrapped: any; +// @public @deprecated +export class WrappedValue { constructor(value: any); static isWrapped(value: any): value is WrappedValue; static unwrap(value: any): any; static wrap(value: any): WrappedValue; + // @deprecated (undocumented) + wrapped: any; } + +// @public +export function ɵɵdefineInjectable(opts: { + token: unknown; + providedIn?: Type | 'root' | 'platform' | 'any' | null; + factory: () => T; +}): unknown; + +// @public +export function ɵɵinject(token: ProviderToken): T; + +// @public (undocumented) +export function ɵɵinject(token: ProviderToken, flags?: InjectFlags): T | null; + +// @public +export function ɵɵinjectAttribute(attrNameToInject: string): string | null; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/core/global_utils.d.ts b/goldens/public-api/core/global_utils.d.ts deleted file mode 100644 index 5fbf67baf3c..00000000000 --- a/goldens/public-api/core/global_utils.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export declare function applyChanges(component: {}): void; - -export interface ComponentDebugMetadata extends DirectiveDebugMetadata { - changeDetection: ChangeDetectionStrategy; - encapsulation: ViewEncapsulation; -} - -export interface DirectiveDebugMetadata { - inputs: Record; - outputs: Record; -} - -export declare function getComponent(element: Element): T | null; - -export declare function getContext(element: Element): T | null; - -export declare function getDirectiveMetadata(directiveOrComponentInstance: any): ComponentDebugMetadata | DirectiveDebugMetadata | null; - -export declare function getDirectives(node: Node): {}[]; - -export declare function getHostElement(componentOrDirective: {}): Element; - -export declare function getInjector(elementOrDir: Element | {}): Injector; - -export declare function getListeners(element: Element): Listener[]; - -export declare function getOwningComponent(elementOrDir: Element | {}): T | null; - -export declare function getRootComponents(elementOrDir: Element | {}): {}[]; - -export interface Listener { - callback: (value: any) => any; - element: Element; - name: string; - type: 'dom' | 'output'; - useCapture: boolean; -} diff --git a/goldens/public-api/core/global_utils.md b/goldens/public-api/core/global_utils.md new file mode 100644 index 00000000000..3423e699627 --- /dev/null +++ b/goldens/public-api/core/global_utils.md @@ -0,0 +1,65 @@ +## API Report File for "angular-srcs" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export function applyChanges(component: {}): void; + +// @public +export interface ComponentDebugMetadata extends DirectiveDebugMetadata { + // (undocumented) + changeDetection: ChangeDetectionStrategy; + // (undocumented) + encapsulation: ViewEncapsulation; +} + +// @public +export interface DirectiveDebugMetadata { + // (undocumented) + inputs: Record; + // (undocumented) + outputs: Record; +} + +// @public +export function getComponent(element: Element): T | null; + +// @public +export function getContext(element: Element): T | null; + +// @public +export function getDirectiveMetadata(directiveOrComponentInstance: any): ComponentDebugMetadata | DirectiveDebugMetadata | null; + +// @public +export function getDirectives(node: Node): {}[]; + +// @public +export function getHostElement(componentOrDirective: {}): Element; + +// @public +export function getInjector(elementOrDir: Element | {}): Injector; + +// @public +export function getListeners(element: Element): Listener[]; + +// @public +export function getOwningComponent(elementOrDir: Element | {}): T | null; + +// @public +export function getRootComponents(elementOrDir: Element | {}): {}[]; + +// @public +export interface Listener { + callback: (value: any) => any; + element: Element; + name: string; + type: 'dom' | 'output'; + useCapture: boolean; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/core/testing/testing.d.ts b/goldens/public-api/core/testing/testing.md similarity index 54% rename from goldens/public-api/core/testing/testing.d.ts rename to goldens/public-api/core/testing/testing.md index 350814d6c50..a84ef839d31 100644 --- a/goldens/public-api/core/testing/testing.d.ts +++ b/goldens/public-api/core/testing/testing.md @@ -1,102 +1,164 @@ -/** @codeGenApi */ -export declare const __core_private_testing_placeholder__ = ""; +## API Report File for "@angular/core_testing" -/** @deprecated */ -export declare function async(fn: Function): (done: any) => any; +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). -export declare class ComponentFixture { - changeDetectorRef: ChangeDetectorRef; - componentInstance: T; - componentRef: ComponentRef; - debugElement: DebugElement; - elementRef: ElementRef; - nativeElement: any; - ngZone: NgZone | null; +```ts + +import { ChangeDetectorRef } from '@angular/core'; +import { Component } from '@angular/core'; +import { ComponentRef } from '@angular/core'; +import { DebugElement } from '@angular/core'; +import { Directive } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { InjectFlags } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { NgModule } from '@angular/core'; +import { NgZone } from '@angular/core'; +import { Pipe } from '@angular/core'; +import { PlatformRef } from '@angular/core'; +import { ProviderToken } from '@angular/core'; +import { SchemaMetadata } from '@angular/core'; +import { Type } from '@angular/core'; + +// @public +export const __core_private_testing_placeholder__ = ""; + +// @public @deprecated (undocumented) +export function async(fn: Function): (done: any) => any; + +// @public +export class ComponentFixture { constructor(componentRef: ComponentRef, ngZone: NgZone | null, _autoDetect: boolean); autoDetectChanges(autoDetect?: boolean): void; + changeDetectorRef: ChangeDetectorRef; checkNoChanges(): void; + componentInstance: T; + // (undocumented) + componentRef: ComponentRef; + debugElement: DebugElement; destroy(): void; detectChanges(checkNoChanges?: boolean): void; + elementRef: ElementRef; isStable(): boolean; + nativeElement: any; + // (undocumented) + ngZone: NgZone | null; whenRenderingDone(): Promise; whenStable(): Promise; } -export declare const ComponentFixtureAutoDetect: InjectionToken; +// @public (undocumented) +export const ComponentFixtureAutoDetect: InjectionToken; -export declare const ComponentFixtureNoNgZone: InjectionToken; +// @public (undocumented) +export const ComponentFixtureNoNgZone: InjectionToken; -export declare function discardPeriodicTasks(): void; +// @public +export function discardPeriodicTasks(): void; -export declare function fakeAsync(fn: Function): (...args: any[]) => any; +// @public +export function fakeAsync(fn: Function): (...args: any[]) => any; -export declare function flush(maxTurns?: number): number; +// @public +export function flush(maxTurns?: number): number; -export declare function flushMicrotasks(): void; +// @public +export function flushMicrotasks(): void; -export declare const getTestBed: () => TestBed; +// @public +export const getTestBed: () => TestBed; -export declare function inject(tokens: any[], fn: Function): () => any; +// @public +export function inject(tokens: any[], fn: Function): () => any; -export declare class InjectSetupWrapper { +// @public (undocumented) +export class InjectSetupWrapper { constructor(_moduleDef: () => TestModuleMetadata); + // (undocumented) inject(tokens: any[], fn: Function): () => any; -} + } -export declare type MetadataOverride = { +// @public +export type MetadataOverride = { add?: Partial; remove?: Partial; set?: Partial; }; -export declare interface ModuleTeardownOptions { +// @public +export interface ModuleTeardownOptions { destroyAfterEach: boolean; rethrowErrors?: boolean; } -export declare function resetFakeAsyncZone(): void; +// @public +export function resetFakeAsyncZone(): void; -export declare interface TestBed { - ngModule: Type | Type[]; - platform: PlatformRef; +// @public (undocumented) +export interface TestBed { + // (undocumented) compileComponents(): Promise; + // (undocumented) configureCompiler(config: { providers?: any[]; useJit?: boolean; }): void; + // (undocumented) configureTestingModule(moduleDef: TestModuleMetadata): void; + // (undocumented) createComponent(component: Type): ComponentFixture; + // (undocumented) execute(tokens: any[], fn: Function, context?: any): any; - /** @deprecated */ get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any; - /** @deprecated */ get(token: any, notFoundValue?: any): any; + // @deprecated (undocumented) + get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any; + // @deprecated (undocumented) + get(token: any, notFoundValue?: any): any; initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, options?: TestEnvironmentOptions): void; + // (undocumented) initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): void; + // (undocumented) inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T; + // (undocumented) inject(token: ProviderToken, notFoundValue: null, flags?: InjectFlags): T | null; + // (undocumented) + ngModule: Type | Type[]; + // (undocumented) overrideComponent(component: Type, override: MetadataOverride): void; + // (undocumented) overrideDirective(directive: Type, override: MetadataOverride): void; + // (undocumented) overrideModule(ngModule: Type, override: MetadataOverride): void; + // (undocumented) overridePipe(pipe: Type, override: MetadataOverride): void; overrideProvider(token: any, provider: { useFactory: Function; deps: any[]; }): void; + // (undocumented) overrideProvider(token: any, provider: { useValue: any; }): void; + // (undocumented) overrideProvider(token: any, provider: { useFactory?: Function; useValue?: any; deps?: any[]; }): void; + // (undocumented) overrideTemplateUsingTestingModule(component: Type, template: string): void; + // (undocumented) + platform: PlatformRef; resetTestEnvironment(): void; + // (undocumented) resetTestingModule(): void; } -export declare const TestBed: TestBedStatic; +// @public +export const TestBed: TestBedStatic; -export declare interface TestBedStatic { +// @public +export interface TestBedStatic { + // (undocumented) new (...args: any[]): TestBed; compileComponents(): Promise; configureCompiler(config: { @@ -104,48 +166,70 @@ export declare interface TestBedStatic { useJit?: boolean; }): TestBedStatic; configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic; + // (undocumented) createComponent(component: Type): ComponentFixture; - /** @deprecated */ get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any; - /** @deprecated */ get(token: any, notFoundValue?: any): any; + // @deprecated (undocumented) + get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any; + // @deprecated (undocumented) + get(token: any, notFoundValue?: any): any; + // (undocumented) initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, options?: { teardown?: ModuleTeardownOptions; }): TestBed; + // (undocumented) initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed; + // (undocumented) inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T; + // (undocumented) inject(token: ProviderToken, notFoundValue: null, flags?: InjectFlags): T | null; + // (undocumented) overrideComponent(component: Type, override: MetadataOverride): TestBedStatic; + // (undocumented) overrideDirective(directive: Type, override: MetadataOverride): TestBedStatic; + // (undocumented) overrideModule(ngModule: Type, override: MetadataOverride): TestBedStatic; + // (undocumented) overridePipe(pipe: Type, override: MetadataOverride): TestBedStatic; overrideProvider(token: any, provider: { useFactory: Function; deps: any[]; }): TestBedStatic; + // (undocumented) overrideProvider(token: any, provider: { useValue: any; }): TestBedStatic; + // (undocumented) overrideProvider(token: any, provider: { useFactory?: Function; useValue?: any; deps?: any[]; }): TestBedStatic; + // (undocumented) overrideTemplate(component: Type, template: string): TestBedStatic; overrideTemplateUsingTestingModule(component: Type, template: string): TestBedStatic; resetTestEnvironment(): void; + // (undocumented) resetTestingModule(): TestBedStatic; } -export declare class TestComponentRenderer { +// @public +export class TestComponentRenderer { + // (undocumented) insertRootElement(rootElementId: string): void; + // (undocumented) removeAllRootElements?(): void; } -export declare interface TestEnvironmentOptions { +// @public (undocumented) +export interface TestEnvironmentOptions { + // (undocumented) aotSummaries?: () => any[]; + // (undocumented) teardown?: ModuleTeardownOptions; } -export declare type TestModuleMetadata = { +// @public (undocumented) +export type TestModuleMetadata = { providers?: any[]; declarations?: any[]; imports?: any[]; @@ -154,11 +238,21 @@ export declare type TestModuleMetadata = { teardown?: ModuleTeardownOptions; }; -export declare function tick(millis?: number, tickOptions?: { +// @public +export function tick(millis?: number, tickOptions?: { processNewMacroTasksSynchronously: boolean; }): void; -export declare function waitForAsync(fn: Function): (done: any) => any; +// @public +export function waitForAsync(fn: Function): (done: any) => any; -export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper; -export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any; +// @public (undocumented) +export function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper; + +// @public (undocumented) +export function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/elements/elements.d.ts b/goldens/public-api/elements/elements.d.ts deleted file mode 100644 index baafc1693d8..00000000000 --- a/goldens/public-api/elements/elements.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare function createCustomElement

(component: Type, config: NgElementConfig): NgElementConstructor

; - -export declare abstract class NgElement extends HTMLElement { - protected ngElementEventsSubscription: Subscription | null; - protected abstract ngElementStrategy: NgElementStrategy; - abstract attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void; - abstract connectedCallback(): void; - abstract disconnectedCallback(): void; -} - -export declare interface NgElementConfig { - injector: Injector; - strategyFactory?: NgElementStrategyFactory; -} - -export declare interface NgElementConstructor

{ - readonly observedAttributes: string[]; - new (injector?: Injector): NgElement & WithProperties

; -} - -export declare interface NgElementStrategy { - events: Observable; - connect(element: HTMLElement): void; - disconnect(): void; - getInputValue(propName: string): any; - setInputValue(propName: string, value: string): void; -} - -export declare interface NgElementStrategyEvent { - name: string; - value: any; -} - -export declare interface NgElementStrategyFactory { - create(injector: Injector): NgElementStrategy; -} - -export declare const VERSION: Version; - -export declare type WithProperties

= { - [property in keyof P]: P[property]; -}; diff --git a/goldens/public-api/elements/elements.md b/goldens/public-api/elements/elements.md new file mode 100644 index 00000000000..66ac31d9cae --- /dev/null +++ b/goldens/public-api/elements/elements.md @@ -0,0 +1,75 @@ +## API Report File for "@angular/elements" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Injector } from '@angular/core'; +import { Observable } from 'rxjs'; +import { Subscription } from 'rxjs'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public +export function createCustomElement

(component: Type, config: NgElementConfig): NgElementConstructor

; + +// @public +export abstract class NgElement extends HTMLElement { + abstract attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void; + abstract connectedCallback(): void; + abstract disconnectedCallback(): void; + protected ngElementEventsSubscription: Subscription | null; + protected abstract ngElementStrategy: NgElementStrategy; +} + +// @public +export interface NgElementConfig { + injector: Injector; + strategyFactory?: NgElementStrategyFactory; +} + +// @public +export interface NgElementConstructor

{ + new (injector?: Injector): NgElement & WithProperties

; + readonly observedAttributes: string[]; +} + +// @public +export interface NgElementStrategy { + // (undocumented) + connect(element: HTMLElement): void; + // (undocumented) + disconnect(): void; + // (undocumented) + events: Observable; + // (undocumented) + getInputValue(propName: string): any; + // (undocumented) + setInputValue(propName: string, value: string): void; +} + +// @public +export interface NgElementStrategyEvent { + // (undocumented) + name: string; + // (undocumented) + value: any; +} + +// @public +export interface NgElementStrategyFactory { + create(injector: Injector): NgElementStrategy; +} + +// @public (undocumented) +export const VERSION: Version; + +// @public +export type WithProperties

= { + [property in keyof P]: P[property]; +}; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/forms/forms.d.ts b/goldens/public-api/forms/forms.md similarity index 73% rename from goldens/public-api/forms/forms.d.ts rename to goldens/public-api/forms/forms.md index ed8a0ee3366..8b13a2d4491 100644 --- a/goldens/public-api/forms/forms.d.ts +++ b/goldens/public-api/forms/forms.md @@ -1,39 +1,46 @@ -export declare abstract class AbstractControl { +## API Report File for "@angular/forms" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { AfterViewInit } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { EventEmitter } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { Injector } from '@angular/core'; +import { ModuleWithProviders } from '@angular/core'; +import { Observable } from 'rxjs'; +import { OnChanges } from '@angular/core'; +import { OnDestroy } from '@angular/core'; +import { OnInit } from '@angular/core'; +import { Renderer2 } from '@angular/core'; +import { SimpleChanges } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public +export abstract class AbstractControl { + constructor(validators: ValidatorFn | ValidatorFn[] | null, asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null); get asyncValidator(): AsyncValidatorFn | null; set asyncValidator(asyncValidatorFn: AsyncValidatorFn | null); - get dirty(): boolean; - get disabled(): boolean; - get enabled(): boolean; - readonly errors: ValidationErrors | null; - get invalid(): boolean; - get parent(): FormGroup | FormArray | null; - get pending(): boolean; - readonly pristine: boolean; - get root(): AbstractControl; - readonly status: string; - readonly statusChanges: Observable; - readonly touched: boolean; - get untouched(): boolean; - get updateOn(): FormHooks; - get valid(): boolean; - get validator(): ValidatorFn | null; - set validator(validatorFn: ValidatorFn | null); - readonly value: any; - readonly valueChanges: Observable; - constructor(validators: ValidatorFn | ValidatorFn[] | null, asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null); clearAsyncValidators(): void; clearValidators(): void; + get dirty(): boolean; disable(opts?: { onlySelf?: boolean; emitEvent?: boolean; }): void; + get disabled(): boolean; enable(opts?: { onlySelf?: boolean; emitEvent?: boolean; }): void; + get enabled(): boolean; + readonly errors: ValidationErrors | null; get(path: Array | string): AbstractControl | null; getError(errorCode: string, path?: Array | string): any; hasError(errorCode: string, path?: Array | string): boolean; + get invalid(): boolean; markAllAsTouched(): void; markAsDirty(opts?: { onlySelf?: boolean; @@ -51,32 +58,51 @@ export declare abstract class AbstractControl { markAsUntouched(opts?: { onlySelf?: boolean; }): void; + get parent(): FormGroup | FormArray | null; abstract patchValue(value: any, options?: Object): void; + get pending(): boolean; + readonly pristine: boolean; abstract reset(value?: any, options?: Object): void; + get root(): AbstractControl; setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[] | null): void; setErrors(errors: ValidationErrors | null, opts?: { emitEvent?: boolean; }): void; + // (undocumented) setParent(parent: FormGroup | FormArray): void; setValidators(newValidator: ValidatorFn | ValidatorFn[] | null): void; abstract setValue(value: any, options?: Object): void; + readonly status: string; + readonly statusChanges: Observable; + readonly touched: boolean; + get untouched(): boolean; + get updateOn(): FormHooks; updateValueAndValidity(opts?: { onlySelf?: boolean; emitEvent?: boolean; }): void; + get valid(): boolean; + get validator(): ValidatorFn | null; + set validator(validatorFn: ValidatorFn | null); + readonly value: any; + readonly valueChanges: Observable; } -export declare abstract class AbstractControlDirective { +// @public +export abstract class AbstractControlDirective { get asyncValidator(): AsyncValidatorFn | null; abstract get control(): AbstractControl | null; get dirty(): boolean | null; get disabled(): boolean | null; get enabled(): boolean | null; get errors(): ValidationErrors | null; + getError(errorCode: string, path?: Array | string): any; + hasError(errorCode: string, path?: Array | string): boolean; get invalid(): boolean | null; get path(): string[] | null; get pending(): boolean | null; get pristine(): boolean | null; + reset(value?: any): void; get status(): string | null; get statusChanges(): Observable | null; get touched(): boolean | null; @@ -85,68 +111,80 @@ export declare abstract class AbstractControlDirective { get validator(): ValidatorFn | null; get value(): any; get valueChanges(): Observable | null; - getError(errorCode: string, path?: Array | string): any; - hasError(errorCode: string, path?: Array | string): boolean; - reset(value?: any): void; } -export declare interface AbstractControlOptions { +// @public +export interface AbstractControlOptions { asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null; updateOn?: 'change' | 'blur' | 'submit'; validators?: ValidatorFn | ValidatorFn[] | null; } -export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { +// @public +export class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { get control(): FormGroup; get formDirective(): Form | null; - get path(): string[]; + // (undocumented) ngOnDestroy(): void; + // (undocumented) ngOnInit(): void; + get path(): string[]; } -export declare interface AsyncValidator extends Validator { +// @public +export interface AsyncValidator extends Validator { validate(control: AbstractControl): Promise | Observable; } -export declare interface AsyncValidatorFn { +// @public +export interface AsyncValidatorFn { + // (undocumented) (control: AbstractControl): Promise | Observable; } -export declare class CheckboxControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { +// @public +export class CheckboxControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { writeValue(value: any): void; } -export declare class CheckboxRequiredValidator extends RequiredValidator { +// @public +export class CheckboxRequiredValidator extends RequiredValidator { validate(control: AbstractControl): ValidationErrors | null; } -export declare const COMPOSITION_BUFFER_MODE: InjectionToken; +// @public +export const COMPOSITION_BUFFER_MODE: InjectionToken; -export declare abstract class ControlContainer extends AbstractControlDirective { +// @public +export abstract class ControlContainer extends AbstractControlDirective { get formDirective(): Form | null; name: string | number | null; get path(): string[] | null; } -export declare interface ControlValueAccessor { +// @public +export interface ControlValueAccessor { registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState?(isDisabled: boolean): void; writeValue(obj: any): void; } -export declare class DefaultValueAccessor extends ɵangular_packages_forms_forms_f implements ControlValueAccessor { +// @public +export class DefaultValueAccessor extends ɵangular_packages_forms_forms_f implements ControlValueAccessor { constructor(renderer: Renderer2, elementRef: ElementRef, _compositionMode: boolean); writeValue(value: any): void; } -export declare class EmailValidator implements Validator { +// @public +export class EmailValidator implements Validator { set email(value: boolean | string); registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; } -export declare interface Form { +// @public +export interface Form { addControl(dir: NgControl): void; addFormGroup(dir: AbstractFormGroupDirective): void; getControl(dir: NgControl): FormControl; @@ -156,18 +194,20 @@ export declare interface Form { updateModel(dir: NgControl, value: any): void; } -export declare class FormArray extends AbstractControl { - controls: AbstractControl[]; - get length(): number; +// @public +export class FormArray extends AbstractControl { constructor(controls: AbstractControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null); at(index: number): AbstractControl; clear(options?: { emitEvent?: boolean; }): void; + // (undocumented) + controls: AbstractControl[]; getRawValue(): any[]; insert(index: number, control: AbstractControl, options?: { emitEvent?: boolean; }): void; + get length(): number; patchValue(value: any[], options?: { onlySelf?: boolean; emitEvent?: boolean; @@ -191,30 +231,34 @@ export declare class FormArray extends AbstractControl { }): void; } -export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy { +// @public +export class FormArrayName extends ControlContainer implements OnInit, OnDestroy { + constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); get control(): FormArray; get formDirective(): FormGroupDirective | null; name: string | number | null; - get path(): string[]; - constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); ngOnDestroy(): void; ngOnInit(): void; + get path(): string[]; } -export declare class FormBuilder { +// @public +export class FormBuilder { array(controlsConfig: any[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormArray; control(formState: any, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl; group(controlsConfig: { [key: string]: any; }, options?: AbstractControlOptions | null): FormGroup; - /** @deprecated */ group(controlsConfig: { + // @deprecated + group(controlsConfig: { [key: string]: any; }, options: { [key: string]: any; }): FormGroup; } -export declare class FormControl extends AbstractControl { +// @public +export class FormControl extends AbstractControl { constructor(formState?: any, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null); patchValue(value: any, options?: { onlySelf?: boolean; @@ -236,38 +280,46 @@ export declare class FormControl extends AbstractControl { }): void; } -export declare class FormControlDirective extends NgControl implements OnChanges, OnDestroy { +// @public +export class FormControlDirective extends NgControl implements OnChanges, OnDestroy { + constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null); get control(): FormControl; form: FormControl; set isDisabled(isDisabled: boolean); - /** @deprecated */ model: any; - get path(): string[]; - /** @deprecated */ update: EventEmitter; - viewModel: any; - constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null); + // @deprecated (undocumented) + model: any; + // (undocumented) ngOnChanges(changes: SimpleChanges): void; + // (undocumented) ngOnDestroy(): void; + get path(): string[]; + // @deprecated (undocumented) + update: EventEmitter; + viewModel: any; viewToModelUpdate(newValue: any): void; } -export declare class FormControlName extends NgControl implements OnChanges, OnDestroy { +// @public +export class FormControlName extends NgControl implements OnChanges, OnDestroy { + constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null); readonly control: FormControl; get formDirective(): any; set isDisabled(isDisabled: boolean); - /** @deprecated */ model: any; + // @deprecated (undocumented) + model: any; name: string | number | null; - get path(): string[]; - /** @deprecated */ update: EventEmitter; - constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null); + // (undocumented) ngOnChanges(changes: SimpleChanges): void; + // (undocumented) ngOnDestroy(): void; + get path(): string[]; + // @deprecated (undocumented) + update: EventEmitter; viewToModelUpdate(newValue: any): void; } -export declare class FormGroup extends AbstractControl { - controls: { - [key: string]: AbstractControl; - }; +// @public +export class FormGroup extends AbstractControl { constructor(controls: { [key: string]: AbstractControl; }, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null); @@ -275,6 +327,10 @@ export declare class FormGroup extends AbstractControl { emitEvent?: boolean; }): void; contains(controlName: string): boolean; + // (undocumented) + controls: { + [key: string]: AbstractControl; + }; getRawValue(): any; patchValue(value: { [key: string]: any; @@ -301,120 +357,148 @@ export declare class FormGroup extends AbstractControl { }): void; } -export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges, OnDestroy { - get control(): FormGroup; - directives: FormControlName[]; - form: FormGroup; - get formDirective(): Form; - ngSubmit: EventEmitter; - get path(): string[]; - readonly submitted: boolean; +// @public +export class FormGroupDirective extends ControlContainer implements Form, OnChanges, OnDestroy { constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); addControl(dir: FormControlName): FormControl; addFormArray(dir: FormArrayName): void; addFormGroup(dir: FormGroupName): void; + get control(): FormGroup; + directives: FormControlName[]; + form: FormGroup; + get formDirective(): Form; getControl(dir: FormControlName): FormControl; getFormArray(dir: FormArrayName): FormArray; getFormGroup(dir: FormGroupName): FormGroup; + // (undocumented) ngOnChanges(changes: SimpleChanges): void; + // (undocumented) ngOnDestroy(): void; + ngSubmit: EventEmitter; onReset(): void; onSubmit($event: Event): boolean; + get path(): string[]; removeControl(dir: FormControlName): void; removeFormArray(dir: FormArrayName): void; removeFormGroup(dir: FormGroupName): void; resetForm(value?: any): void; + readonly submitted: boolean; updateModel(dir: FormControlName, value: any): void; -} + } -export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { - name: string | number | null; +// @public +export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); + name: string | number | null; } -export declare class FormsModule { +// @public +export class FormsModule { } -export declare class MaxLengthValidator implements Validator, OnChanges { +// @public +export class MaxLengthValidator implements Validator, OnChanges { maxlength: string | number; + // (undocumented) ngOnChanges(changes: SimpleChanges): void; registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; -} + } -export declare class MaxValidator extends AbstractValidatorDirective implements OnChanges { +// @public +export class MaxValidator extends AbstractValidatorDirective implements OnChanges { max: string | number; ngOnChanges(changes: SimpleChanges): void; } -export declare class MinLengthValidator implements Validator, OnChanges { +// @public +export class MinLengthValidator implements Validator, OnChanges { minlength: string | number; + // (undocumented) ngOnChanges(changes: SimpleChanges): void; registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; -} + } -export declare class MinValidator extends AbstractValidatorDirective implements OnChanges { +// @public +export class MinValidator extends AbstractValidatorDirective implements OnChanges { min: string | number; ngOnChanges(changes: SimpleChanges): void; } -export declare const NG_ASYNC_VALIDATORS: InjectionToken<(Function | Validator)[]>; +// @public +export const NG_ASYNC_VALIDATORS: InjectionToken<(Function | Validator)[]>; -export declare const NG_VALIDATORS: InjectionToken<(Function | Validator)[]>; +// @public +export const NG_VALIDATORS: InjectionToken<(Function | Validator)[]>; -export declare const NG_VALUE_ACCESSOR: InjectionToken; +// @public +export const NG_VALUE_ACCESSOR: InjectionToken; -export declare abstract class NgControl extends AbstractControlDirective { +// @public +export abstract class NgControl extends AbstractControlDirective { name: string | number | null; valueAccessor: ControlValueAccessor | null; abstract viewToModelUpdate(newValue: any): void; } -export declare class NgControlStatus extends ɵangular_packages_forms_forms_i { +// @public +export class NgControlStatus extends ɵangular_packages_forms_forms_i { constructor(cd: NgControl); } -export declare class NgControlStatusGroup extends ɵangular_packages_forms_forms_i { +// @public +export class NgControlStatusGroup extends ɵangular_packages_forms_forms_i { constructor(cd: ControlContainer); } -export declare class NgForm extends ControlContainer implements Form, AfterViewInit { +// @public +export class NgForm extends ControlContainer implements Form, AfterViewInit { + constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); + addControl(dir: NgModel): void; + addFormGroup(dir: NgModelGroup): void; get control(): FormGroup; get controls(): { [key: string]: AbstractControl; }; form: FormGroup; get formDirective(): Form; + getControl(dir: NgModel): FormControl; + getFormGroup(dir: NgModelGroup): FormGroup; + // (undocumented) + ngAfterViewInit(): void; ngSubmit: EventEmitter; + onReset(): void; + onSubmit($event: Event): boolean; options: { updateOn?: FormHooks; }; get path(): string[]; - readonly submitted: boolean; - constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); - addControl(dir: NgModel): void; - addFormGroup(dir: NgModelGroup): void; - getControl(dir: NgModel): FormControl; - getFormGroup(dir: NgModelGroup): FormGroup; - ngAfterViewInit(): void; - onReset(): void; - onSubmit($event: Event): boolean; removeControl(dir: NgModel): void; removeFormGroup(dir: NgModelGroup): void; resetForm(value?: any): void; setValue(value: { [key: string]: any; }): void; + readonly submitted: boolean; updateModel(dir: NgControl, value: any): void; } -export declare class NgModel extends NgControl implements OnChanges, OnDestroy { +// @public +export class NgModel extends NgControl implements OnChanges, OnDestroy { + constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[]); + // (undocumented) readonly control: FormControl; get formDirective(): any; isDisabled: boolean; model: any; name: string; + // (undocumented) + static ngAcceptInputType_isDisabled: boolean | string; + // (undocumented) + ngOnChanges(changes: SimpleChanges): void; + // (undocumented) + ngOnDestroy(): void; options: { name?: string; standalone?: boolean; @@ -423,97 +507,115 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { get path(): string[]; update: EventEmitter; viewModel: any; - constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[]); - ngOnChanges(changes: SimpleChanges): void; - ngOnDestroy(): void; viewToModelUpdate(newValue: any): void; - static ngAcceptInputType_isDisabled: boolean | string; } -export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { - name: string; +// @public +export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]); + name: string; } -export declare class NgSelectOption implements OnDestroy { +// @public +export class NgSelectOption implements OnDestroy { + constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor); id: string; + // (undocumented) + ngOnDestroy(): void; set ngValue(value: any); set value(value: any); - constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor); - ngOnDestroy(): void; } -export declare class NumberValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { +// @public +export class NumberValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { registerOnChange(fn: (_: number | null) => void): void; writeValue(value: number): void; } -export declare class PatternValidator implements Validator, OnChanges { - pattern: string | RegExp; +// @public +export class PatternValidator implements Validator, OnChanges { + // (undocumented) ngOnChanges(changes: SimpleChanges): void; + pattern: string | RegExp; registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; -} + } -export declare class RadioControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor, OnDestroy, OnInit { - formControlName: string; - name: string; - onChange: () => void; - value: any; +// @public +export class RadioControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor, OnDestroy, OnInit { constructor(renderer: Renderer2, elementRef: ElementRef, _registry: ɵangular_packages_forms_forms_r, _injector: Injector); fireUncheck(value: any): void; + formControlName: string; + name: string; + // (undocumented) ngOnDestroy(): void; + // (undocumented) ngOnInit(): void; + onChange: () => void; registerOnChange(fn: (_: any) => {}): void; + value: any; writeValue(value: any): void; } -export declare class RangeValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { +// @public +export class RangeValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { registerOnChange(fn: (_: number | null) => void): void; writeValue(value: any): void; } -export declare class ReactiveFormsModule { - static withConfig(opts: { warnOnNgModelWithFormControl: 'never' | 'once' | 'always'; +// @public +export class ReactiveFormsModule { + static withConfig(opts: { + warnOnNgModelWithFormControl: 'never' | 'once' | 'always'; }): ModuleWithProviders; } -export declare class RequiredValidator implements Validator { +// @public +export class RequiredValidator implements Validator { + registerOnValidatorChange(fn: () => void): void; get required(): boolean | string; set required(value: boolean | string); - registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; } -export declare class SelectControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { +// @public +export class SelectControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { set compareWith(fn: (o1: any, o2: any) => boolean); - value: any; registerOnChange(fn: (value: any) => any): void; + // (undocumented) + value: any; writeValue(value: any): void; } -export declare class SelectMultipleControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { +// @public +export class SelectMultipleControlValueAccessor extends ɵangular_packages_forms_forms_g implements ControlValueAccessor { set compareWith(fn: (o1: any, o2: any) => boolean); - value: any; registerOnChange(fn: (value: any) => any): void; + value: any; writeValue(value: any): void; } -export declare type ValidationErrors = { +// @public +export type ValidationErrors = { [key: string]: any; }; -export declare interface Validator { +// @public +export interface Validator { registerOnValidatorChange?(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; } -export declare interface ValidatorFn { +// @public +export interface ValidatorFn { + // (undocumented) (control: AbstractControl): ValidationErrors | null; } -export declare class Validators { +// @public +export class Validators { static compose(validators: null): null; + // (undocumented) static compose(validators: (ValidatorFn | null | undefined)[]): ValidatorFn | null; static composeAsync(validators: (AsyncValidatorFn | null)[]): AsyncValidatorFn | null; static email(control: AbstractControl): ValidationErrors | null; @@ -527,4 +629,10 @@ export declare class Validators { static requiredTrue(control: AbstractControl): ValidationErrors | null; } -export declare const VERSION: Version; +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/localize/index.d.ts b/goldens/public-api/localize/index.d.ts deleted file mode 100644 index 3776ccded20..00000000000 --- a/goldens/public-api/localize/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function clearTranslations(): void; - -export declare function loadTranslations(translations: Record): void; diff --git a/goldens/public-api/localize/index.md b/goldens/public-api/localize/index.md new file mode 100644 index 00000000000..d0553511b15 --- /dev/null +++ b/goldens/public-api/localize/index.md @@ -0,0 +1,16 @@ +## API Report File for "@angular/localize" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export function clearTranslations(): void; + +// @public +export function loadTranslations(translations: Record): void; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/localize/init/index.d.ts b/goldens/public-api/localize/init/index.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/goldens/public-api/localize/init/index.md b/goldens/public-api/localize/init/index.md new file mode 100644 index 00000000000..7a46eab0b5a --- /dev/null +++ b/goldens/public-api/localize/init/index.md @@ -0,0 +1,27 @@ +## API Report File for "@angular/localize_init" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export const $localize: LocalizeFn; + +// @public (undocumented) +export interface LocalizeFn { + // (undocumented) + (messageParts: TemplateStringsArray, ...expressions: readonly any[]): string; + locale?: string; + translate?: TranslateFn; +} + +// @public (undocumented) +export interface TranslateFn { + // (undocumented) + (messageParts: TemplateStringsArray, expressions: readonly any[]): [TemplateStringsArray, readonly any[]]; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts b/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts deleted file mode 100644 index 5ce1bab855b..00000000000 --- a/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare class JitCompilerFactory implements CompilerFactory { - createCompiler(options?: CompilerOptions[]): Compiler; -} - -export declare const platformBrowserDynamic: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -export declare const RESOURCE_CACHE_PROVIDER: Provider[]; - -export declare const VERSION: Version; diff --git a/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.md b/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.md new file mode 100644 index 00000000000..378f5ca2b7c --- /dev/null +++ b/goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.md @@ -0,0 +1,33 @@ +## API Report File for "@angular/platform-browser-dynamic" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Compiler } from '@angular/core'; +import { CompilerFactory } from '@angular/core'; +import { CompilerOptions } from '@angular/core'; +import { PlatformRef } from '@angular/core'; +import { Provider } from '@angular/core'; +import { StaticProvider } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public (undocumented) +export class JitCompilerFactory implements CompilerFactory { + // (undocumented) + createCompiler(options?: CompilerOptions[]): Compiler; + } + +// @public (undocumented) +export const platformBrowserDynamic: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + +// @public (undocumented) +export const RESOURCE_CACHE_PROVIDER: Provider[]; + +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-browser-dynamic/testing/testing.d.ts b/goldens/public-api/platform-browser-dynamic/testing/testing.d.ts deleted file mode 100644 index 7e0f94e0223..00000000000 --- a/goldens/public-api/platform-browser-dynamic/testing/testing.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class BrowserDynamicTestingModule { -} - -export declare const platformBrowserDynamicTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; diff --git a/goldens/public-api/platform-browser-dynamic/testing/testing.md b/goldens/public-api/platform-browser-dynamic/testing/testing.md new file mode 100644 index 00000000000..8d22e574316 --- /dev/null +++ b/goldens/public-api/platform-browser-dynamic/testing/testing.md @@ -0,0 +1,20 @@ +## API Report File for "@angular/platform-browser-dynamic_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { PlatformRef } from '@angular/core'; +import { StaticProvider } from '@angular/core'; + +// @public +export class BrowserDynamicTestingModule { +} + +// @public (undocumented) +export const platformBrowserDynamicTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-browser/animations/animations.d.ts b/goldens/public-api/platform-browser/animations/animations.d.ts deleted file mode 100644 index e9e74509919..00000000000 --- a/goldens/public-api/platform-browser/animations/animations.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">; - -export declare class BrowserAnimationsModule { - static withConfig(config: BrowserAnimationsModuleConfig): ModuleWithProviders; -} - -export declare interface BrowserAnimationsModuleConfig { - disableAnimations?: boolean; -} - -export declare class NoopAnimationsModule { -} diff --git a/goldens/public-api/platform-browser/animations/animations.md b/goldens/public-api/platform-browser/animations/animations.md new file mode 100644 index 00000000000..f19f1a06c1e --- /dev/null +++ b/goldens/public-api/platform-browser/animations/animations.md @@ -0,0 +1,30 @@ +## API Report File for "@angular/platform-browser_animations" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { InjectionToken } from '@angular/core'; +import { ModuleWithProviders } from '@angular/core'; + +// @public (undocumented) +export const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">; + +// @public +export class BrowserAnimationsModule { + static withConfig(config: BrowserAnimationsModuleConfig): ModuleWithProviders; +} + +// @public +export interface BrowserAnimationsModuleConfig { + disableAnimations?: boolean; +} + +// @public +export class NoopAnimationsModule { +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-browser/platform-browser.d.ts b/goldens/public-api/platform-browser/platform-browser.md similarity index 50% rename from goldens/public-api/platform-browser/platform-browser.d.ts rename to goldens/public-api/platform-browser/platform-browser.md index 8f1bdeb7fc1..06c231fc92c 100644 --- a/goldens/public-api/platform-browser/platform-browser.d.ts +++ b/goldens/public-api/platform-browser/platform-browser.md @@ -1,22 +1,47 @@ -export declare class BrowserModule { +## API Report File for "@angular/platform-browser" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ComponentRef } from '@angular/core'; +import { DebugElement } from '@angular/core'; +import { DebugNode } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { ModuleWithProviders } from '@angular/core'; +import { NgZone } from '@angular/core'; +import { PlatformRef } from '@angular/core'; +import { Predicate } from '@angular/core'; +import { Sanitizer } from '@angular/core'; +import { SecurityContext } from '@angular/core'; +import { StaticProvider } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public +export class BrowserModule { constructor(parentModule: BrowserModule | null); static withServerTransition(params: { appId: string; }): ModuleWithProviders; } -export declare class BrowserTransferStateModule { +// @public +export class BrowserTransferStateModule { } -export declare class By { +// @public +export class By { static all(): Predicate; static css(selector: string): Predicate; static directive(type: Type): Predicate; } -export declare function disableDebugTools(): void; +// @public +export function disableDebugTools(): void; -export declare abstract class DomSanitizer implements Sanitizer { +// @public +export abstract class DomSanitizer implements Sanitizer { abstract bypassSecurityTrustHtml(value: string): SafeHtml; abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl; abstract bypassSecurityTrustScript(value: string): SafeScript; @@ -25,22 +50,30 @@ export declare abstract class DomSanitizer implements Sanitizer { abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null; } -export declare function enableDebugTools(ref: ComponentRef): ComponentRef; +// @public +export function enableDebugTools(ref: ComponentRef): ComponentRef; -export declare const EVENT_MANAGER_PLUGINS: InjectionToken<ɵangular_packages_platform_browser_platform_browser_g[]>; +// @public +export const EVENT_MANAGER_PLUGINS: InjectionToken<ɵangular_packages_platform_browser_platform_browser_g[]>; -export declare class EventManager { +// @public +export class EventManager { constructor(plugins: ɵangular_packages_platform_browser_platform_browser_g[], _zone: NgZone); addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; - /** @deprecated */ addGlobalEventListener(target: string, eventName: string, handler: Function): Function; + // @deprecated + addGlobalEventListener(target: string, eventName: string, handler: Function): Function; getZone(): NgZone; -} + } -export declare const HAMMER_GESTURE_CONFIG: InjectionToken; +// @public +export const HAMMER_GESTURE_CONFIG: InjectionToken; -export declare const HAMMER_LOADER: InjectionToken; +// @public +export const HAMMER_LOADER: InjectionToken; -export declare class HammerGestureConfig { +// @public +export class HammerGestureConfig { + buildHammer(element: HTMLElement): HammerInstance; events: string[]; options?: { cssProps?: any; @@ -55,17 +88,20 @@ export declare class HammerGestureConfig { overrides: { [key: string]: Object; }; - buildHammer(element: HTMLElement): HammerInstance; } -export declare type HammerLoader = () => Promise; +// @public +export type HammerLoader = () => Promise; -export declare class HammerModule { +// @public +export class HammerModule { } -export declare function makeStateKey(key: string): StateKey; +// @public +export function makeStateKey(key: string): StateKey; -export declare class Meta { +// @public +export class Meta { constructor(_doc: any); addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null; addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[]; @@ -76,7 +112,8 @@ export declare class Meta { updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null; } -export declare type MetaDefinition = { +// @public +export type MetaDefinition = { charset?: string; content?: string; httpEquiv?: string; @@ -90,37 +127,47 @@ export declare type MetaDefinition = { [prop: string]: string; }; -export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef; +// @public +export const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef; -export declare interface SafeHtml extends SafeValue { +// @public +export interface SafeHtml extends SafeValue { } -export declare interface SafeResourceUrl extends SafeValue { +// @public +export interface SafeResourceUrl extends SafeValue { } -export declare interface SafeScript extends SafeValue { +// @public +export interface SafeScript extends SafeValue { } -export declare interface SafeStyle extends SafeValue { +// @public +export interface SafeStyle extends SafeValue { } -export declare interface SafeUrl extends SafeValue { +// @public +export interface SafeUrl extends SafeValue { } -export declare interface SafeValue { +// @public +export interface SafeValue { } -export declare type StateKey = string & { +// @public +export type StateKey = string & { __not_a_string: never; }; -export declare class Title { +// @public +export class Title { constructor(_doc: any); getTitle(): string; setTitle(newTitle: string): void; } -export declare class TransferState { +// @public +export class TransferState { get(key: StateKey, defaultValue: T): T; hasKey(key: StateKey): boolean; onSerialize(key: StateKey, callback: () => T): void; @@ -129,4 +176,10 @@ export declare class TransferState { toJson(): string; } -export declare const VERSION: Version; +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-browser/testing/testing.d.ts b/goldens/public-api/platform-browser/testing/testing.d.ts deleted file mode 100644 index 15ef7eaa5b2..00000000000 --- a/goldens/public-api/platform-browser/testing/testing.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class BrowserTestingModule { -} - -export declare const platformBrowserTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; diff --git a/goldens/public-api/platform-browser/testing/testing.md b/goldens/public-api/platform-browser/testing/testing.md new file mode 100644 index 00000000000..255d091f075 --- /dev/null +++ b/goldens/public-api/platform-browser/testing/testing.md @@ -0,0 +1,20 @@ +## API Report File for "@angular/platform-browser_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { PlatformRef } from '@angular/core'; +import { StaticProvider } from '@angular/core'; + +// @public +export class BrowserTestingModule { +} + +// @public +export const platformBrowserTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-server/init/init.d.ts b/goldens/public-api/platform-server/init/init.d.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/goldens/public-api/platform-server/init/init.md b/goldens/public-api/platform-server/init/init.md new file mode 100644 index 00000000000..03c40608bb4 --- /dev/null +++ b/goldens/public-api/platform-server/init/init.md @@ -0,0 +1,10 @@ +## API Report File for "@angular/platform-server_init" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-server/platform-server.d.ts b/goldens/public-api/platform-server/platform-server.d.ts deleted file mode 100644 index 490599c709a..00000000000 --- a/goldens/public-api/platform-server/platform-server.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise)[]>; - -export declare const INITIAL_CONFIG: InjectionToken; - -export declare interface PlatformConfig { - baseUrl?: string; - document?: string; - url?: string; - useAbsoluteUrl?: boolean; -} - -export declare const platformDynamicServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -export declare const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -export declare class PlatformState { - constructor(_doc: any); - getDocument(): any; - renderToString(): string; -} - -export declare function renderModule(module: Type, options: { - document?: string; - url?: string; - extraProviders?: StaticProvider[]; -}): Promise; - -export declare function renderModuleFactory(moduleFactory: NgModuleFactory, options: { - document?: string; - url?: string; - extraProviders?: StaticProvider[]; -}): Promise; - -export declare class ServerModule { -} - -export declare class ServerTransferStateModule { -} - -export declare const VERSION: Version; diff --git a/goldens/public-api/platform-server/platform-server.md b/goldens/public-api/platform-server/platform-server.md new file mode 100644 index 00000000000..1dff2f3fb43 --- /dev/null +++ b/goldens/public-api/platform-server/platform-server.md @@ -0,0 +1,69 @@ +## API Report File for "@angular/platform-server" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { InjectionToken } from '@angular/core'; +import { NgModuleFactory } from '@angular/core'; +import { PlatformRef } from '@angular/core'; +import { StaticProvider } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public +export const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise)[]>; + +// @public +export const INITIAL_CONFIG: InjectionToken; + +// @public +export interface PlatformConfig { + baseUrl?: string; + document?: string; + url?: string; + useAbsoluteUrl?: boolean; +} + +// @public +export const platformDynamicServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + +// @public (undocumented) +export const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + +// @public +export class PlatformState { + constructor(_doc: any); + getDocument(): any; + renderToString(): string; +} + +// @public +export function renderModule(module: Type, options: { + document?: string; + url?: string; + extraProviders?: StaticProvider[]; +}): Promise; + +// @public +export function renderModuleFactory(moduleFactory: NgModuleFactory, options: { + document?: string; + url?: string; + extraProviders?: StaticProvider[]; +}): Promise; + +// @public +export class ServerModule { +} + +// @public +export class ServerTransferStateModule { +} + +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-server/testing/testing.d.ts b/goldens/public-api/platform-server/testing/testing.d.ts deleted file mode 100644 index 4caf9966d28..00000000000 --- a/goldens/public-api/platform-server/testing/testing.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const platformServerTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -export declare class ServerTestingModule { -} diff --git a/goldens/public-api/platform-server/testing/testing.md b/goldens/public-api/platform-server/testing/testing.md new file mode 100644 index 00000000000..20837e2865d --- /dev/null +++ b/goldens/public-api/platform-server/testing/testing.md @@ -0,0 +1,20 @@ +## API Report File for "@angular/platform-server_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { PlatformRef } from '@angular/core'; +import { StaticProvider } from '@angular/core'; + +// @public +export const platformServerTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; + +// @public +export class ServerTestingModule { +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts b/goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts deleted file mode 100644 index f2abbd6e3b2..00000000000 --- a/goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** @deprecated */ -export declare const platformWorkerAppDynamic: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -/** @deprecated */ -export declare const VERSION: Version; diff --git a/goldens/public-api/platform-webworker/platform-webworker.d.ts b/goldens/public-api/platform-webworker/platform-webworker.d.ts deleted file mode 100644 index 7f6d2ac8ed4..00000000000 --- a/goldens/public-api/platform-webworker/platform-webworker.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** @deprecated */ -export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: StaticProvider[]): Promise; - -/** @deprecated */ -export declare class ClientMessageBroker { - runOnService(args: UiArguments, returnType: Type | SerializerTypes | null): Promise | null; -} - -/** @deprecated */ -export declare class ClientMessageBrokerFactory { - createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker; -} - -/** @deprecated */ -export declare class FnArg { - type: Type | SerializerTypes; - value: any; - constructor(value: any, type?: Type | SerializerTypes); -} - -/** @deprecated */ -export declare abstract class MessageBus implements MessageBusSource, MessageBusSink { - abstract attachToZone(zone: NgZone): void; - abstract from(channel: string): EventEmitter; - abstract initChannel(channel: string, runInZone?: boolean): void; - abstract to(channel: string): EventEmitter; -} - -/** @deprecated */ -export declare interface MessageBusSink { - attachToZone(zone: NgZone): void; - initChannel(channel: string, runInZone: boolean): void; - to(channel: string): EventEmitter; -} - -/** @deprecated */ -export declare interface MessageBusSource { - attachToZone(zone: NgZone): void; - from(channel: string): EventEmitter; - initChannel(channel: string, runInZone: boolean): void; -} - -/** @deprecated */ -export declare const platformWorkerApp: (extraProviders?: StaticProvider[] | undefined) => PlatformRef; - -/** @deprecated */ -export declare const platformWorkerUi: (extraProviders?: StaticProvider[] | undefined) => import("@angular/core").PlatformRef; - -/** @deprecated */ -export declare interface ReceivedMessage { - args: any[]; - id: string; - method: string; - type: string; -} - -/** @deprecated */ -export declare const enum SerializerTypes { - RENDERER_TYPE_2 = 0, - PRIMITIVE = 1, - RENDER_STORE_OBJECT = 2 -} - -/** @deprecated */ -export declare class ServiceMessageBroker { - registerMethod(methodName: string, signature: Array | SerializerTypes> | null, method: (..._: any[]) => Promise | void, returnType?: Type | SerializerTypes): void; -} - -/** @deprecated */ -export declare class ServiceMessageBrokerFactory { - createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker; -} - -/** @deprecated */ -export declare class UiArguments { - args?: FnArg[] | undefined; - method: string; - constructor(method: string, args?: FnArg[] | undefined); -} - -/** @deprecated */ -export declare const VERSION: Version; - -/** @deprecated */ -export declare const WORKER_APP_LOCATION_PROVIDERS: StaticProvider[]; - -/** @deprecated */ -export declare const WORKER_UI_LOCATION_PROVIDERS: StaticProvider[]; - -/** @deprecated */ -export declare class WorkerAppModule { -} diff --git a/goldens/public-api/router/router.d.ts b/goldens/public-api/router/router.md similarity index 63% rename from goldens/public-api/router/router.d.ts rename to goldens/public-api/router/router.md index 89c5e9d7042..1166618529f 100644 --- a/goldens/public-api/router/router.d.ts +++ b/goldens/public-api/router/router.md @@ -1,4 +1,36 @@ -export declare class ActivatedRoute { +## API Report File for "@angular/router" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { AfterContentInit } from '@angular/core'; +import { ChangeDetectorRef } from '@angular/core'; +import { Compiler } from '@angular/core'; +import { ComponentFactoryResolver } from '@angular/core'; +import { ComponentRef } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { EventEmitter } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { Injector } from '@angular/core'; +import { Location } from '@angular/common'; +import { LocationStrategy } from '@angular/common'; +import { ModuleWithProviders } from '@angular/core'; +import { NgModuleFactory } from '@angular/core'; +import { NgModuleFactoryLoader } from '@angular/core'; +import { Observable } from 'rxjs'; +import { OnChanges } from '@angular/core'; +import { OnDestroy } from '@angular/core'; +import { OnInit } from '@angular/core'; +import { QueryList } from '@angular/core'; +import { Renderer2 } from '@angular/core'; +import { SimpleChanges } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; +import { ViewContainerRef } from '@angular/core'; + +// @public +export class ActivatedRoute { get children(): ActivatedRoute[]; component: Type | string | null; data: Observable; @@ -14,44 +46,56 @@ export declare class ActivatedRoute { get root(): ActivatedRoute; get routeConfig(): Route | null; snapshot: ActivatedRouteSnapshot; - url: Observable; + // (undocumented) toString(): string; + url: Observable; } -export declare class ActivatedRouteSnapshot { +// @public +export class ActivatedRouteSnapshot { get children(): ActivatedRouteSnapshot[]; component: Type | string | null; data: Data; get firstChild(): ActivatedRouteSnapshot | null; fragment: string | null; outlet: string; + // (undocumented) get paramMap(): ParamMap; params: Params; get parent(): ActivatedRouteSnapshot | null; get pathFromRoot(): ActivatedRouteSnapshot[]; + // (undocumented) get queryParamMap(): ParamMap; queryParams: Params; get root(): ActivatedRouteSnapshot; readonly routeConfig: Route | null; + // (undocumented) + toString(): string; url: UrlSegment[]; - toString(): string; } -export declare class ActivationEnd { - snapshot: ActivatedRouteSnapshot; +// @public +export class ActivationEnd { constructor( snapshot: ActivatedRouteSnapshot); + // (undocumented) + snapshot: ActivatedRouteSnapshot; + // (undocumented) toString(): string; } -export declare class ActivationStart { - snapshot: ActivatedRouteSnapshot; +// @public +export class ActivationStart { constructor( snapshot: ActivatedRouteSnapshot); + // (undocumented) + snapshot: ActivatedRouteSnapshot; + // (undocumented) toString(): string; } -export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrategy { +// @public +export abstract class BaseRouteReuseStrategy implements RouteReuseStrategy { retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null; shouldAttach(route: ActivatedRouteSnapshot): boolean; shouldDetach(route: ActivatedRouteSnapshot): boolean; @@ -59,64 +103,88 @@ export declare abstract class BaseRouteReuseStrategy implements RouteReuseStrate store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void; } -export declare interface CanActivate { +// @public +export interface CanActivate { + // (undocumented) canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree; } -export declare interface CanActivateChild { +// @public +export interface CanActivateChild { + // (undocumented) canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree; } -export declare interface CanDeactivate { +// @public +export interface CanDeactivate { + // (undocumented) canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable | Promise | boolean | UrlTree; } -export declare interface CanLoad { +// @public +export interface CanLoad { + // (undocumented) canLoad(route: Route, segments: UrlSegment[]): Observable | Promise | boolean | UrlTree; } -export declare class ChildActivationEnd { - snapshot: ActivatedRouteSnapshot; +// @public +export class ChildActivationEnd { constructor( snapshot: ActivatedRouteSnapshot); + // (undocumented) + snapshot: ActivatedRouteSnapshot; + // (undocumented) toString(): string; } -export declare class ChildActivationStart { - snapshot: ActivatedRouteSnapshot; +// @public +export class ChildActivationStart { constructor( snapshot: ActivatedRouteSnapshot); + // (undocumented) + snapshot: ActivatedRouteSnapshot; + // (undocumented) toString(): string; } -export declare class ChildrenOutletContexts { +// @public +export class ChildrenOutletContexts { + // (undocumented) getContext(childName: string): OutletContext | null; + // (undocumented) getOrCreateContext(childName: string): OutletContext; onChildOutletCreated(childName: string, outlet: RouterOutletContract): void; onChildOutletDestroyed(childName: string): void; onOutletDeactivated(): Map; + // (undocumented) onOutletReAttached(contexts: Map): void; } -export declare function convertToParamMap(params: Params): ParamMap; +// @public +export function convertToParamMap(params: Params): ParamMap; -export declare type Data = { +// @public +export type Data = { [name: string]: any; }; -export declare class DefaultUrlSerializer implements UrlSerializer { +// @public +export class DefaultUrlSerializer implements UrlSerializer { parse(url: string): UrlTree; serialize(tree: UrlTree): string; } -/** @deprecated */ -export declare type DeprecatedLoadChildren = string; +// @public @deprecated +export type DeprecatedLoadChildren = string; -export declare type DetachedRouteHandle = {}; +// @public +export type DetachedRouteHandle = {}; -export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; +// @public +export type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll; -export declare interface ExtraOptions { +// @public +export interface ExtraOptions { anchorScrolling?: 'disabled' | 'enabled'; enableTracing?: boolean; errorHandler?: ErrorHandler; @@ -132,44 +200,58 @@ export declare interface ExtraOptions { useHash?: boolean; } -export declare class GuardsCheckEnd extends RouterEvent { - shouldActivate: boolean; - state: RouterStateSnapshot; - urlAfterRedirects: string; +// @public +export class GuardsCheckEnd extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot, shouldActivate: boolean); + // (undocumented) + shouldActivate: boolean; + // (undocumented) + state: RouterStateSnapshot; + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare class GuardsCheckStart extends RouterEvent { - state: RouterStateSnapshot; - urlAfterRedirects: string; +// @public +export class GuardsCheckStart extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot); + // (undocumented) + state: RouterStateSnapshot; + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare type InitialNavigation = 'disabled' | 'enabled' | 'enabledBlocking' | 'enabledNonBlocking'; +// @public +export type InitialNavigation = 'disabled' | 'enabled' | 'enabledBlocking' | 'enabledNonBlocking'; -export declare interface IsActiveMatchOptions { +// @public +export interface IsActiveMatchOptions { fragment: 'exact' | 'ignored'; matrixParams: 'exact' | 'subset' | 'ignored'; paths: 'exact' | 'subset'; queryParams: 'exact' | 'subset' | 'ignored'; } -export declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren; +// @public +export type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren; -export declare type LoadChildrenCallback = () => Type | NgModuleFactory | Observable> | Promise | Type | any>; +// @public +export type LoadChildrenCallback = () => Type | NgModuleFactory | Observable> | Promise | Type | any>; -export declare interface Navigation { +// @public +export interface Navigation { extractedUrl: UrlTree; extras: NavigationExtras; finalUrl?: UrlTree; @@ -179,7 +261,8 @@ export declare interface Navigation { trigger: 'imperative' | 'popstate' | 'hashchange'; } -export declare interface NavigationBehaviorOptions { +// @public +export interface NavigationBehaviorOptions { replaceUrl?: boolean; skipLocationChange?: boolean; state?: { @@ -187,42 +270,48 @@ export declare interface NavigationBehaviorOptions { }; } -export declare class NavigationCancel extends RouterEvent { - reason: string; +// @public +export class NavigationCancel extends RouterEvent { constructor( id: number, url: string, reason: string); + // (undocumented) + reason: string; + // (undocumented) toString(): string; } -export declare class NavigationEnd extends RouterEvent { - urlAfterRedirects: string; +// @public +export class NavigationEnd extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string); + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare class NavigationError extends RouterEvent { - error: any; +// @public +export class NavigationError extends RouterEvent { constructor( id: number, url: string, error: any); + // (undocumented) + error: any; + // (undocumented) toString(): string; } -export declare interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions { +// @public +export interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions { } -export declare class NavigationStart extends RouterEvent { - navigationTrigger?: 'imperative' | 'popstate' | 'hashchange'; - restoredState?: { - [k: string]: any; - navigationId: number; - } | null; +// @public +export class NavigationStart extends RouterEvent { constructor( id: number, url: string, @@ -231,77 +320,112 @@ export declare class NavigationStart extends RouterEvent { [k: string]: any; navigationId: number; } | null); + navigationTrigger?: 'imperative' | 'popstate' | 'hashchange'; + restoredState?: { + [k: string]: any; + navigationId: number; + } | null; + // (undocumented) toString(): string; } -export declare class NoPreloading implements PreloadingStrategy { +// @public +export class NoPreloading implements PreloadingStrategy { + // (undocumented) preload(route: Route, fn: () => Observable): Observable; } -export declare class OutletContext { +// @public +export class OutletContext { + // (undocumented) attachRef: ComponentRef | null; + // (undocumented) children: ChildrenOutletContexts; + // (undocumented) outlet: RouterOutletContract | null; + // (undocumented) resolver: ComponentFactoryResolver | null; + // (undocumented) route: ActivatedRoute | null; } -export declare interface ParamMap { - readonly keys: string[]; +// @public +export interface ParamMap { get(name: string): string | null; getAll(name: string): string[]; has(name: string): boolean; + readonly keys: string[]; } -export declare type Params = { +// @public +export type Params = { [key: string]: any; }; -export declare class PreloadAllModules implements PreloadingStrategy { +// @public +export class PreloadAllModules implements PreloadingStrategy { + // (undocumented) preload(route: Route, fn: () => Observable): Observable; } -export declare abstract class PreloadingStrategy { +// @public +export abstract class PreloadingStrategy { + // (undocumented) abstract preload(route: Route, fn: () => Observable): Observable; } -export declare const PRIMARY_OUTLET = "primary"; +// @public +export const PRIMARY_OUTLET = "primary"; -export declare function provideRoutes(routes: Routes): any; +// @public +export function provideRoutes(routes: Routes): any; -export declare type QueryParamsHandling = 'merge' | 'preserve' | ''; +// @public +export type QueryParamsHandling = 'merge' | 'preserve' | ''; -export declare interface Resolve { +// @public +export interface Resolve { + // (undocumented) resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | T; } -export declare type ResolveData = { +// @public +export type ResolveData = { [name: string]: any; }; -export declare class ResolveEnd extends RouterEvent { - state: RouterStateSnapshot; - urlAfterRedirects: string; +// @public +export class ResolveEnd extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot); + // (undocumented) + state: RouterStateSnapshot; + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare class ResolveStart extends RouterEvent { - state: RouterStateSnapshot; - urlAfterRedirects: string; +// @public +export class ResolveStart extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot); + // (undocumented) + state: RouterStateSnapshot; + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare interface Route { +// @public +export interface Route { canActivate?: any[]; canActivateChild?: any[]; canDeactivate?: any[]; @@ -319,55 +443,68 @@ export declare interface Route { runGuardsAndResolvers?: RunGuardsAndResolvers; } -export declare class RouteConfigLoadEnd { - route: Route; +// @public +export class RouteConfigLoadEnd { constructor( route: Route); + // (undocumented) + route: Route; + // (undocumented) toString(): string; } -export declare class RouteConfigLoadStart { - route: Route; +// @public +export class RouteConfigLoadStart { constructor( route: Route); + // (undocumented) + route: Route; + // (undocumented) toString(): string; } -export declare class Router { +// @public +export class Router { + constructor(rootComponentType: Type | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes); + // (undocumented) config: Routes; + createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree; + dispose(): void; errorHandler: ErrorHandler; readonly events: Observable; + getCurrentNavigation(): Navigation | null; + initialNavigation(): void; + // @deprecated + isActive(url: string | UrlTree, exact: boolean): boolean; + isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean; malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree; + navigate(commands: any[], extras?: NavigationExtras): Promise; + navigateByUrl(url: string | UrlTree, extras?: NavigationBehaviorOptions): Promise; navigated: boolean; + // (undocumented) + ngOnDestroy(): void; onSameUrlNavigation: 'reload' | 'ignore'; paramsInheritanceStrategy: 'emptyOnly' | 'always'; + parseUrl(url: string): UrlTree; relativeLinkResolution: 'legacy' | 'corrected'; + resetConfig(config: Routes): void; routeReuseStrategy: RouteReuseStrategy; readonly routerState: RouterState; + serializeUrl(url: UrlTree): string; + setUpLocationChangeListener(): void; get url(): string; urlHandlingStrategy: UrlHandlingStrategy; urlUpdateStrategy: 'deferred' | 'eager'; - constructor(rootComponentType: Type | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes); - createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree; - dispose(): void; - getCurrentNavigation(): Navigation | null; - initialNavigation(): void; - /** @deprecated */ isActive(url: string | UrlTree, exact: boolean): boolean; - isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean; - navigate(commands: any[], extras?: NavigationExtras): Promise; - navigateByUrl(url: string | UrlTree, extras?: NavigationBehaviorOptions): Promise; - ngOnDestroy(): void; - parseUrl(url: string): UrlTree; - resetConfig(config: Routes): void; - serializeUrl(url: UrlTree): string; - setUpLocationChangeListener(): void; } -export declare const ROUTER_CONFIGURATION: InjectionToken; +// @public +export const ROUTER_CONFIGURATION: InjectionToken; -export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef) => void>; +// @public +export const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef) => void>; -export declare abstract class RouteReuseStrategy { +// @public +export abstract class RouteReuseStrategy { abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null; abstract shouldAttach(route: ActivatedRouteSnapshot): boolean; abstract shouldDetach(route: ActivatedRouteSnapshot): boolean; @@ -375,16 +512,23 @@ export declare abstract class RouteReuseStrategy { abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void; } -export declare class RouterEvent { - id: number; - url: string; +// @public +export class RouterEvent { constructor( id: number, url: string); + id: number; + url: string; } -export declare class RouterLink implements OnChanges { +// @public +export class RouterLink implements OnChanges { + constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef); fragment?: string; + // (undocumented) + ngOnChanges(changes: SimpleChanges): void; + // (undocumented) + onClick(): boolean; preserveFragment: boolean; queryParams?: Params | null; queryParamsHandling?: QueryParamsHandling | null; @@ -395,29 +539,44 @@ export declare class RouterLink implements OnChanges { state?: { [k: string]: any; }; + // (undocumented) get urlTree(): UrlTree; - constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef); - ngOnChanges(changes: SimpleChanges): void; - onClick(): boolean; } -export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit { +// @public +export class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit { + constructor(router: Router, element: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined); + // (undocumented) readonly isActive: boolean; + // (undocumented) links: QueryList; + // (undocumented) linksWithHrefs: QueryList; + // (undocumented) + ngAfterContentInit(): void; + // (undocumented) + ngOnChanges(changes: SimpleChanges): void; + // (undocumented) + ngOnDestroy(): void; + // (undocumented) set routerLinkActive(data: string[] | string); routerLinkActiveOptions: { exact: boolean; } | IsActiveMatchOptions; - constructor(router: Router, element: ElementRef, renderer: Renderer2, cdr: ChangeDetectorRef, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined); - ngAfterContentInit(): void; - ngOnChanges(changes: SimpleChanges): void; - ngOnDestroy(): void; -} + } -export declare class RouterLinkWithHref implements OnChanges, OnDestroy { +// @public +export class RouterLinkWithHref implements OnChanges, OnDestroy { + constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy); fragment?: string; + // (undocumented) href: string; + // (undocumented) + ngOnChanges(changes: SimpleChanges): any; + // (undocumented) + ngOnDestroy(): any; + // (undocumented) + onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean; preserveFragment: boolean; queryParams?: Params | null; queryParamsHandling?: QueryParamsHandling | null; @@ -428,93 +587,125 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy { state?: { [k: string]: any; }; + // (undocumented) target: string; + // (undocumented) get urlTree(): UrlTree; - constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy); - ngOnChanges(changes: SimpleChanges): any; - ngOnDestroy(): any; - onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean): boolean; } -export declare class RouterModule { +// @public +export class RouterModule { constructor(guard: any, router: Router); static forChild(routes: Routes): ModuleWithProviders; static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders; } -export declare class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract { - activateEvents: EventEmitter; - get activatedRoute(): ActivatedRoute; - get activatedRouteData(): Data; - get component(): Object; - deactivateEvents: EventEmitter; - get isActivated(): boolean; +// @public +export class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract { constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef); + // (undocumented) + get activatedRoute(): ActivatedRoute; + // (undocumented) + get activatedRouteData(): Data; + // (undocumented) + activateEvents: EventEmitter; + // (undocumented) activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void; attach(ref: ComponentRef, activatedRoute: ActivatedRoute): void; + // (undocumented) + get component(): Object; + // (undocumented) deactivate(): void; + // (undocumented) + deactivateEvents: EventEmitter; detach(): ComponentRef; + // (undocumented) + get isActivated(): boolean; + // (undocumented) ngOnDestroy(): void; + // (undocumented) ngOnInit(): void; -} + } -export declare interface RouterOutletContract { +// @public +export interface RouterOutletContract { activatedRoute: ActivatedRoute | null; activatedRouteData: Data; - component: Object | null; - isActivated: boolean; activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void; attach(ref: ComponentRef, activatedRoute: ActivatedRoute): void; + component: Object | null; deactivate(): void; detach(): ComponentRef; + isActivated: boolean; } -export declare class RouterPreloader implements OnDestroy { +// @public +export class RouterPreloader implements OnDestroy { constructor(router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, preloadingStrategy: PreloadingStrategy); + // (undocumented) ngOnDestroy(): void; + // (undocumented) preload(): Observable; + // (undocumented) setUpPreloading(): void; -} + } -export declare class RouterState extends ɵangular_packages_router_router_m { +// @public +export class RouterState extends ɵangular_packages_router_router_m { snapshot: RouterStateSnapshot; + // (undocumented) toString(): string; } -export declare class RouterStateSnapshot extends ɵangular_packages_router_router_m { +// @public +export class RouterStateSnapshot extends ɵangular_packages_router_router_m { + // (undocumented) + toString(): string; url: string; - toString(): string; } -export declare type Routes = Route[]; +// @public +export const ROUTES: InjectionToken; -export declare const ROUTES: InjectionToken; +// @public +export type Routes = Route[]; -export declare class RoutesRecognized extends RouterEvent { - state: RouterStateSnapshot; - urlAfterRedirects: string; +// @public +export class RoutesRecognized extends RouterEvent { constructor( id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot); + // (undocumented) + state: RouterStateSnapshot; + // (undocumented) toString(): string; + // (undocumented) + urlAfterRedirects: string; } -export declare type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean); +// @public +export type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean); -export declare class Scroll { - readonly anchor: string | null; - readonly position: [number, number] | null; - readonly routerEvent: NavigationEnd; +// @public +export class Scroll { constructor( routerEvent: NavigationEnd, position: [number, number] | null, anchor: string | null); + // (undocumented) + readonly anchor: string | null; + // (undocumented) + readonly position: [number, number] | null; + // (undocumented) + readonly routerEvent: NavigationEnd; + // (undocumented) toString(): string; } -export declare interface UrlCreationOptions { +// @public +export interface UrlCreationOptions { fragment?: string; preserveFragment?: boolean; queryParams?: Params | null; @@ -522,62 +713,80 @@ export declare interface UrlCreationOptions { relativeTo?: ActivatedRoute | null; } -export declare abstract class UrlHandlingStrategy { +// @public +export abstract class UrlHandlingStrategy { abstract extract(url: UrlTree): UrlTree; abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree; abstract shouldProcessUrl(url: UrlTree): boolean; } -export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult | null; +// @public +export type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult | null; -export declare type UrlMatchResult = { +// @public +export type UrlMatchResult = { consumed: UrlSegment[]; posParams?: { [name: string]: UrlSegment; }; }; -export declare class UrlSegment { - get parameterMap(): ParamMap; - parameters: { - [name: string]: string; - }; - path: string; +// @public +export class UrlSegment { constructor( path: string, parameters: { [name: string]: string; }); + // (undocumented) + get parameterMap(): ParamMap; + parameters: { + [name: string]: string; + }; + path: string; + // (undocumented) toString(): string; } -export declare class UrlSegmentGroup { - children: { - [key: string]: UrlSegmentGroup; - }; - get numberOfChildren(): number; - parent: UrlSegmentGroup | null; - segments: UrlSegment[]; +// @public +export class UrlSegmentGroup { constructor( segments: UrlSegment[], children: { [key: string]: UrlSegmentGroup; }); + children: { + [key: string]: UrlSegmentGroup; + }; hasChildren(): boolean; + get numberOfChildren(): number; + parent: UrlSegmentGroup | null; + segments: UrlSegment[]; + // (undocumented) toString(): string; } -export declare abstract class UrlSerializer { +// @public +export abstract class UrlSerializer { abstract parse(url: string): UrlTree; abstract serialize(tree: UrlTree): string; } -export declare class UrlTree { +// @public +export class UrlTree { fragment: string | null; + // (undocumented) get queryParamMap(): ParamMap; queryParams: Params; root: UrlSegmentGroup; + // (undocumented) toString(): string; } -export declare const VERSION: Version; +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/router/testing/testing.d.ts b/goldens/public-api/router/testing/testing.d.ts deleted file mode 100644 index 39a5574924a..00000000000 --- a/goldens/public-api/router/testing/testing.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export declare class RouterTestingModule { - static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders; -} - -export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router; -export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router; - -export declare class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader { - set stubbedModules(modules: { - [path: string]: any; - }); - get stubbedModules(): { - [path: string]: any; - }; - constructor(compiler: Compiler); - load(path: string): Promise>; -} diff --git a/goldens/public-api/router/testing/testing.md b/goldens/public-api/router/testing/testing.md new file mode 100644 index 00000000000..a517834e0ce --- /dev/null +++ b/goldens/public-api/router/testing/testing.md @@ -0,0 +1,50 @@ +## API Report File for "@angular/router_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ChildrenOutletContexts } from '@angular/router'; +import { Compiler } from '@angular/core'; +import { ExtraOptions } from '@angular/router'; +import { Injector } from '@angular/core'; +import { Location } from '@angular/common'; +import { ModuleWithProviders } from '@angular/core'; +import { NgModuleFactory } from '@angular/core'; +import { NgModuleFactoryLoader } from '@angular/core'; +import { Route } from '@angular/router'; +import { Router } from '@angular/router'; +import { Routes } from '@angular/router'; +import { UrlHandlingStrategy } from '@angular/router'; +import { UrlSerializer } from '@angular/router'; + +// @public +export class RouterTestingModule { + // (undocumented) + static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders; +} + +// @public +export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router; + +// @public @deprecated +export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router; + +// @public +export class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader { + constructor(compiler: Compiler); + // (undocumented) + load(path: string): Promise>; + set stubbedModules(modules: { + [path: string]: any; + }); + // (undocumented) + get stubbedModules(): { + [path: string]: any; + }; + } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/router/upgrade/upgrade.d.ts b/goldens/public-api/router/upgrade/upgrade.d.ts deleted file mode 100644 index 3245f77cefc..00000000000 --- a/goldens/public-api/router/upgrade/upgrade.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const RouterUpgradeInitializer: { - provide: InjectionToken<((compRef: ComponentRef) => void)[]>; - multi: boolean; - useFactory: (ngUpgrade: UpgradeModule) => () => void; - deps: (typeof UpgradeModule)[]; -}; - -export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void; diff --git a/goldens/public-api/router/upgrade/upgrade.md b/goldens/public-api/router/upgrade/upgrade.md new file mode 100644 index 00000000000..8b7522abbfe --- /dev/null +++ b/goldens/public-api/router/upgrade/upgrade.md @@ -0,0 +1,25 @@ +## API Report File for "@angular/router_upgrade" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ComponentRef } from '@angular/core'; +import { InjectionToken } from '@angular/core'; +import { UpgradeModule } from '@angular/upgrade/static'; + +// @public +export const RouterUpgradeInitializer: { + provide: InjectionToken<((compRef: ComponentRef) => void)[]>; + multi: boolean; + useFactory: (ngUpgrade: UpgradeModule) => () => void; + deps: (typeof UpgradeModule)[]; +}; + +// @public +export function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/service-worker/config/config.d.ts b/goldens/public-api/service-worker/config/config.md similarity index 50% rename from goldens/public-api/service-worker/config/config.d.ts rename to goldens/public-api/service-worker/config/config.md index 75a007d98b5..927817d8c5b 100644 --- a/goldens/public-api/service-worker/config/config.d.ts +++ b/goldens/public-api/service-worker/config/config.md @@ -1,49 +1,89 @@ -export declare interface AssetGroup { +## API Report File for "@angular/service-worker_config" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export interface AssetGroup { + // (undocumented) cacheQueryOptions?: Pick; + // (undocumented) installMode?: 'prefetch' | 'lazy'; + // (undocumented) name: string; + // (undocumented) resources: { files?: Glob[]; urls?: Glob[]; }; + // (undocumented) updateMode?: 'prefetch' | 'lazy'; } -export declare interface Config { +// @public +export interface Config { + // (undocumented) appData?: {}; + // (undocumented) assetGroups?: AssetGroup[]; + // (undocumented) dataGroups?: DataGroup[]; + // (undocumented) index: string; + // (undocumented) navigationRequestStrategy?: 'freshness' | 'performance'; + // (undocumented) navigationUrls?: string[]; } -export declare interface DataGroup { +// @public +export interface DataGroup { + // (undocumented) cacheConfig: { maxSize: number; maxAge: Duration; timeout?: Duration; strategy?: 'freshness' | 'performance'; }; + // (undocumented) cacheQueryOptions?: Pick; + // (undocumented) name: string; + // (undocumented) urls: Glob[]; + // (undocumented) version?: number; } -export declare type Duration = string; +// @public (undocumented) +export type Duration = string; -export declare interface Filesystem { +// @public +export interface Filesystem { + // (undocumented) hash(file: string): Promise; + // (undocumented) list(dir: string): Promise; + // (undocumented) read(file: string): Promise; + // (undocumented) write(file: string, contents: string): Promise; } -export declare class Generator { - readonly fs: Filesystem; +// @public +export class Generator { constructor(fs: Filesystem, baseHref: string); + // (undocumented) + readonly fs: Filesystem; + // (undocumented) process(config: Config): Promise; -} + } -export declare type Glob = string; +// @public (undocumented) +export type Glob = string; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/service-worker/service-worker.d.ts b/goldens/public-api/service-worker/service-worker.md similarity index 63% rename from goldens/public-api/service-worker/service-worker.d.ts rename to goldens/public-api/service-worker/service-worker.md index 946a370fdd4..d84913bd637 100644 --- a/goldens/public-api/service-worker/service-worker.d.ts +++ b/goldens/public-api/service-worker/service-worker.md @@ -1,8 +1,20 @@ -export declare class ServiceWorkerModule { +## API Report File for "@angular/service-worker" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ModuleWithProviders } from '@angular/core'; +import { Observable } from 'rxjs'; + +// @public (undocumented) +export class ServiceWorkerModule { static register(script: string, opts?: SwRegistrationOptions): ModuleWithProviders; } -export declare class SwPush { +// @public +export class SwPush { + constructor(sw: ɵangular_packages_service_worker_service_worker_a); get isEnabled(): boolean; readonly messages: Observable; readonly notificationClicks: Observable<{ @@ -11,55 +23,74 @@ export declare class SwPush { title: string; }; }>; - readonly subscription: Observable; - constructor(sw: ɵangular_packages_service_worker_service_worker_a); requestSubscription(options: { serverPublicKey: string; }): Promise; + readonly subscription: Observable; unsubscribe(): Promise; } -export declare abstract class SwRegistrationOptions { +// @public +export abstract class SwRegistrationOptions { enabled?: boolean; registrationStrategy?: string | (() => Observable); scope?: string; } -export declare class SwUpdate { +// @public +export class SwUpdate { + constructor(sw: ɵangular_packages_service_worker_service_worker_a); readonly activated: Observable; + // (undocumented) + activateUpdate(): Promise; readonly available: Observable; + // (undocumented) + checkForUpdate(): Promise; get isEnabled(): boolean; readonly unrecoverable: Observable; - constructor(sw: ɵangular_packages_service_worker_service_worker_a); - activateUpdate(): Promise; - checkForUpdate(): Promise; } -export declare interface UnrecoverableStateEvent { +// @public +export interface UnrecoverableStateEvent { + // (undocumented) reason: string; + // (undocumented) type: 'UNRECOVERABLE_STATE'; } -export declare interface UpdateActivatedEvent { +// @public +export interface UpdateActivatedEvent { + // (undocumented) current: { hash: string; appData?: Object; }; + // (undocumented) previous?: { hash: string; appData?: Object; }; + // (undocumented) type: 'UPDATE_ACTIVATED'; } -export declare interface UpdateAvailableEvent { +// @public +export interface UpdateAvailableEvent { + // (undocumented) available: { hash: string; appData?: Object; }; + // (undocumented) current: { hash: string; appData?: Object; }; + // (undocumented) type: 'UPDATE_AVAILABLE'; } + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/upgrade/static/static.d.ts b/goldens/public-api/upgrade/static/static.d.ts deleted file mode 100644 index d21bc578484..00000000000 --- a/goldens/public-api/upgrade/static/static.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export declare function downgradeComponent(info: { - component: Type; - downgradedModule?: string; - propagateDigest?: boolean; - /** @deprecated */ inputs?: string[]; - /** @deprecated */ outputs?: string[]; - /** @deprecated */ selectors?: string[]; -}): any; - -export declare function downgradeInjectable(token: any, downgradedModule?: string): Function; - -export declare function downgradeModule(moduleFactoryOrBootstrapFn: NgModuleFactory | ((extraProviders: StaticProvider[]) => Promise>)): string; - -export declare function getAngularJSGlobal(): any; - -/** @deprecated */ -export declare function getAngularLib(): any; - -export declare function setAngularJSGlobal(ng: any): void; - -/** @deprecated */ -export declare function setAngularLib(ng: any): void; - -export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy { - constructor(name: string, elementRef: ElementRef, injector: Injector); - ngDoCheck(): void; - ngOnChanges(changes: SimpleChanges): void; - ngOnDestroy(): void; - ngOnInit(): void; -} - -export declare class UpgradeModule { - $injector: any; - injector: Injector; - ngZone: NgZone; - constructor( - injector: Injector, - ngZone: NgZone, - platformRef: PlatformRef); - bootstrap(element: Element, modules?: string[], config?: any): void; -} - -export declare const VERSION: Version; diff --git a/goldens/public-api/upgrade/static/static.md b/goldens/public-api/upgrade/static/static.md new file mode 100644 index 00000000000..4a0e4b59c9e --- /dev/null +++ b/goldens/public-api/upgrade/static/static.md @@ -0,0 +1,81 @@ +## API Report File for "@angular/upgrade_static" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { DoCheck } from '@angular/core'; +import { ElementRef } from '@angular/core'; +import { Injector } from '@angular/core'; +import { NgModuleFactory } from '@angular/core'; +import { NgModuleRef } from '@angular/core'; +import { NgZone } from '@angular/core'; +import { OnChanges } from '@angular/core'; +import { OnDestroy } from '@angular/core'; +import { OnInit } from '@angular/core'; +import { PlatformRef } from '@angular/core'; +import { SimpleChanges } from '@angular/core'; +import { StaticProvider } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public +export function downgradeComponent(info: { + component: Type; + downgradedModule?: string; + propagateDigest?: boolean; + inputs?: string[]; + outputs?: string[]; + selectors?: string[]; +}): any; + +// @public +export function downgradeInjectable(token: any, downgradedModule?: string): Function; + +// @public +export function downgradeModule(moduleFactoryOrBootstrapFn: NgModuleFactory | ((extraProviders: StaticProvider[]) => Promise>)): string; + +// @public +export function getAngularJSGlobal(): any; + +// @public @deprecated (undocumented) +export function getAngularLib(): any; + +// @public +export function setAngularJSGlobal(ng: any): void; + +// @public @deprecated (undocumented) +export function setAngularLib(ng: any): void; + +// @public +export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy { + constructor(name: string, elementRef: ElementRef, injector: Injector); + // (undocumented) + ngDoCheck(): void; + // (undocumented) + ngOnChanges(changes: SimpleChanges): void; + // (undocumented) + ngOnDestroy(): void; + // (undocumented) + ngOnInit(): void; + } + +// @public +export class UpgradeModule { + $injector: any; + constructor( + injector: Injector, + ngZone: NgZone, + platformRef: PlatformRef); + bootstrap(element: Element, modules?: string[], config?: any): void; + injector: Injector; + ngZone: NgZone; + } + +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/upgrade/static/testing/testing.d.ts b/goldens/public-api/upgrade/static/testing/testing.d.ts deleted file mode 100644 index f905c680b64..00000000000 --- a/goldens/public-api/upgrade/static/testing/testing.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function createAngularJSTestingModule(angularModules: any[]): string; - -export declare function createAngularTestingModule(angularJSModules: string[], strictDi?: boolean): Type; diff --git a/goldens/public-api/upgrade/static/testing/testing.md b/goldens/public-api/upgrade/static/testing/testing.md new file mode 100644 index 00000000000..fcab6e91cb7 --- /dev/null +++ b/goldens/public-api/upgrade/static/testing/testing.md @@ -0,0 +1,18 @@ +## API Report File for "@angular/upgrade_static_testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Type } from '@angular/core'; + +// @public +export function createAngularJSTestingModule(angularModules: any[]): string; + +// @public +export function createAngularTestingModule(angularJSModules: string[], strictDi?: boolean): Type; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/goldens/public-api/upgrade/upgrade.d.ts b/goldens/public-api/upgrade/upgrade.md similarity index 51% rename from goldens/public-api/upgrade/upgrade.d.ts rename to goldens/public-api/upgrade/upgrade.md index 962c019a5e4..e3d0a9dfbbd 100644 --- a/goldens/public-api/upgrade/upgrade.d.ts +++ b/goldens/public-api/upgrade/upgrade.md @@ -1,5 +1,17 @@ -/** @deprecated */ -export declare class UpgradeAdapter { +## API Report File for "@angular/upgrade" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CompilerOptions } from '@angular/core'; +import { Injector } from '@angular/core'; +import { NgModuleRef } from '@angular/core'; +import { Type } from '@angular/core'; +import { Version } from '@angular/core'; + +// @public @deprecated +export class UpgradeAdapter { constructor(ng2AppModule: Type, compilerOptions?: CompilerOptions | undefined); bootstrap(element: Element, modules?: any[], config?: IAngularBootstrapConfig): UpgradeAdapterRef; downgradeNg2Component(component: Type): Function; @@ -11,14 +23,24 @@ export declare class UpgradeAdapter { }): void; } -/** @deprecated */ -export declare class UpgradeAdapterRef { - ng1Injector: IInjectorService; - ng1RootScope: IRootScopeService; - ng2Injector: Injector; - ng2ModuleRef: NgModuleRef; +// @public @deprecated +export class UpgradeAdapterRef { dispose(): void; + // (undocumented) + ng1Injector: IInjectorService; + // (undocumented) + ng1RootScope: IRootScopeService; + // (undocumented) + ng2Injector: Injector; + // (undocumented) + ng2ModuleRef: NgModuleRef; ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void): void; } -export declare const VERSION: Version; +// @public (undocumented) +export const VERSION: Version; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/core/BUILD.bazel b/packages/core/BUILD.bazel index f3579745242..91c14a69eb3 100644 --- a/packages/core/BUILD.bazel +++ b/packages/core/BUILD.bazel @@ -70,6 +70,14 @@ api_golden_test( data = [ "//goldens:public-api", "//packages/core", + # Additional targets the entry-point indirectly resolves `.d.ts` source files from. + # These are transitive to `:core`, but need to be listed explicitly here as only + # transitive `JSModule` information is collected (missing the type definitions). + "//packages/core/src/compiler", + "//packages/core/src/di/interface", + "//packages/core/src/interface", + "//packages/core/src/reflection", + "//packages/core/src/util", ], entry_point = "angular/packages/core/src/render3/global_utils_api.d.ts", golden = "angular/goldens/public-api/core/global_utils.md",