_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
angular/packages/router/src/statemanager/state_manager.ts_3809_11744 | @Injectable({providedIn: 'root'})
export class HistoryStateManager extends StateManager {
private readonly location = inject(Location);
private readonly urlSerializer = inject(UrlSerializer);
private readonly options = inject(ROUTER_CONFIGURATION, {optional: true}) || {};
private readonly canceledNavigationResolution =
this.options.canceledNavigationResolution || 'replace';
private urlHandlingStrategy = inject(UrlHandlingStrategy);
private urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
private currentUrlTree = new UrlTree();
override getCurrentUrlTree() {
return this.currentUrlTree;
}
private rawUrlTree = this.currentUrlTree;
override getRawUrlTree() {
return this.rawUrlTree;
}
/**
* The id of the currently active page in the router.
* Updated to the transition's target id on a successful navigation.
*
* This is used to track what page the router last activated. When an attempted navigation fails,
* the router can then use this to compute how to restore the state back to the previously active
* page.
*/
private currentPageId: number = 0;
private lastSuccessfulId: number = -1;
override restoredState(): RestoredState | null | undefined {
return this.location.getState() as RestoredState | null | undefined;
}
/**
* The ɵrouterPageId of whatever page is currently active in the browser history. This is
* important for computing the target page id for new navigations because we need to ensure each
* page id in the browser history is 1 more than the previous entry.
*/
private get browserPageId(): number {
if (this.canceledNavigationResolution !== 'computed') {
return this.currentPageId;
}
return this.restoredState()?.ɵrouterPageId ?? this.currentPageId;
}
private routerState = createEmptyState(null);
override getRouterState() {
return this.routerState;
}
private stateMemento = this.createStateMemento();
private createStateMemento() {
return {
rawUrlTree: this.rawUrlTree,
currentUrlTree: this.currentUrlTree,
routerState: this.routerState,
};
}
override registerNonRouterCurrentEntryChangeListener(
listener: (url: string, state: RestoredState | null | undefined) => void,
): SubscriptionLike {
return this.location.subscribe((event) => {
if (event['type'] === 'popstate') {
listener(event['url']!, event.state as RestoredState | null | undefined);
}
});
}
override handleRouterEvent(e: Event | PrivateRouterEvents, currentTransition: Navigation) {
if (e instanceof NavigationStart) {
this.stateMemento = this.createStateMemento();
} else if (e instanceof NavigationSkipped) {
this.rawUrlTree = currentTransition.initialUrl;
} else if (e instanceof RoutesRecognized) {
if (this.urlUpdateStrategy === 'eager') {
if (!currentTransition.extras.skipLocationChange) {
const rawUrl = this.urlHandlingStrategy.merge(
currentTransition.finalUrl!,
currentTransition.initialUrl,
);
this.setBrowserUrl(currentTransition.targetBrowserUrl ?? rawUrl, currentTransition);
}
}
} else if (e instanceof BeforeActivateRoutes) {
this.currentUrlTree = currentTransition.finalUrl!;
this.rawUrlTree = this.urlHandlingStrategy.merge(
currentTransition.finalUrl!,
currentTransition.initialUrl,
);
this.routerState = currentTransition.targetRouterState!;
if (this.urlUpdateStrategy === 'deferred' && !currentTransition.extras.skipLocationChange) {
this.setBrowserUrl(
currentTransition.targetBrowserUrl ?? this.rawUrlTree,
currentTransition,
);
}
} else if (
e instanceof NavigationCancel &&
(e.code === NavigationCancellationCode.GuardRejected ||
e.code === NavigationCancellationCode.NoDataFromResolver)
) {
this.restoreHistory(currentTransition);
} else if (e instanceof NavigationError) {
this.restoreHistory(currentTransition, true);
} else if (e instanceof NavigationEnd) {
this.lastSuccessfulId = e.id;
this.currentPageId = this.browserPageId;
}
}
private setBrowserUrl(url: UrlTree | string, transition: Navigation) {
const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;
if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {
// replacements do not update the target page
const currentBrowserPageId = this.browserPageId;
const state = {
...transition.extras.state,
...this.generateNgRouterState(transition.id, currentBrowserPageId),
};
this.location.replaceState(path, '', state);
} else {
const state = {
...transition.extras.state,
...this.generateNgRouterState(transition.id, this.browserPageId + 1),
};
this.location.go(path, '', state);
}
}
/**
* Performs the necessary rollback action to restore the browser URL to the
* state before the transition.
*/
private restoreHistory(navigation: Navigation, restoringFromCaughtError = false) {
if (this.canceledNavigationResolution === 'computed') {
const currentBrowserPageId = this.browserPageId;
const targetPagePosition = this.currentPageId - currentBrowserPageId;
if (targetPagePosition !== 0) {
this.location.historyGo(targetPagePosition);
} else if (this.currentUrlTree === navigation.finalUrl && targetPagePosition === 0) {
// We got to the activation stage (where currentUrlTree is set to the navigation's
// finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).
// We still need to reset the router state back to what it was when the navigation started.
this.resetState(navigation);
this.resetUrlToCurrentUrlTree();
} else {
// The browser URL and router state was not updated before the navigation cancelled so
// there's no restoration needed.
}
} else if (this.canceledNavigationResolution === 'replace') {
// TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op
// for `deferred` navigations that haven't change the internal state yet because guards
// reject. For 'eager' navigations, it seems like we also really should reset the state
// because the navigation was cancelled. Investigate if this can be done by running TGP.
if (restoringFromCaughtError) {
this.resetState(navigation);
}
this.resetUrlToCurrentUrlTree();
}
}
private resetState(navigation: Navigation): void {
this.routerState = this.stateMemento.routerState;
this.currentUrlTree = this.stateMemento.currentUrlTree;
// Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be
// configured to handle only part of the navigation URL. This means we would only want to reset
// the part of the navigation handled by the Angular router rather than the whole URL. In
// addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL
// when merging, such as the query params so they are not lost on a refresh.
this.rawUrlTree = this.urlHandlingStrategy.merge(
this.currentUrlTree,
navigation.finalUrl ?? this.rawUrlTree,
);
}
private resetUrlToCurrentUrlTree(): void {
this.location.replaceState(
this.urlSerializer.serialize(this.rawUrlTree),
'',
this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId),
);
}
private generateNgRouterState(navigationId: number, routerPageId: number) {
if (this.canceledNavigationResolution === 'computed') {
return {navigationId, ɵrouterPageId: routerPageId};
}
return {navigationId};
}
}
| {
"end_byte": 11744,
"start_byte": 3809,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/statemanager/state_manager.ts"
} |
angular/packages/router/src/utils/preactivation.ts_0_6983 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Injector, ProviderToken, ɵisInjectable as isInjectable} from '@angular/core';
import {RunGuardsAndResolvers} from '../models';
import {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';
import {
ActivatedRouteSnapshot,
equalParamsAndUrlSegments,
RouterStateSnapshot,
} from '../router_state';
import {equalPath} from '../url_tree';
import {shallowEqual} from '../utils/collection';
import {nodeChildrenAsMap, TreeNode} from '../utils/tree';
export class CanActivate {
readonly route: ActivatedRouteSnapshot;
constructor(public path: ActivatedRouteSnapshot[]) {
this.route = this.path[this.path.length - 1];
}
}
export class CanDeactivate {
constructor(
public component: Object | null,
public route: ActivatedRouteSnapshot,
) {}
}
export declare type Checks = {
canDeactivateChecks: CanDeactivate[];
canActivateChecks: CanActivate[];
};
export function getAllRouteGuards(
future: RouterStateSnapshot,
curr: RouterStateSnapshot,
parentContexts: ChildrenOutletContexts,
) {
const futureRoot = future._root;
const currRoot = curr ? curr._root : null;
return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);
}
export function getCanActivateChild(
p: ActivatedRouteSnapshot,
): {node: ActivatedRouteSnapshot; guards: any[]} | null {
const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;
if (!canActivateChild || canActivateChild.length === 0) return null;
return {node: p, guards: canActivateChild};
}
export function getTokenOrFunctionIdentity<T>(
tokenOrFunction: Function | ProviderToken<T>,
injector: Injector,
): Function | T {
const NOT_FOUND = Symbol();
const result = injector.get<T | Symbol>(tokenOrFunction, NOT_FOUND);
if (result === NOT_FOUND) {
if (typeof tokenOrFunction === 'function' && !isInjectable(tokenOrFunction)) {
// We think the token is just a function so return it as-is
return tokenOrFunction;
} else {
// This will throw the not found error
return injector.get<T>(tokenOrFunction);
}
}
return result as T;
}
function getChildRouteGuards(
futureNode: TreeNode<ActivatedRouteSnapshot>,
currNode: TreeNode<ActivatedRouteSnapshot> | null,
contexts: ChildrenOutletContexts | null,
futurePath: ActivatedRouteSnapshot[],
checks: Checks = {
canDeactivateChecks: [],
canActivateChecks: [],
},
): Checks {
const prevChildren = nodeChildrenAsMap(currNode);
// Process the children of the future route
futureNode.children.forEach((c) => {
getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);
delete prevChildren[c.value.outlet];
});
// Process any children left from the current route (not active for the future route)
Object.entries(prevChildren).forEach(([k, v]: [string, TreeNode<ActivatedRouteSnapshot>]) =>
deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks),
);
return checks;
}
function getRouteGuards(
futureNode: TreeNode<ActivatedRouteSnapshot>,
currNode: TreeNode<ActivatedRouteSnapshot>,
parentContexts: ChildrenOutletContexts | null,
futurePath: ActivatedRouteSnapshot[],
checks: Checks = {
canDeactivateChecks: [],
canActivateChecks: [],
},
): Checks {
const future = futureNode.value;
const curr = currNode ? currNode.value : null;
const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;
// reusing the node
if (curr && future.routeConfig === curr.routeConfig) {
const shouldRun = shouldRunGuardsAndResolvers(
curr,
future,
future.routeConfig!.runGuardsAndResolvers,
);
if (shouldRun) {
checks.canActivateChecks.push(new CanActivate(futurePath));
} else {
// we need to set the data
future.data = curr.data;
future._resolvedData = curr._resolvedData;
}
// If we have a component, we need to go through an outlet.
if (future.component) {
getChildRouteGuards(
futureNode,
currNode,
context ? context.children : null,
futurePath,
checks,
);
// if we have a componentless route, we recurse but keep the same outlet map.
} else {
getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);
}
if (shouldRun && context && context.outlet && context.outlet.isActivated) {
checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));
}
} else {
if (curr) {
deactivateRouteAndItsChildren(currNode, context, checks);
}
checks.canActivateChecks.push(new CanActivate(futurePath));
// If we have a component, we need to go through an outlet.
if (future.component) {
getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);
// if we have a componentless route, we recurse but keep the same outlet map.
} else {
getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);
}
}
return checks;
}
function shouldRunGuardsAndResolvers(
curr: ActivatedRouteSnapshot,
future: ActivatedRouteSnapshot,
mode: RunGuardsAndResolvers | undefined,
): boolean {
if (typeof mode === 'function') {
return mode(curr, future);
}
switch (mode) {
case 'pathParamsChange':
return !equalPath(curr.url, future.url);
case 'pathParamsOrQueryParamsChange':
return (
!equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams)
);
case 'always':
return true;
case 'paramsOrQueryParamsChange':
return (
!equalParamsAndUrlSegments(curr, future) ||
!shallowEqual(curr.queryParams, future.queryParams)
);
case 'paramsChange':
default:
return !equalParamsAndUrlSegments(curr, future);
}
}
function deactivateRouteAndItsChildren(
route: TreeNode<ActivatedRouteSnapshot>,
context: OutletContext | null,
checks: Checks,
): void {
const children = nodeChildrenAsMap(route);
const r = route.value;
Object.entries(children).forEach(([childName, node]) => {
if (!r.component) {
deactivateRouteAndItsChildren(node, context, checks);
} else if (context) {
deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);
} else {
deactivateRouteAndItsChildren(node, null, checks);
}
});
if (!r.component) {
checks.canDeactivateChecks.push(new CanDeactivate(null, r));
} else if (context && context.outlet && context.outlet.isActivated) {
checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));
} else {
checks.canDeactivateChecks.push(new CanDeactivate(null, r));
}
}
| {
"end_byte": 6983,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/preactivation.ts"
} |
angular/packages/router/src/utils/config_matching.ts_0_5977 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {EnvironmentInjector} from '@angular/core';
import {Observable, of} from 'rxjs';
import {map} from 'rxjs/operators';
import {Route} from '../models';
import {runCanMatchGuards} from '../operators/check_guards';
import {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';
import {UrlSegment, UrlSegmentGroup, UrlSerializer} from '../url_tree';
import {last} from './collection';
import {getOrCreateRouteInjectorIfNeeded, getOutlet} from './config';
export interface MatchResult {
matched: boolean;
consumedSegments: UrlSegment[];
remainingSegments: UrlSegment[];
parameters: {[k: string]: string};
positionalParamSegments: {[k: string]: UrlSegment};
}
const noMatch: MatchResult = {
matched: false,
consumedSegments: [],
remainingSegments: [],
parameters: {},
positionalParamSegments: {},
};
export function matchWithChecks(
segmentGroup: UrlSegmentGroup,
route: Route,
segments: UrlSegment[],
injector: EnvironmentInjector,
urlSerializer: UrlSerializer,
): Observable<MatchResult> {
const result = match(segmentGroup, route, segments);
if (!result.matched) {
return of(result);
}
// Only create the Route's `EnvironmentInjector` if it matches the attempted
// navigation
injector = getOrCreateRouteInjectorIfNeeded(route, injector);
return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(
map((v) => (v === true ? result : {...noMatch})),
);
}
export function match(
segmentGroup: UrlSegmentGroup,
route: Route,
segments: UrlSegment[],
): MatchResult {
if (route.path === '**') {
return createWildcardMatchResult(segments);
}
if (route.path === '') {
if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
return {...noMatch};
}
return {
matched: true,
consumedSegments: [],
remainingSegments: segments,
parameters: {},
positionalParamSegments: {},
};
}
const matcher = route.matcher || defaultUrlMatcher;
const res = matcher(segments, segmentGroup, route);
if (!res) return {...noMatch};
const posParams: {[n: string]: string} = {};
Object.entries(res.posParams ?? {}).forEach(([k, v]) => {
posParams[k] = v.path;
});
const parameters =
res.consumed.length > 0
? {...posParams, ...res.consumed[res.consumed.length - 1].parameters}
: posParams;
return {
matched: true,
consumedSegments: res.consumed,
remainingSegments: segments.slice(res.consumed.length),
// TODO(atscott): investigate combining parameters and positionalParamSegments
parameters,
positionalParamSegments: res.posParams ?? {},
};
}
function createWildcardMatchResult(segments: UrlSegment[]): MatchResult {
return {
matched: true,
parameters: segments.length > 0 ? last(segments)!.parameters : {},
consumedSegments: segments,
remainingSegments: [],
positionalParamSegments: {},
};
}
export function split(
segmentGroup: UrlSegmentGroup,
consumedSegments: UrlSegment[],
slicedSegments: UrlSegment[],
config: Route[],
) {
if (
slicedSegments.length > 0 &&
containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)
) {
const s = new UrlSegmentGroup(
consumedSegments,
createChildrenForEmptyPaths(
config,
new UrlSegmentGroup(slicedSegments, segmentGroup.children),
),
);
return {segmentGroup: s, slicedSegments: []};
}
if (
slicedSegments.length === 0 &&
containsEmptyPathMatches(segmentGroup, slicedSegments, config)
) {
const s = new UrlSegmentGroup(
segmentGroup.segments,
addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children),
);
return {segmentGroup: s, slicedSegments};
}
const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);
return {segmentGroup: s, slicedSegments};
}
function addEmptyPathsToChildrenIfNeeded(
segmentGroup: UrlSegmentGroup,
slicedSegments: UrlSegment[],
routes: Route[],
children: {[name: string]: UrlSegmentGroup},
): {[name: string]: UrlSegmentGroup} {
const res: {[name: string]: UrlSegmentGroup} = {};
for (const r of routes) {
if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {
const s = new UrlSegmentGroup([], {});
res[getOutlet(r)] = s;
}
}
return {...children, ...res};
}
function createChildrenForEmptyPaths(
routes: Route[],
primarySegment: UrlSegmentGroup,
): {[name: string]: UrlSegmentGroup} {
const res: {[name: string]: UrlSegmentGroup} = {};
res[PRIMARY_OUTLET] = primarySegment;
for (const r of routes) {
if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {
const s = new UrlSegmentGroup([], {});
res[getOutlet(r)] = s;
}
}
return res;
}
function containsEmptyPathMatchesWithNamedOutlets(
segmentGroup: UrlSegmentGroup,
slicedSegments: UrlSegment[],
routes: Route[],
): boolean {
return routes.some(
(r) => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET,
);
}
function containsEmptyPathMatches(
segmentGroup: UrlSegmentGroup,
slicedSegments: UrlSegment[],
routes: Route[],
): boolean {
return routes.some((r) => emptyPathMatch(segmentGroup, slicedSegments, r));
}
export function emptyPathMatch(
segmentGroup: UrlSegmentGroup,
slicedSegments: UrlSegment[],
r: Route,
): boolean {
if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {
return false;
}
return r.path === '';
}
export function noLeftoversInUrl(
segmentGroup: UrlSegmentGroup,
segments: UrlSegment[],
outlet: string,
): boolean {
return segments.length === 0 && !segmentGroup.children[outlet];
}
| {
"end_byte": 5977,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/config_matching.ts"
} |
angular/packages/router/src/utils/collection.ts_0_2328 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ɵisPromise as isPromise} from '@angular/core';
import {from, isObservable, Observable, of} from 'rxjs';
export function shallowEqualArrays(a: any[], b: any[]): boolean {
if (a.length !== b.length) return false;
for (let i = 0; i < a.length; ++i) {
if (!shallowEqual(a[i], b[i])) return false;
}
return true;
}
export function shallowEqual(
a: {[key: string | symbol]: any},
b: {[key: string | symbol]: any},
): boolean {
// While `undefined` should never be possible, it would sometimes be the case in IE 11
// and pre-chromium Edge. The check below accounts for this edge case.
const k1 = a ? getDataKeys(a) : undefined;
const k2 = b ? getDataKeys(b) : undefined;
if (!k1 || !k2 || k1.length != k2.length) {
return false;
}
let key: string | symbol;
for (let i = 0; i < k1.length; i++) {
key = k1[i];
if (!equalArraysOrString(a[key], b[key])) {
return false;
}
}
return true;
}
/**
* Gets the keys of an object, including `symbol` keys.
*/
export function getDataKeys(obj: Object): Array<string | symbol> {
return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];
}
/**
* Test equality for arrays of strings or a string.
*/
export function equalArraysOrString(a: string | string[], b: string | string[]) {
if (Array.isArray(a) && Array.isArray(b)) {
if (a.length !== b.length) return false;
const aSorted = [...a].sort();
const bSorted = [...b].sort();
return aSorted.every((val, index) => bSorted[index] === val);
} else {
return a === b;
}
}
/**
* Return the last element of an array.
*/
export function last<T>(a: T[]): T | null {
return a.length > 0 ? a[a.length - 1] : null;
}
export function wrapIntoObservable<T>(value: T | Promise<T> | Observable<T>): Observable<T> {
if (isObservable(value)) {
return value;
}
if (isPromise(value)) {
// Use `Promise.resolve()` to wrap promise-like instances.
// Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the
// change detection.
return from(Promise.resolve(value));
}
return of(value);
}
| {
"end_byte": 2328,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/collection.ts"
} |
angular/packages/router/src/utils/navigations.ts_0_2074 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Observable} from 'rxjs';
import {filter, map, take} from 'rxjs/operators';
import {
Event,
NavigationCancel,
NavigationCancellationCode,
NavigationEnd,
NavigationError,
NavigationSkipped,
} from '../events';
enum NavigationResult {
COMPLETE,
FAILED,
REDIRECTING,
}
/**
* Performs the given action once the router finishes its next/current navigation.
*
* The navigation is considered complete under the following conditions:
* - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or
* `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the
* redirecting/superseding navigation must finish.
* - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits
*/
export function afterNextNavigation(router: {events: Observable<Event>}, action: () => void) {
router.events
.pipe(
filter(
(e): e is NavigationEnd | NavigationCancel | NavigationError | NavigationSkipped =>
e instanceof NavigationEnd ||
e instanceof NavigationCancel ||
e instanceof NavigationError ||
e instanceof NavigationSkipped,
),
map((e) => {
if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {
return NavigationResult.COMPLETE;
}
const redirecting =
e instanceof NavigationCancel
? e.code === NavigationCancellationCode.Redirect ||
e.code === NavigationCancellationCode.SupersededByNewNavigation
: false;
return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;
}),
filter(
(result): result is NavigationResult.COMPLETE | NavigationResult.FAILED =>
result !== NavigationResult.REDIRECTING,
),
take(1),
)
.subscribe(() => {
action();
});
}
| {
"end_byte": 2074,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/navigations.ts"
} |
angular/packages/router/src/utils/functional_guards.ts_0_2778 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {inject, Type} from '@angular/core';
import {
CanActivate,
CanActivateChild,
CanActivateChildFn,
CanActivateFn,
CanDeactivate,
CanDeactivateFn,
CanMatch,
CanMatchFn,
Resolve,
ResolveFn,
} from '../models';
/**
* Maps an array of injectable classes with canMatch functions to an array of equivalent
* `CanMatchFn` for use in a `Route` definition.
*
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see {@link Route}
*/
export function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {
return providers.map(
(provider) =>
(...params) =>
inject(provider).canMatch(...params),
);
}
/**
* Maps an array of injectable classes with canActivate functions to an array of equivalent
* `CanActivateFn` for use in a `Route` definition.
*
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see {@link Route}
*/
export function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {
return providers.map(
(provider) =>
(...params) =>
inject(provider).canActivate(...params),
);
}
/**
* Maps an array of injectable classes with canActivateChild functions to an array of equivalent
* `CanActivateChildFn` for use in a `Route` definition.
*
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see {@link Route}
*/
export function mapToCanActivateChild(
providers: Array<Type<CanActivateChild>>,
): CanActivateChildFn[] {
return providers.map(
(provider) =>
(...params) =>
inject(provider).canActivateChild(...params),
);
}
/**
* Maps an array of injectable classes with canDeactivate functions to an array of equivalent
* `CanDeactivateFn` for use in a `Route` definition.
*
* Usage {@example router/utils/functional_guards.ts region='CanActivate'}
*
* @publicApi
* @see {@link Route}
*/
export function mapToCanDeactivate<T = unknown>(
providers: Array<Type<CanDeactivate<T>>>,
): CanDeactivateFn<T>[] {
return providers.map(
(provider) =>
(...params) =>
inject(provider).canDeactivate(...params),
);
}
/**
* Maps an injectable class with a resolve function to an equivalent `ResolveFn`
* for use in a `Route` definition.
*
* Usage {@example router/utils/functional_guards.ts region='Resolve'}
*
* @publicApi
* @see {@link Route}
*/
export function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {
return (...params) => inject(provider).resolve(...params);
}
| {
"end_byte": 2778,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/functional_guards.ts"
} |
angular/packages/router/src/utils/type_guards.ts_0_1857 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {EmptyError} from 'rxjs';
import {CanActivateChildFn, CanActivateFn, CanDeactivateFn, CanLoadFn, CanMatchFn} from '../models';
import {
NAVIGATION_CANCELING_ERROR,
NavigationCancelingError,
RedirectingNavigationCancelingError,
} from '../navigation_canceling_error';
import {isUrlTree} from '../url_tree';
/**
* Simple function check, but generic so type inference will flow. Example:
*
* function product(a: number, b: number) {
* return a * b;
* }
*
* if (isFunction<product>(fn)) {
* return fn(1, 2);
* } else {
* throw "Must provide the `product` function";
* }
*/
export function isFunction<T>(v: any): v is T {
return typeof v === 'function';
}
export function isBoolean(v: any): v is boolean {
return typeof v === 'boolean';
}
export function isCanLoad(guard: any): guard is {canLoad: CanLoadFn} {
return guard && isFunction<CanLoadFn>(guard.canLoad);
}
export function isCanActivate(guard: any): guard is {canActivate: CanActivateFn} {
return guard && isFunction<CanActivateFn>(guard.canActivate);
}
export function isCanActivateChild(guard: any): guard is {canActivateChild: CanActivateChildFn} {
return guard && isFunction<CanActivateChildFn>(guard.canActivateChild);
}
export function isCanDeactivate<T>(guard: any): guard is {canDeactivate: CanDeactivateFn<T>} {
return guard && isFunction<CanDeactivateFn<T>>(guard.canDeactivate);
}
export function isCanMatch(guard: any): guard is {canMatch: CanMatchFn} {
return guard && isFunction<CanMatchFn>(guard.canMatch);
}
export function isEmptyError(e: Error): e is EmptyError {
return e instanceof EmptyError || e?.name === 'EmptyError';
}
| {
"end_byte": 1857,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/type_guards.ts"
} |
angular/packages/router/src/utils/config.ts_0_8986 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
createEnvironmentInjector,
EnvironmentInjector,
isStandalone,
Type,
ɵisNgModule as isNgModule,
ɵRuntimeError as RuntimeError,
} from '@angular/core';
import {RuntimeErrorCode} from '../errors';
import {Route, Routes} from '../models';
import {ActivatedRouteSnapshot} from '../router_state';
import {PRIMARY_OUTLET} from '../shared';
/**
* Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist
* and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the
* `currentInjector`.
*
* @param route The route that might have providers
* @param currentInjector The parent injector of the `Route`
*/
export function getOrCreateRouteInjectorIfNeeded(
route: Route,
currentInjector: EnvironmentInjector,
) {
if (route.providers && !route._injector) {
route._injector = createEnvironmentInjector(
route.providers,
currentInjector,
`Route: ${route.path}`,
);
}
return route._injector ?? currentInjector;
}
export function getLoadedRoutes(route: Route): Route[] | undefined {
return route._loadedRoutes;
}
export function getLoadedInjector(route: Route): EnvironmentInjector | undefined {
return route._loadedInjector;
}
export function getLoadedComponent(route: Route): Type<unknown> | undefined {
return route._loadedComponent;
}
export function getProvidersInjector(route: Route): EnvironmentInjector | undefined {
return route._injector;
}
export function validateConfig(
config: Routes,
parentPath: string = '',
requireStandaloneComponents = false,
): void {
// forEach doesn't iterate undefined values
for (let i = 0; i < config.length; i++) {
const route: Route = config[i];
const fullPath: string = getFullPath(parentPath, route);
validateNode(route, fullPath, requireStandaloneComponents);
}
}
export function assertStandalone(fullPath: string, component: Type<unknown> | undefined) {
if (component && isNgModule(component)) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +
`but it must be used with standalone components. Use 'loadChildren' instead.`,
);
} else if (component && !isStandalone(component)) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}'. The component must be standalone.`,
);
}
}
function validateNode(route: Route, fullPath: string, requireStandaloneComponents: boolean): void {
if (typeof ngDevMode === 'undefined' || ngDevMode) {
if (!route) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`
Invalid configuration of route '${fullPath}': Encountered undefined route.
The reason might be an extra comma.
Example:
const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },, << two commas
{ path: 'detail/:id', component: HeroDetailComponent }
];
`,
);
}
if (Array.isArray(route)) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': Array cannot be specified`,
);
}
if (
!route.redirectTo &&
!route.component &&
!route.loadComponent &&
!route.children &&
!route.loadChildren &&
route.outlet &&
route.outlet !== PRIMARY_OUTLET
) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`,
);
}
if (route.redirectTo && route.children) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`,
);
}
if (route.redirectTo && route.loadChildren) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`,
);
}
if (route.children && route.loadChildren) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`,
);
}
if (route.redirectTo && (route.component || route.loadComponent)) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`,
);
}
if (route.component && route.loadComponent) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`,
);
}
if (route.redirectTo && route.canActivate) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +
`so canActivate will never be executed.`,
);
}
if (route.path && route.matcher) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': path and matcher cannot be used together`,
);
}
if (
route.redirectTo === void 0 &&
!route.component &&
!route.loadComponent &&
!route.children &&
!route.loadChildren
) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`,
);
}
if (route.path === void 0 && route.matcher === void 0) {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`,
);
}
if (typeof route.path === 'string' && route.path.charAt(0) === '/') {
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '${fullPath}': path cannot start with a slash`,
);
}
if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {
const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;
throw new RuntimeError(
RuntimeErrorCode.INVALID_ROUTE_CONFIG,
`Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`,
);
}
if (requireStandaloneComponents) {
assertStandalone(fullPath, route.component);
}
}
if (route.children) {
validateConfig(route.children, fullPath, requireStandaloneComponents);
}
}
function getFullPath(parentPath: string, currentRoute: Route): string {
if (!currentRoute) {
return parentPath;
}
if (!parentPath && !currentRoute.path) {
return '';
} else if (parentPath && !currentRoute.path) {
return `${parentPath}/`;
} else if (!parentPath && currentRoute.path) {
return currentRoute.path;
} else {
return `${parentPath}/${currentRoute.path}`;
}
}
/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */
export function getOutlet(route: Route): string {
return route.outlet || PRIMARY_OUTLET;
}
/**
* Sorts the `routes` such that the ones with an outlet matching `outletName` come first.
* The order of the configs is otherwise preserved.
*/
export function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {
const sortedConfig = routes.filter((r) => getOutlet(r) === outletName);
sortedConfig.push(...routes.filter((r) => getOutlet(r) !== outletName));
return sortedConfig;
}
/**
* Gets the first injector in the snapshot's parent tree.
*
* If the `Route` has a static list of providers, the returned injector will be the one created from
* those. If it does not exist, the returned injector may come from the parents, which may be from a
* loaded config or their static providers.
*
* Returns `null` if there is neither this nor any parents have a stored injector.
*
* Generally used for retrieving the injector to use for getting tokens for guards/resolvers and
* also used for getting the correct injector to use for creating components.
*/
e | {
"end_byte": 8986,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/config.ts"
} |
angular/packages/router/src/utils/config.ts_8987_10053 | port function getClosestRouteInjector(
snapshot: ActivatedRouteSnapshot | undefined,
): EnvironmentInjector | null {
if (!snapshot) return null;
// If the current route has its own injector, which is created from the static providers on the
// route itself, we should use that. Otherwise, we start at the parent since we do not want to
// include the lazy loaded injector from this route.
if (snapshot.routeConfig?._injector) {
return snapshot.routeConfig._injector;
}
for (let s = snapshot.parent; s; s = s.parent) {
const route = s.routeConfig;
// Note that the order here is important. `_loadedInjector` stored on the route with
// `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`
// is created from the static providers on that parent route, so it applies to the children as
// well, but only if there is no lazy loaded NgModuleRef injector.
if (route?._loadedInjector) return route._loadedInjector;
if (route?._injector) return route._injector;
}
return null;
}
| {
"end_byte": 10053,
"start_byte": 8987,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/config.ts"
} |
angular/packages/router/src/utils/view_transition.ts_0_5208 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
/// <reference types="dom-view-transitions" />
import {DOCUMENT} from '@angular/common';
import {
afterNextRender,
InjectionToken,
Injector,
NgZone,
runInInjectionContext,
} from '@angular/core';
import {ActivatedRouteSnapshot} from '../router_state';
export const CREATE_VIEW_TRANSITION = new InjectionToken<typeof createViewTransition>(
ngDevMode ? 'view transition helper' : '',
);
export const VIEW_TRANSITION_OPTIONS = new InjectionToken<
ViewTransitionsFeatureOptions & {skipNextTransition: boolean}
>(ngDevMode ? 'view transition options' : '');
/**
* Options to configure the View Transitions integration in the Router.
*
* @experimental
* @publicApi
* @see withViewTransitions
*/
export interface ViewTransitionsFeatureOptions {
/**
* Skips the very first call to `startViewTransition`. This can be useful for disabling the
* animation during the application's initial loading phase.
*/
skipInitialTransition?: boolean;
/**
* A function to run after the `ViewTransition` is created.
*
* This function is run in an injection context and can use `inject`.
*/
onViewTransitionCreated?: (transitionInfo: ViewTransitionInfo) => void;
}
/**
* The information passed to the `onViewTransitionCreated` function provided in the
* `withViewTransitions` feature options.
*
* @publicApi
* @experimental
*/
export interface ViewTransitionInfo {
// TODO(atscott): This type can/should be the built-in `ViewTransition` type
// from @types/dom-view-transitions but exporting that type from the public API is currently not
// supported by tooling.
/**
* The `ViewTransition` returned by the call to `startViewTransition`.
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition
*/
transition: {
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/finished
*/
finished: Promise<void>;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/ready
*/
ready: Promise<void>;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/updateCallbackDone
*/
updateCallbackDone: Promise<void>;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/skipTransition
*/
skipTransition(): void;
};
/**
* The `ActivatedRouteSnapshot` that the navigation is transitioning from.
*/
from: ActivatedRouteSnapshot;
/**
* The `ActivatedRouteSnapshot` that the navigation is transitioning to.
*/
to: ActivatedRouteSnapshot;
}
/**
* A helper function for using browser view transitions. This function skips the call to
* `startViewTransition` if the browser does not support it.
*
* @returns A Promise that resolves when the view transition callback begins.
*/
export function createViewTransition(
injector: Injector,
from: ActivatedRouteSnapshot,
to: ActivatedRouteSnapshot,
): Promise<void> {
const transitionOptions = injector.get(VIEW_TRANSITION_OPTIONS);
const document = injector.get(DOCUMENT);
// Create promises outside the Angular zone to avoid causing extra change detections
return injector.get(NgZone).runOutsideAngular(() => {
if (!document.startViewTransition || transitionOptions.skipNextTransition) {
transitionOptions.skipNextTransition = false;
// The timing of `startViewTransition` is closer to a macrotask. It won't be called
// until the current event loop exits so we use a promise resolved in a timeout instead
// of Promise.resolve().
return new Promise((resolve) => setTimeout(resolve));
}
let resolveViewTransitionStarted: () => void;
const viewTransitionStarted = new Promise<void>((resolve) => {
resolveViewTransitionStarted = resolve;
});
const transition = document.startViewTransition(() => {
resolveViewTransitionStarted();
// We don't actually update dom within the transition callback. The resolving of the above
// promise unblocks the Router navigation, which synchronously activates and deactivates
// routes (the DOM update). This view transition waits for the next change detection to
// complete (below), which includes the update phase of the routed components.
return createRenderPromise(injector);
});
const {onViewTransitionCreated} = transitionOptions;
if (onViewTransitionCreated) {
runInInjectionContext(injector, () => onViewTransitionCreated({transition, from, to}));
}
return viewTransitionStarted;
});
}
/**
* Creates a promise that resolves after next render.
*/
function createRenderPromise(injector: Injector) {
return new Promise<void>((resolve) => {
// Wait for the microtask queue to empty after the next render happens (by waiting a macrotask).
// This ensures any follow-up renders in the microtask queue are completed before the
// view transition starts animating.
afterNextRender({read: () => setTimeout(resolve)}, {injector});
});
}
| {
"end_byte": 5208,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/view_transition.ts"
} |
angular/packages/router/src/utils/tree.ts_0_2295 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export class Tree<T> {
/** @internal */
_root: TreeNode<T>;
constructor(root: TreeNode<T>) {
this._root = root;
}
get root(): T {
return this._root.value;
}
/**
* @internal
*/
parent(t: T): T | null {
const p = this.pathFromRoot(t);
return p.length > 1 ? p[p.length - 2] : null;
}
/**
* @internal
*/
children(t: T): T[] {
const n = findNode(t, this._root);
return n ? n.children.map((t) => t.value) : [];
}
/**
* @internal
*/
firstChild(t: T): T | null {
const n = findNode(t, this._root);
return n && n.children.length > 0 ? n.children[0].value : null;
}
/**
* @internal
*/
siblings(t: T): T[] {
const p = findPath(t, this._root);
if (p.length < 2) return [];
const c = p[p.length - 2].children.map((c) => c.value);
return c.filter((cc) => cc !== t);
}
/**
* @internal
*/
pathFromRoot(t: T): T[] {
return findPath(t, this._root).map((s) => s.value);
}
}
// DFS for the node matching the value
function findNode<T>(value: T, node: TreeNode<T>): TreeNode<T> | null {
if (value === node.value) return node;
for (const child of node.children) {
const node = findNode(value, child);
if (node) return node;
}
return null;
}
// Return the path to the node with the given value using DFS
function findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {
if (value === node.value) return [node];
for (const child of node.children) {
const path = findPath(value, child);
if (path.length) {
path.unshift(node);
return path;
}
}
return [];
}
export class TreeNode<T> {
constructor(
public value: T,
public children: TreeNode<T>[],
) {}
toString(): string {
return `TreeNode(${this.value})`;
}
}
// Return the list of T indexed by outlet name
export function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T> | null) {
const map: {[outlet: string]: TreeNode<T>} = {};
if (node) {
node.children.forEach((child) => (map[child.value.outlet] = child));
}
return map;
}
| {
"end_byte": 2295,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/utils/tree.ts"
} |
angular/packages/router/src/components/empty_outlet.ts_0_1383 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Component} from '@angular/core';
import {RouterOutlet} from '../directives/router_outlet';
import {PRIMARY_OUTLET} from '../shared';
import {Route} from '../models';
export {ɵEmptyOutletComponent as EmptyOutletComponent};
/**
* This component is used internally within the router to be a placeholder when an empty
* router-outlet is needed. For example, with a config such as:
*
* `{path: 'parent', outlet: 'nav', children: [...]}`
*
* In order to render, there needs to be a component on this config, which will default
* to this `EmptyOutletComponent`.
*/
@Component({
template: `<router-outlet></router-outlet>`,
imports: [RouterOutlet],
standalone: true,
})
export class ɵEmptyOutletComponent {}
/**
* Makes a copy of the config and adds any default required properties.
*/
export function standardizeConfig(r: Route): Route {
const children = r.children && r.children.map(standardizeConfig);
const c = children ? {...r, children} : {...r};
if (
!c.component &&
!c.loadComponent &&
(children || c.loadChildren) &&
c.outlet &&
c.outlet !== PRIMARY_OUTLET
) {
c.component = ɵEmptyOutletComponent;
}
return c;
}
| {
"end_byte": 1383,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/packages/router/src/components/empty_outlet.ts"
} |
angular/contributing-docs/caretaking.md_0_2215 | # Caretaker
The *caretaker* is a role responsible for merging PRs and syncing into Google's
internal code repository. The caretaker role rotates weekly.
## Responsibilities
- Merging PR (PRs with [`action: merge`](https://github.com/angular/angular/pulls?q=is%3Aopen+is%3Apr+label%3A%22action%3A+merge%22) label)
- Light issue triage [new issues](https://github.com/angular/angular/issues?q=is%3Aopen+is%3Aissue+no%3Alabel).
## Merging the PR
A PR requires the `action: merge` and a `target: *` label to be merged.
The tooling automatically verifies the given PR is ready for merge. If the PR passes the tests, the
tool will automatically merge it based on the applied target label.
To merge a PR run:
```sh
$ yarn ng-dev pr merge <pr number>
```
## Primitives and blocked merges
Some directories in the Angular codebase have additional protections or rules. For example, code
under `//packages/core/primitives` must be merged and synced into Google separately from other
changes. Attempting to combine changes in `primitives` with other changes results in an error. This
practices makes it significantly easier to rollback or revert changes in the event of a breakage or
outage.
## PRs that require global presubmits
Most PRs are tested against a curated subset of Angular application tests inside Google. However,
if a change is deemed risky or otherwise requires more thorough testing, add the `requires: TGP`
label to the PR. For such PRs, the merge tooling enforces that _all_ affected tests inside Google
have been run (a "global presubmit"). A Googler can alternatively satisfy the merge tooling check by
adding a review comment that starts with `TESTED=` and then put a reason why the PR is sufficiently
tested. The `requires: TGP` label is automatically added to PRs that affect files
matching `separateFilePatterns` in [`.ng-dev/google-sync-config.json`](https://github.com/angular/angular/blob/main/.ng-dev/google-sync-config.json).
An example of specfying a `TESTED=` comment:
```
TESTED=docs only update and does not need a TGP
```
### Recovering from failed `merge-pr` due to conflicts
The `ng-dev pr merge` tool will automatically restore to the previous git state when a merge fails.
| {
"end_byte": 2215,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/caretaking.md"
} |
angular/contributing-docs/debugging-tips.md_0_6172 | # Debugging tips for developing on Angular
## Debugging tests
The Angular project has comprehensive unit tests for the core packages and the tools.
Packages are tested both in the browser (via Karma) and on the server (via node.js).
Angular uses the Jasmine test framework.
You can focus your debugging on one test at a time by changing that test to be
defined using the `fit(...)` function, rather than `it(...)`. Moreover, it can be helpful
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
it hits this test.
For instructions on debugging both Karma and node.js tests, see
[Building with bazel](./building-with-bazel.md).
## Angular debug tools in the dev console
Angular provides a set of debug tools that are accessible from any browser's
developer console. In Chrome the dev console can be accessed by pressing
Ctrl + Shift + j.
### Enabling debug tools
By default, the debug tools are disabled. You can enable debug tools as follows:
```typescript
import {ApplicationRef} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {enableDebugTools} from '@angular/platform-browser';
platformBrowserDynamic().bootstrapModule(AppModule)
.then(moduleRef => {
const applicationRef = moduleRef.injector.get(ApplicationRef);
const appComponent = applicationRef.components[0];
enableDebugTools(appComponent);
})
```
### Using debug tools
In the browser open the developer console (Ctrl + Shift + j in Chrome). The
top level object is called `ng` and contains more specific tools inside it.
Example:
```javascript
ng.profiler.timeChangeDetection();
```
## Performance
### Change detection profiler
If your application is janky (it misses frames) or is slow according to other
metrics, it is important to find the root cause of the issue. Change detection
is a phase in Angular's lifecycle that detects changes in values that are
bound to UI, and if it finds a change it performs the corresponding UI update.
However, sometimes it is hard to tell if the slowness is due to the act of
computing the changes being slow, or due to the act of applying those changes
to the UI. For your application to be performant it is important that the
process of computing changes is very fast. For best results it should be under
3 milliseconds in order to leave room for the application logic, the UI updates
and browser's rendering pipeline to fit within the 16 millisecond frame
(assuming the 60 FPS target frame rate).
Change detection profiler repeatedly performs change detection without invoking
any user actions, such as clicking buttons or entering text in input fields. It
then computes the average amount of time it took to perform a single cycle of
change detection in milliseconds and prints it to the console. This number
depends on the current state of the UI. You will likely see different numbers
as you go from one screen in your application to another.
#### Running the profiler
Enable debug tools (see above), then in the dev console enter the following:
```javascript
ng.profiler.timeChangeDetection();
```
The results will be printed to the console.
#### Recording CPU profile
Pass `{record: true}` an argument:
```javascript
ng.profiler.timeChangeDetection({record: true});
```
Then open the "Profiles" tab. You will see the recorded profile titled
"Change Detection". In Chrome, if you record the profile repeatedly, all the
profiles will be nested under "Change Detection".
#### Interpreting the numbers
In a properly-designed application repeated attempts to detect changes without
any user actions should result in no changes to be applied on the UI. It is
also desirable to have the cost of a user action be proportional to the amount
of UI changes required. For example, popping up a menu with 5 items should be
vastly faster than rendering a table of 500 rows and 10 columns. Therefore,
change detection with no UI updates should be as fast as possible. Ideally the
number printed by the profiler should be well below the length of a single
animation frame (16ms). A good rule of thumb is to keep it under 3ms.
#### Investigating slow change detection
So you found a screen in your application on which the profiler reports a very
high number (i.e. >3ms). This is where a recorded CPU profile can help. Enable
recording while profiling:
```javascript
ng.profiler.timeChangeDetection({record: true});
```
Then look for hot spots using
[Chrome CPU profiler](https://developer.chrome.com/devtools/docs/cpu-profiling).
#### Reducing change detection cost
There are many reasons for slow change detection. To gain intuition about
possible causes it would help to understand how change detection works. Such a
discussion is outside the scope of this document (TODO link to docs), but here
are some key concepts in brief.
By default Angular uses "dirty checking" mechanism for finding model changes.
This mechanism involves evaluating every bound expression that's active on the
UI. These usually include text interpolation via `{{expression}}` and property
bindings via `[prop]="expression"`. If any of the evaluated expressions are
costly to compute they could contribute to slow change detection. A good way to
speed things up is to use plain class fields in your expressions and avoid any
kinds of computation. Example:
```typescript
@Component({
template: '<button [enabled]="isEnabled">{{title}}</button>'
})
class FancyButton {
// GOOD: no computation, just return the value
isEnabled: boolean;
// BAD: computes the final value upon request
_title: String;
get title(): String { return this._title.trim().toUpperCase(); }
}
```
Most cases like these could be solved by precomputing the value and storing the
final value in a field.
Angular also supports a second type of change detection - the "push" model. In
this model Angular does not poll your component for changes. Instead, the
component "tells" Angular when it changes and only then does Angular perform
the update. This model is suitable in situations when your data model uses
observable or immutable objects (also a discussion for another time).
| {
"end_byte": 6172,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/debugging-tips.md"
} |
angular/contributing-docs/auto-issue-locking.md_0_854 | <a name="conversation-locking"></a>
# Automatic conversation locking
Closed issues and pull requests are locked automatically after 30 days of inactivity.
## I want to comment on a locked conversation, what should I do?
When an issue has been closed and inactive for over 30 days, the original context is likely
outdated.
If you encounter a similar or related issue in the current version, please open a new issue and
provide up-to-date reproduction instructions.
## Why lock conversations?
Automatically locking closed, inactive issues guides people towards filing new issues with updated
context rather than commenting on a "resolved" issue that contains out-of-date or unrelated
information. As an example, someone may comment "I'm still having this issue", but without
providing any of the additional information the team needs to investigate.
| {
"end_byte": 854,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/auto-issue-locking.md"
} |
angular/contributing-docs/building-with-bazel.md_0_7988 | # Building Angular with Bazel
Note: This doc is for developing Angular. It is _not_ public
documentation for building an Angular application with Bazel.
The Bazel build tool (https://bazel.build) provides fast, reliable
incremental builds. The majority of Angular's code is built with Bazel.
## Installation and running
Angular installs Bazel from npm rather than having contributors install Bazel
directly. This ensures that everyone uses the same version of Bazel.
The binaries for Bazel are provided by
the [`@bazel/bazelisk`](https://github.com/bazelbuild/bazelisk)
npm package and its platform-specific dependencies.
You can run Bazel with the `yarn bazel` command.
## Configuration
The `WORKSPACE` file indicates that our root directory is a
Bazel project. It contains the version of the Bazel rules we
use to execute build steps, from `npm_bazel_typescript`.
The sources on [GitHub] are published from Google's internal
repository (google3).
Bazel accepts a lot of options. We check in some options in the
`.bazelrc` file. See the [bazelrc doc]. For example, if you don't
want Bazel to create several symlinks in your project directory
(`bazel-*`) you can add the line `build --symlink_prefix=/` to your
`.bazelrc` file.
[GitHub]: https://github.com/bazelbuild/rules_typescript
[bazelrc doc]: https://bazel.build/run/bazelrc
## Building Angular
- Build a package: `yarn bazel build packages/core`
- Build all packages: `yarn bazel build packages/...`
You can use [ibazel] to run in a "watch mode" that continuously
keeps the outputs up-to-date as you save sources.
[ibazel]: https://github.com/bazelbuild/bazel-watcher
## Testing Angular
- Test package in node: `yarn test packages/core/test:test`
- Test package in karma: `yarn test packages/core/test:test_web`
- Test all packages: `yarn test packages/...`
The ellipsis in the examples above are not meant to be substituted by a package name, but
are used by Bazel as a wildcard to execute all tests in the specified path. To execute all the tests for a
single package, the commands are (exemplary):
- `yarn test //packages/core/...` for all tests, or
- `yarn test //packages/core/test:test` for a particular test suite.
Bazel very effectively caches build results, so it's common for your first time building a target
to be much slower than subsequent builds.
You can use [ibazel] to run in a "watch mode" that continuously
keeps the outputs up-to-date as you save sources.
### Testing with flags
If you're experiencing problems with seemingly unrelated tests failing, it may be because you're not
using the proper flags with your Bazel test runs in Angular.
- `--config=debug`: build and launch in debug mode (see [debugging](#debugging) instructions below)
- `--test_arg=--node_options=--inspect=9228`: change the inspector port.
- `--test_tag_filters=<tag>`: filter tests down to tags defined in the `tag` config of your rules in
any given `BUILD.bazel`.
### Debugging a Node Test in Chrome DevTools
<a id="debugging"></a>
- Open Chrome at: [chrome://inspect](chrome://inspect)
- Click on `Open dedicated DevTools for Node` to launch a debugger.
- Run your test with the debug configuration,
e.g. `yarn bazel test packages/core/test:test --config=debug`
The process should automatically connect to the debugger.
For more, see the [rules_nodejs Debugging documentation](https://bazelbuild.github.io/rules_nodejs/index.html#debugging).
For additional info and testing options, see the
[nodejs_test documentation](https://bazelbuild.github.io/rules_nodejs/Built-ins.html#nodejs_test).
- Click on "Resume script execution" to let the code run until the first `debugger` statement or a
previously set breakpoint.
- If you want to inspect generated template instructions while debugging, find the
template of your component in the call stack and click on `(source mapped from [CompName].js)` at
the bottom of the code. You can also disable sourcemaps in Chrome DevTools' options or go to
sources and look into ng:// namespace to see all the generated code.
### Debugging a Node Test in VSCode
First time setup:
- Go to Debug > Add configuration (in the menu bar) to open `launch.json`
- Add the following to the `configurations` array:
```json
{
"type": "node",
"request": "attach",
"name": "Attach to Remote",
"port": 9229
}
```
**Setting breakpoints directly in your code files may not work in VSCode**. This is because the
files you're actually debugging are built files that exist in a `./private/...` folder.
The easiest way to debug a test for now is to add a `debugger` statement in the code
and launch the bazel corresponding test (`yarn bazel test <target> --config=debug`).
Bazel will wait on a connection. Go to the debug view (by clicking on the sidebar or
Apple+Shift+D on Mac) and click on the green play icon next to the configuration name
(ie `Attach to Remote`).
### Debugging a Karma Test
- Run test with `_debug` appended to the target name,
e.g. `yarn bazel run packages/core/test:test_web_debug`.
Every `karma_web_test_suite` target has an additional `_debug` target.
- Open any browser at: [http://localhost:9876/debug.html](http://localhost:9876/debug.html)
- Open the browser's DevTools to debug the tests (after, for example, having focused on specific
tests via `fit` and/or `fdescribe` or having added `debugger` statements in them)
### Debugging Bazel rules
Open `external` directory which contains everything that bazel downloaded while executing the
workspace file:
```sh
open $(yarn -s bazel info output_base)/external
```
See subcommands that bazel executes (helpful for debugging):
```sh
yarn bazel build //packages/core:package -s
```
To debug nodejs_binary executable paths uncomment `find . -name rollup 1>&2` (~ line 96) in
```sh
open $(yarn -s bazel info output_base)/external/build_bazel_rules_nodejs/internal/node_launcher.sh
```
## Stamping
Bazel supports the ability to include non-hermetic information from the version control system in
built artifacts. This is called stamping.
You can see an overview at https://www.kchodorow.com/blog/2017/03/27/stamping-your-builds/
Angular configures stamping as follows:
1. In `tools/bazel_stamp_vars.js` we run the `git` commands to generate our versioning info.
2. In `.bazelrc` we register this script as the value for the `workspace_status_command` flag. Bazel
will run the script when it needs to stamp a binary.
## Remote cache
Bazel supports fetching action results from a cache, allowing a clean build to reuse artifacts
from prior builds. This makes builds incremental, even on CI.
Bazel assigns a content-based hash to all action inputs, which is used as the cache
key for the action outputs. Because Bazel builds are hermetic, it can skip executing an action if
the inputs hash is already present in the cache.
When using this caching feature, non-hermetic actions cause problems. At worst, you can fetch a
broken artifact from the cache, making your build non-reproducible. For this reason, we are careful
to implement our Bazel rules to depend _exclusively_ on their inputs, never reading from the
filesystem or the underlying environment directly.
Currently, we only use remote caching on CI. Angular core developers can enable remote
caching to speed up their builds.
### Remote cache in development
Note: this is only available to Googlers
To enable remote caching for your build:
1. Go to the service accounts for the ["internal" project](https://console.cloud.google.com/iam-admin/serviceaccounts?project=internal-200822)
2. Select "Angular local dev", click on "Edit", scroll to the bottom, and click "Create key"
3. When the pop-up shows, select "JSON" for "Key type" and click "Create"
4. Save the key in a secure location
5. Create a file called `.bazelrc.user` in the root directory of the workspace, and add the following content:
```
build --config=angular-team --google_credentials=[ABSOLUTE_PATH_TO_SERVICE_KEY]
```
| {
"end_byte": 7988,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/building-with-bazel.md"
} |
angular/contributing-docs/building-with-bazel.md_7988_14337 | ## Diagnosing slow builds
If a build seems slow you can use Bazel to diagnose where time is spent.
The first step is to generate a profile of the build using the `--profile filename_name.profile`
flag.
```sh
yarn bazel build //packages/compiler --profile filename_name.profile
```
This generates a `filename_name.profile` that you can then analyse
using chrome://tracing or
Bazel's [analyze-profile](https://docs.bazel.build/versions/master/user-manual.html#analyze-profile)
command.
## Using the console profile report
You can obtain a simple report directly in the console by running:
```sh
yarn bazel analyze-profile filename_name.profile
```
This will show the phase summary, individual phase information and critical path.
You can also list all individual tasks and the time they took using `--task_tree`.
```sh
yarn bazel analyze-profile filename_name.profile --task_tree ".*"
```
To show all tasks that take longer than a certain threshold, use the `--task_tree_threshold` flag.
The default behavior is to use a 50ms threshold.
```sh
yarn bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
```
`--task_tree` takes a regexp as argument that filters by the text shown after the time taken.
Compiling TypeScript shows as:
```
70569 ACTION_EXECUTE (10974.826 ms) Compiling TypeScript (devmode) //packages/compiler:compiler []
```
To filter all tasks by TypeScript compilations that took more than 5 seconds, use:
```sh
yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
```
### Using the HTML profile report
A more comprehensive way to visualize the profile information is through the HTML report:
```sh
yarn bazel analyze-profile filename_name.profile --html --html_details --html_histograms
```
This generates a `filename_name.profile.html` file that you can open in your browser.
In the upper right corner that is a small table of contents with links to three areas: Tasks,
Legend, and Statistics.
In the Tasks section you will find a graph of where time is spent. Legend shows what the colors in
the Tasks graph mean.
Hovering over the background will show what phase that is, while hovering over bars will show more
details about that specific action.
The Statistics section shows how long each phase took and how time was spent in that phase.
Usually the longest one is the execution phase, which also includes critical path information.
Also in the Statistics section are the Skylark statistic, split in User-Defined and Builtin function
execution time.
You can click the "self" header twice to order the table by functions where the most time (in ms) is
spent.
When diagnosing slow builds you should focus on the top time spenders across all phases and
functions.
Usually there is a single item (or multiple items of the same kind) where the overwhelming majority
of time is spent.
## Known issues
### Windows
#### bazel run
If you see the following error:
```
Error: Cannot find module 'C:\users\xxxx\_bazel_xxxx\7lxopdvs\execroot\angular\bazel-out\x64_windows-fastbuild\bin\packages\core\test\bundling\hello_world\symbol_test.bat.runfiles\angular\c;C:\msys64\users\xxxx\_bazel_xxxx\7lxopdvs\execroot\angular\bazel-out\x64_windows-fastbuild\bin\packages\core\test\bundling\hello_world\symbol_test.bat.runfiles\angular\packages\core\test\bundling\hello_world\symbol_test_require_patch.js'
Require stack:
- internal/preload
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at Module._preloadModules (internal/modules/cjs/loader.js:1133:12)
at loadPreloadModules (internal/bootstrap/pre_execution.js:443:5)
at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:62:3)
at internal/main/run_main_module.js:7:1 {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
```
`bazel run` only works in Bazel Windows with non-test targets. Ensure that you are using `bazel test` instead.
e.g: `yarn bazel test packages/core/test/bundling/forms:symbol_test`
#### mkdir missing
If you see the following error::
```
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 618, column 15, in _yarn_install_impl
_copy_file(repository_ctx, repository_ctx.attr.package_json)
File "C:/users/anusername/_bazel_anusername/idexbm2i/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 345, column 17, in _copy_file
fail("mkdir -p %s failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (dirname, result.stdout, result.stderr))
Error in fail: mkdir -p _ failed:
```
The `msys64` library and associated tools (like `mkdir`) are required to build Angular.
Make sure you have `C:\msys64\usr\bin` in the "system" `PATH` rather than the "user" `PATH`.
After that, a `git clean -xfd`, `yarn`, and `yarn build` should resolve this issue.
### Xcode
If running `yarn bazel build packages/...` returns the following error:
```
ERROR: /private/var/tmp/[...]/external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL
ERROR: Analysis of target '//packages/core/test/render3:render3' failed; build aborted: Analysis of target '@local_config_cc//:cc-compiler-darwin_x86_64' failed; build aborted
```
It might be linked to an interaction with VSCode.
If closing VSCode fixes the issue, you can add the following line to your VSCode configuration:
```json
"files.exclude": {"bazel-*": true}
```
source: https://github.com/bazelbuild/bazel/issues/4603
If VSCode is not the root cause, you might try:
- Quit VSCode (make sure no VSCode is running).
```sh
bazel clean --expunge
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
yarn bazel build //packages/core # Run a build outside VSCode to pre-build the xcode; then safe to run VSCode
```
Source: https://stackoverflow.com/questions/45276830/xcode-version-must-be-specified-to-use-an-apple-crosstool
| {
"end_byte": 14337,
"start_byte": 7988,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/building-with-bazel.md"
} |
angular/contributing-docs/using-fixup-commits.md_0_4675 | # Working with fixup commits
This document provides information and guidelines for working with fixup commits:
- [What are fixup commits](#about-fixup-commits)
- [Why use fixup commits](#why-fixup-commits)
- [Creating fixup commits](#create-fixup-commits)
- [Squashing fixup commits](#squash-fixup-commits)
[This blog post](https://thoughtbot.com/blog/autosquashing-git-commits) is also a good resource on
the subject.
## <a name="about-fixup-commits"></a> What are fixup commits
At their core, fixup commits are just regular commits with a special commit message:
The first line of their commit message starts with "fixup! " (notice the space after "!") followed
by the first line of the commit message of an earlier commit (it doesn't have to be the immediately
preceding one).
The purpose of a fixup commit is to modify an earlier commit.
I.e. it allows adding more changes in a new commit, but "marking" them as belonging to an earlier
commit.
`Git` provides tools to make it easy to squash fixup commits into the original commit at a later
time (see [below](#squash-fixup-commits) for details).
For example, let's assume you have added the following commits to your branch:
```
feat: first commit
fix: second commit
```
If you want to add more changes to the first commit, you can create a new commit with the commit
message:
`fixup! feat: first commit`:
```
feat: first commit
fix: second commit
fixup! feat: first commit
```
## <a name="why-fixup-commits"></a> Why use fixup commits
So, when are fixup commits useful?
During the life of a Pull Request, a reviewer might request changes.
The Pull Request author can make the requested changes and submit them for another review.
Normally, these changes should be part of one of the original commits of the Pull Request.
However, amending an existing commit with the changes makes it difficult for the reviewer to know
exactly what has changed since the last time they reviewed the Pull Request.
Here is where fixup commits come in handy.
By addressing review feedback in fixup commits, you make it very straight forward for the reviewer
to see what are the new changes that need to be reviewed and verify that their earlier feedback has
been addressed.
This can save a lot of effort, especially on larger Pull Requests (where having to re-review _all_
the changes is pretty wasteful).
When the time comes to merge the Pull Request into the repository, the merge script knows how to
automatically squash fixup commits with the corresponding regular commits.
## <a name="create-fixup-commits"></a> Creating fixup commits
As mentioned [above](#about-fixup-commits), the only thing that differentiates a fixup commit from a
regular commit is the commit message.
You can create a fixup commit by specifying an appropriate commit message (
i.e. `fixup! <original-commit-message-subject>`).
In addition, the `git` command-line tool provides an easy way to create a fixup commit
via [git commit --fixup](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupltcommitgt):
```sh
# Create a fixup commit to fix up the last commit on the branch:
git commit --fixup HEAD ...
# Create a fixup commit to fix up commit with SHA <COMMIT_SHA>:
git commit --fixup <COMMIT_SHA> ...
```
## <a name="squash-fixup-commits"></a> Squashing fixup commits
As mentioned above, the merge script will automatically squash fixup commits.
However, sometimes you might want to manually squash a fixup commit.
### Rebasing to squash fixup commits
The easiest way to re-order and squash any commit is
via [rebasing interactively](https://git-scm.com/docs/git-rebase#_interactive_mode). You move a
commit right after the one you want to squash it into in the rebase TODO list and change the
corresponding action from `pick` to `fixup`.
`Git` can do all these automatically for you if you pass the `--autosquash` option to `git rebase`.
See the [`git` docs](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---autosquash)
for more details.
### Additional options
You may like to consider some optional configurations:
#### Configuring `git` to auto-squash by default
By default, `git` will not automatically squash fixup commits when interactively rebasing.
If you prefer to not have to pass the `--autosquash` option every time, you can change the default
behavior by setting the `rebase.autoSquash` `git` config option to true.
See
the [`git` docs](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt-rebaseautoSquash)
for more details.
If you have `rebase.autoSquash` set to true, you can pass the `--no-autosquash` option
to `git rebase` to override and disable this setting.
| {
"end_byte": 4675,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/using-fixup-commits.md"
} |
angular/contributing-docs/documentation-authoring.md_0_10062 | # Angular Documentation Authoring Guidelines
## Before you start
Before you start writing documentation, review Google's
[Tech Writing One](https://developers.google.com/tech-writing/one),
[Tech Writing Two](https://developers.google.com/tech-writing/two),
[Inclusive Documentation](https://developers.google.com/style/inclusive-documentation), and
[Tech Writing for Accessibility](https://developers.google.com/tech-writing/accessibility).
## Writing style goals
The audience we're targeting is **Developers who have worked on at least one web project before.**
This means that we assume knowledge of general web platform technologies such as HTML,
TypeScript, JavaScript, and CSS.
Orient content around **developer intents**. Ask yourself _"What is the developer trying to
accomplish?"_
Prefer simple, casual language while remaining technically precise.
Avoid excessive preambles and hand-holding. **Let the code examples speak for
themselves**
Explain things without requiring knowledge of other parts of Angular where possible. Sometimes
this is impossible. For example, you have to know something about change detection for lifecycle
hooks to make sense. When additional knowledge is necessary, link to the corresponding topics.
Prefer framework-agnostic terminology (e.g. "DOM", "HTML", etc.) when it makes sense, compared to
framework-specific terms like "view" or "template". _Do_ use the framework-specific terms when they
would be more technically correct.
## Content types
### In-depth guides
Example: [Components](https://angular.dev/guide/components).
* In-depth guides attempt to be **fully and completely comprehensive**.
* Include recommendations and best practices in their relevant topics.
* In-depth guides are not meant to be read start-to-finish. Expect developers to jump to a
specific topic based on what they're trying to learn/accomplish in the moment
* **No step-by-step instructions**
### Tutorials
Tutorials are primarily focused on task-based, step-by-step instructions towards a specific goal.
## Common pitfalls
Several of these pitfalls are covered
in [Tech Writing One](https://developers.google.com/tech-writing/one) and
[Tech Writing Two](https://developers.google.com/tech-writing/two), but we repeat them here
because they are _very_ common.
| Pitfall | Explanation | ❌ Bad example | ✅ Good example |
|------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| **First person language** | Prefer second person language ("you"), including imperative language. | "We can use the `afterRender` function to register a callback." | "Use the `afterRender` function to register a callback." |
| **Past or future tense** | Always use present tense. This is especially common for future tense with "will". | "The query will return an instance of the component." | "The query returns an instance of the component" |
| [**Passive voice**][active-voice] | Prefer active voice. This often involves changing the order of words in a sentence or making a sentence imperative. | "Your template is compiled to JavaScript by Angular." | "Angular compiles your template to JavaScript." |
| **Mixed content types** | Guides should explain a topic, while tutorials walk readers through a set of step-by-step instructions. Avoid mixing these two content types. | "To define styles for a component, first..." | "Components include CSS styles via the `styles` and `styleUrl` properties." |
| **Topic scope creep** | Each topic should stay focused on one specific subject matter. Don't explain concepts that are better explained elsewhere, especially for web platform behaviors that are best explained by more general sites like [MDN](https://developer.mozilla.org). | | |
| **Nested treatments** | angular.dev supports several custom treatments like callouts, alerts, pills, etc. Do not nest these treatments. Do not use these treatments inside table cells. | | |
| **Lists that should be tables** | Any collection of items that includes more than one piece of information should be a table instead of a bulleted list. | | |
| **Non-descriptive links** | The text of a link should describe the linked content. This is an important accessibility consideration. | "Report all security vulnerabilities [here](https://bughunters.google.com). | "Report all security vulnerabilities to [Google's Vulnerability Bounty Portal](https://bughunters.google.com)." |
| **Making statements relative to a specific point in time** | Docs should describe the framework as it exists _now_, never relative to a specific point in time. Docs should avoid referring to anything as "new" or "recent". Docs should avoid mentioning "upcoming" or "future" changes. | "Angular v18 recently introduced fallback content for ng-content." | "The ng-content element allows you to..." |
[active-voice]: https://developers.google.com/tech-writing/one/active-voice
## Including and referencing code in documentation
* All code examples should
follow [our team naming practices](https://github.com/angular/angular/blob/main/contributing-docs/coding-standards.md)
* Use descriptive examples grounded in realistic scenarios
* **Generally avoid** generic or abstract names like "Comp", "Example", "Hello world", "prop1",
etc.
* **Generally prefer** examples that reflect realistic scenarios for
developers, `UserProfile`, `CustomSlider`, etc.
* Avoid pluralizing inline code blocks. You can often accomplish this by adding another noun for
what the referenced symbol is.
* **❌ Bad:**: "List all of your `@Injectable`s in the constructor."
* **✅ Good**: "List all your `@Injectable` dependencies in the constructor"
* Prefer the term "error" over "exception" when talking about JavaScript code (because the JS
object is named `Error`).
* Code examples that use buttons, inputs, links, etc. must follow accessibility best practices
* All buttons and form controls must have labels
* Content images must have alt text
* Any custom UI controls should have appropriate ARIA attributes
* Any styling should meet WCAG contrast ratio guidelines
## Content treatments and when to use them
* **Callouts**
* Use callouts for a brief aside that offers more context on a topic that's not strictly
necessary to understanding the main content
* Never put multiple callouts next to each other or in proximity (such as separated
by one a line or two of text)
* Never put a callout inside another element, such as a card or table cell
* **Alerts**
* Use sparingly to call attention to a very brief but relevant point
* Never put multiple alerts next to each other or in proximity (such as separated by
one a line or two of text)
* Never put an alert inside another element, such as a card or table cell
* **Cards**
* Never nest callouts or alerts inside of cards
* **Pills**
* Use pills sparingly for a collection of related links, typically at the end of a section or
article
| {
"end_byte": 10062,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/documentation-authoring.md"
} |
angular/contributing-docs/coding-standards.md_0_8006 | # Angular Framework Coding Standards
The coding practices in this doc apply only to development on Angular itself, not applications
built _with_ Angular. (Though you can follow them too if you really want).
## Code style
The [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html) is the
basis for Angular's coding style, with additional guidance here pertaining to TypeScript. The team
uses `prettier` to automatically format code; automatic formatting is enforced by CI.
## Code practices
### Write useful comments
Comments that explain what some block of code does are nice; they can tell you something in less
time than it would take to follow through the code itself.
Comments that explain why some block of code exists at all, or does something the way it does,
are _invaluable_. The "why" is difficult, or sometimes impossible, to track down without seeking out
the original author. When collaborators are in the same room, this hurts productivity.
When collaborators are in different timezones, this can be devastating to productivity.
For example, this is a not-very-useful comment:
```typescript
// Set default tabindex.
if (!attributes['tabindex']) {
element.setAttribute('tabindex', '-1');
}
```
While this is much more useful:
```typescript
// Unless the user specifies otherwise, the calendar should not be a tab stop.
// This prevents ngAria from overzealously adding a tabindex to anything with an ng-model.
if (!attributes['tabindex']) {
element.setAttribute('tabindex', '-1');
}
```
In TypeScript code, use JsDoc-style comments for descriptions (on classes, members, etc.) and
use `//` style comments for everything else (explanations, background info, etc.).
### API Design
#### Boolean arguments
Generally avoid adding boolean arguments to a method in cases where that argument means
"do something extra". In these cases, prefer breaking the behavior up into different functions.
```typescript
// AVOID
function getTargetElement(createIfNotFound = false) {
// ...
}
```
```typescript
// PREFER
function getExistingTargetElement() {
// ...
}
function createTargetElement() {
// ...
}
```
You can ignore this guidance when necessary for performance reasons in framework code.
#### Optional arguments
Use optional function arguments only when such an argument makes sense for an API or when required
for performance. Don't use optional arguments merely for convenience in implementation.
### TypeScript
#### Typing
Avoid `any` where possible. If you find yourself using `any`, consider whether a generic or
`unknown` may be appropriate in your case.
#### Getters and Setters
Getters and setters introduce openings for side effects, add more complexity for code readers,
and generate additional code when targeting older browsers.
* Only use getters and setters for `@Input` properties or when otherwise required for API
compatibility.
* Avoid long or complex getters and setters. If the logic of an accessor would take more than
three lines, introduce a new method to contain the logic.
* A getter should immediately precede its corresponding setter.
* Decorators such as `@Input` should be applied to the getter and not the setter.
* Always use a `readonly` property instead of a getter (with no setter) when possible.
```typescript
/** YES */
readonly active: boolean;
/** NO */
get active(): boolean {
// Using a getter solely to make the property read-only.
return this._active;
}
```
#### Iteration
Prefer `for` or `for of` to `Array.prototype.forEach`. The `forEach` API makes debugging harder
and may increase overhead from unnecessary function invocations (though modern browsers do usually
optimize this well).
#### JsDoc comments
All public APIs must have user-facing comments. These are extracted for API documentation and shown
in IDEs.
Private and internal APIs should have JsDoc when they are not obvious. Ultimately it is the purview
of the code reviewer as to what is "obvious", but the rule of thumb is that *most* classes,
properties, and methods should have a JsDoc description.
Properties should have a concise description of what the property means:
```typescript
/** The label position relative to the checkbox. Defaults to 'after' */
@Input() labelPosition: 'before' | 'after' = 'after';
```
Methods blocks should describe what the function does and provide a description for each parameter
and the return value:
```typescript
/**
* Opens a modal dialog containing the given component.
* @param component Type of the component to load into the dialog.
* @param config Dialog configuration options.
* @returns Reference to the newly-opened dialog.
*/
open<T>(component: ComponentType<T>, config?: MatDialogConfig): MatDialogRef<T> { ... }
```
Boolean properties and return values should use "Whether..." as opposed to "True if...":
```ts
/** Whether the button is disabled. */
disabled: boolean = false;
```
#### Try-Catch
Only use `try-catch` blocks when dealing with legitimately unexpected errors. Don't use `try` to
avoid checking for expected error conditions such as null dereference or out-of-bound array access.
Each `try-catch` block **must** include a comment that explains the
specific error being caught and why it cannot be prevented.
##### Variable declarations
Prefer `const` wherever possible, only using `let` when a value must change. Avoid `var` unless
absolutely necessary.
##### `readonly`
Use `readonly` members wherever possible.
#### Naming
##### General
* Prefer writing out words instead of using abbreviations.
* Prefer *exact* names over short names (within reason). For example, `labelPosition` is better than
`align` because the former much more exactly communicates what the property means.
* Except for `@Input()` properties, use `is` and `has` prefixes for boolean properties / methods.
* Name identifiers based on their responsibility. Names should capture what the code *does*,
not how it is used:
```typescript
/** NO: */
class DefaultRouteReuseStrategy { }
/** YES: */
class NonStoringRouteReuseStrategy { }
```
##### Observables
Don't suffix observables with `$`.
##### Classes
* Use PascalCase (aka UpperCamelCase).
* Class names should not end in `Impl`.
##### Interfaces
* Do not prefix interfaces with `I`.
* Do not suffix interfaces with `Interface`.
##### Functions and methods
Use camelCase (aka lowerCamelCase).
The name of a function should capture the action performed *by* that method rather than
describing when the method will be called. For example:
```typescript
/** AVOID: does not describe what the function does. */
handleClick() {
// ...
}
/** PREFER: describes the action performed by the function. */
activateRipple() {
// ...
}
```
##### Constants and injection tokens
Use UPPER_SNAKE_CASE.
##### Test classes and examples
Give test classes and examples meaningful, descriptive names.
```ts
/** PREFER: describes the scenario under test. */
class FormGroupWithCheckboxAndRadios { /* ... */ }
class InputWithNgModel { /* ... */ }
/** AVOID: does not fully describe the scenario under test. */
class Comp { /* ... */ }
class InputComp { /* ... */ }
```
#### RxJS
When importing the `of` function to create an `Observable` from a value, alias the imported
function as `observableOf`.
```typescript
import {of as observableOf} from 'rxjs';
```
#### Testing
##### Test names
Use descriptive names for jasmine tests. Ideally, test names should read as a sentence, often of
the form "it should...".
```typescript
/** PREFER: describes the scenario under test. */
describe('Router', () => {
describe('with the default route reuse strategy', () => {
it('should not reuse routes upon location change', () => {
// ...
});
})
});
/** AVOID: does not fully describe the scenario under test. */
describe('Router', () => {
describe('default strategy', () => {
it('should work', () => {
// ...
});
})
});
```
| {
"end_byte": 8006,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/coding-standards.md"
} |
angular/contributing-docs/triage-and-labelling.md_0_9291 | # Triage Process and GitHub Labels for Angular
This document describes how the Angular team uses labels and milestones to triage issues on GitHub.
The basic idea of the process is that caretaker only assigns a component (`area: *`) label.
The owner of the component is then responsible for the detailed / component-level triage.
## Label Types
### Areas
The caretaker should be able to determine the _area_ for incoming issues.
Most areas generally corresponds to a specific directory or set of directories in this repo. Some
areas are more cross-cutting (e.g. for performance or security). Apply all labels that make sense
for an issue. Each `area: ` label on GitHub should have a description of what it's for.
### Community engagement
* `help wanted` - Indicates an issue whose complexity/scope makes it suitable for a community
contributor to pick up.
* `good first issue` - Indicates an issue that is suitable for first-time contributors.
(This label should be applied _in addition_ to `help wanted` for better discoverability.)
<sub>`help wanted` and `good first issue` are [default GitHub labels] familiar to many
developers.</sub>
[default GitHub labels]: https://docs.github.com/en/github/managing-your-work-on-github/managing-labels#about-default-labels
## Caretaker Triage Process (Initial Triage)
The caretaker assigns `area: *` labels to new issues as they come in.
Untriaged issues can be found by selecting the issues with no milestone.
If an issue or PR obviously relates to a release regression, the caretaker must assign an
appropriate priority (`P0` or `P1`) and ensure that someone from the team is actively working to
resolve it.
Initial triage should occur daily so that issues can move into detailed triage.
Once the initial triage is done, the ng-bot automatically adds the milestone `needsTriage`.
## Detailed Triage
Detailed triage can be done by anyone familiar with the issue's area.
### Step 1: Does the issue have enough information?
Gauge whether the issue has enough information to act upon. This typically includes a test case
via StackBlitz or GitHub and steps to reproduce. If the issue may be legitimate but needs more
information, add the "needs clarification" label. These labels can be revisited if the author can
provide further clarification. If the issue does have enough information, move on to step 2.
### Step 2: Bug, feature, or discussion?
By default, all issues are considered bugs. Bug reports require only a priority label.
If the issue is a feature request, apply the "feature" label. Use your judgement to determine
whether the feature request is reasonable. If it's clear that the issue requests something
infeasible, close the issue with a comment explaining why.
If the issue is an RFC or discussion, apply the "discussion" label. Use your judgement to determine
whether this discussion belongs on GitHub. Discussions here should pertain to the technical
implementation details of Angular. Redirect requests for debugging help or advice to a more
appropriate channel unless they're capturing a legitimate bug.
### Step 3: Set a Priority
For bug reports, set a priority label.
| Label | Description |
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| P0 | An issue that causes a full outage, breakage, or major function unavailability for everyone, without any known workaround. The issue must be fixed immediately, taking precedence over all other work. Should receive updates at least once per day. |
| P1 | An issue that significantly impacts a large percentage of users; if there is a workaround it is partial or overly painful. The issue should be resolved before the next release. |
| P2 | The issue is important to a large percentage of users, with a workaround. Issues that are significantly ugly or painful (especially first-use or install-time issues). Issues with workarounds that would otherwise be P0 or P1. |
| P3 | An issue that is relevant to core functions, but does not impede progress. Important, but not urgent. |
| P4 | A relatively minor issue that is not relevant to core functions, or relates only to the attractiveness or pleasantness of use of the system. Good to have but not necessary changes/fixes. |
| P5 | The team acknowledges the request but (due to any number of reasons) does not plan to work on or accept contributions for this request. The issue remains open for discussion. |
Issues marked with "feature" or "discussion" don't require a priority.
### Step 4: Apply additional information labels
Many optional labels provide additional context for issues. Consider adding any of the following if
they apply to the issue:
* Browser or operating system labels (`windows`, `browser: ie 11`, etc.)
* Labels that inform the severity (`regression`, `has workaround`, `no workaround`)
* Labels that categorize the bug (`performance`, `refactoring`, `memory leak`)
* Community engagement labels (`help wanted`, `good first issue`)
Once this triage is done, the ng-bot automatically changes the milestone from `needs triage` to
`Backlog`.
## Triaging PRs
PRs labels signal their state. Every triaged PR must have a `action: *` label assigned to it:
* `action: discuss`: Discussion is needed, to be led by the author.
* _**Who adds it:** Typically the PR author._
* _**Who removes it:** Whoever added it._
* `action: review` (optional): One or more reviews are pending. The label is optional, since the
review status can be derived from GitHub's Reviewers interface.
* _**Who adds it:** Any team member. The caretaker can use it to differentiate PRs pending
review from merge-ready PRs._
* _**Who removes it:** Whoever added it or the reviewer adding the last missing review._
* `action: cleanup`: More work is needed from the author.
* _**Who adds it:** The reviewer requesting changes to the PR._
* _**Who removes it:** Either the author (after implementing the requested changes) or the
reviewer (after confirming the requested changes have been implemented)._
* `action: merge`: The PR author is ready for the changes to be merged by the caretaker as soon as
the PR is green (or merge-assistance label is applied and caretaker has deemed it acceptable
manually). In other words, this label indicates to "auto submit when ready".
* _**Who adds it:** Typically the PR author._
* _**Who removes it:** Whoever added it._
In addition, PRs can have the following states:
* `state: WIP`: PR is experimental or rapidly changing. Not ready for review or triage.
* _**Who adds it:** The PR author._
* _**Who removes it:** Whoever added it._
* `state: blocked`: PR is blocked on an issue or other PR. Not ready for merge.
* _**Who adds it:** Any team member._
* _**Who removes it:** Any team member._
When a PR is ready for review, a review should be requested using the Reviewers interface in GitHub.
## PR Target
See [Branches and versioning](./branches-and-versioning.md) for background on how Angular
manages its branches and versioning.
In our git workflow, we merge changes either to the `main` branch, the active patch branch (
e.g. `5.0.x`), or to both.
The decision about the target must be done by the PR author and/or reviewer.
This decision is then honored when the PR is being merged by the caretaker.
To communicate the target we use GitHub labels and only one target label may be applied to a PR.
Targeting an active release train:
* `target: major`: Any breaking change
* `target: minor`: Any new feature
* `target: patch`: Bug fixes, refactorings, documentation changes, etc. that pose no or very low
risk of adversely
affecting existing applications.
Special Cases:
* `target: rc`: A critical fix for an active release-train while it is in a feature freeze or RC
phase
* `target: lts`: A critical fix for a specific release-train that is still within the long term
support phase
Notes:
- To land a change only in a patch/RC branch, without landing it in any other active release-train
branch (such
as `main`), the patch/RC branch can be targeted in the GitHub UI with the appropriate
`target: patch`/`target: rc` label.
- `target: lts` PRs must target the specific LTS branch they would need to merge into in the GitHub
UI, in
cases which a change is desired in multiple LTS branches, individual PRs for each LTS branch must
be created
If a PR is missing the `target:*` label, it will be marked as pending by the angular robot status
checks.
| {
"end_byte": 9291,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/triage-and-labelling.md"
} |
angular/contributing-docs/triage-and-labelling.md_9291_11600 | ## PR Approvals
Before a PR can be merged it must be approved by the appropriate reviewer(s).
To ensure that the right people review each change, we set review requests
using [PullApprove](https://docs.pullapprove.com/) (via `.pullapprove`) and require that each PR has
at least one approval from an appropriate code owner.
If the PR author is a code owner themselves, the approval can come from _any_ repo collaborator (
person with write access).
In any case, the reviewer should actually look through the code and provide feedback if necessary.
Note that approved state does not mean a PR is ready to be merged.
For example, a reviewer might approve the PR but request a minor tweak that doesn't need further
review, e.g., a rebase or small uncontroversial change.
Only the `action: merge` label means that the PR is ready for merging.
## Special Labels
### `cla: yes`, `cla: no`
* _**Who adds it:** @googlebot, or a Googler manually overriding the status in case the bot got it
wrong._
* _**Who removes it:** @googlebot._
Managed by googlebot.
Indicates whether a PR has a CLA on file for its author(s).
Only issues with `cla:yes` should be merged into main.
### `adev: preview`
* _**Who adds it:** Any team member. (Typically the author or a reviewer.)_
* _**Who removes it:** Any team member. (Typically, whoever added it.)_
Applying this label to a PR makes the angular.dev preview available regardless of the
author.
### `action: merge-assistance`
* _**Who adds it:** Any team member._
* _**Who removes it:** Any team member._
This label can be added to let the caretaker know that the PR needs special attention.
There should always be a comment added to the PR to explain why the caretaker's assistance is
needed.
The comment should be formatted like
this: `merge-assistance: <explain what kind of assistance you need, and if not obvious why>`
For example, the PR owner might not be a Googler and needs help to run g3sync; or one of the checks
is failing due to external causes and the PR should still be merged.
### `action: rerun CI at HEAD`
* _**Who adds it:** Any team member._
* _**Who removes it:** The Angular Bot, once it triggers the CI rerun._
This label can be added to instruct the Angular Bot to rerun the CI jobs for the PR at latest HEAD
of the branch it targets.
| {
"end_byte": 11600,
"start_byte": 9291,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/triage-and-labelling.md"
} |
angular/contributing-docs/saved-issue-replies.md_0_4803 | # Saved Responses for Angular's Issue Tracker
This doc collects canned responses that the Angular team can use to close issues that fall into the
listed resolution categories.
Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list
of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need
to be maintained by individual team members. Since the responses can be modified in the future, all
responses are versioned to simplify the process of keeping the responses up to date.
## Angular: Already Fixed (v3)
```
Thanks for reporting this issue. Luckily it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
If after upgrade the problem still exists in your application please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
```
## Angular: Don't Understand (v3)
```
I'm sorry but we don't understand the problem you are reporting.
If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
```
## Angular: Can't reproduce (v2)
```
I'm sorry but we can't reproduce the problem you are reporting. We require that reported issues have a minimal reproduction that showcases the problem.
If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template that include info on how to create a reproduction using our template.
```
## Angular: Duplicate (v2)
```
Thanks for reporting this issue. However this issue is a duplicate of an existing issue #ISSUE_NUMBER. Please subscribe to that issue for future updates.
```
## Angular: Insufficient Information Provided (v2)
```
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#submit-issue) to understand why we can't act on issues that are lacking important information.
If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
```
## Angular: Issue Outside of Angular (v2)
```
I'm sorry but this issue is not caused by Angular. Please contact the author(s) of project PROJECT_NAME or file issue on their issue tracker.
```
## Angular: Behaving as Expected (v1)
```
It appears this behaves as expected. If you still feel there is an issue, please provide further details in a new issue.
```
## Angular: Non-reproducible (v2)
```
I'm sorry but we can't reproduce the problem following the instructions you provided.
If the problem still exists in your application please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
```
## Angular: Obsolete (v2)
```
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular version.
If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
```
## Angular: Support Request (v1)
```
Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on [StackOverflow](https://stackoverflow.com/) using tag `angular`.
If you are wondering why we don't resolve support issues via the issue tracker, please [check out this explanation](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#question).
```
## Angular: Commit Header
```
It looks like you need to update your commit header to match our requirements. This is different from the PR title. To update the commit header, use the command `git commit --amend` and update the header there.
Once you've finished that update, you will need to force push using `git push [origin name] [branch name] --force`. That should address this.
```
## Angular: Rebase and Squash
```
Please rebase and squash your commits. To do this, make sure to `git fetch upstream` to get the latest changes from the angular repository. Then in your branch run `git rebase upstream/main -i` to do an interactive rebase. This should allow you to fixup or drop any unnecessary commits. After you finish the rebase, force push using `git push [origin name] [branch name] --force`.
```
| {
"end_byte": 4803,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/saved-issue-replies.md"
} |
angular/contributing-docs/running-benchmarks.md_0_918 | ## Benchmarks
- Benchmarks code can be found in: `/modules/benchmarks/src`.
- Benchmarks convenience script code in `/scripts/benchmarks`.
- Benchpress (the sample runner) in `/packages/benchpress`.
### Running benchmark
```
yarn benchmarks run
```
### Running a comparison with local changes
```
yarn benchmarks run-compare main
yarn benchmarks run-compare <compare-sha> [bazel-target]
```
If no benchmark target is specified, a prompt will allow you to select an available benchmark.
### Running a comparison in a PR
You can start a comparison by adding a comment as followed to any PR:
```
/benchmark-compare main //modules/benchmarks/src/expanding_rows:perf_chromium
```
```
/benchmark-compare <other-sha> //modules/benchmarks/src/expanding_rows:perf_chromium
```
**Note**: An explicit benchmark target must be provided. You can use the prompt
of `yarn benchmarks run` to discover available benchmarks.
| {
"end_byte": 918,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/running-benchmarks.md"
} |
angular/contributing-docs/feature-request-consideration.md_0_1981 | <a name="feature-request"></a>
# Feature request process
To manage the requests we receive at scale, we introduced automation in our feature request
management process. After we identify an issue as a feature request, it goes through several steps.
## Manual review
First, we manually review the issue to see if it aligns with any of the existing roadmap efforts. If
it does, we prioritize it accordingly. Alternatively, we keep it open and our feature request bot
initiates a voting process.
## Voting phase
To include the community in the feature request process, we open voting for a fixed length of time.
Anyone can cast a vote for the request with a thumbs-up (👍) reaction on the original issue
description.
When a feature request reaches 20 or more upvotes, we formally consider the feature request.
Alternatively, the bot closes the request.
**For issues that are 60+ days old**: The voting phase is 20 days
**For new issues**: The voting phase is 60 days
## Consideration phase
If the feature request receives 20 or more thumbs-up (👍) votes on the original issue description
(during the voting phase described above), we verify the Angular team can afford to maintain the
feature and whether it aligns with the long-term vision of Angular. If the answers to both of these
questions are yes, we prioritize the request, alternatively we close it with an explanation of our
decision.
## Diagram
<p align="center" width="100%">
<img src="./images/feature-request-automation.png" alt="Feature Request Automation">
</p>
## What if I want to implement the feature to help the Angular team?
Often implementing the feature as a separate package is a better option. Building an external
package rather than including the functionality in Angular helps with:
- Keeping the framework's runtime smaller and simpler
- Makes the learning journey of developers getting started with Angular smoother
- Reduces maintainers burden and the complexity of the source code
| {
"end_byte": 1981,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/feature-request-consideration.md"
} |
angular/contributing-docs/dev_preview_and_experimental.md_0_1207 | ## Releasing APIs before they're fully stable
The Angular team may occasionally seek to release a feature or API without immediately
including this API in Angular's normal support and deprecation category. You can use
one of two labels on such APIs: Developer Preview and Experimental. APIs tagged this way
are not subject to Angular's breaking change and deprecation policy.
Use the sections below to decide whether a pre-stable tag makes sense.
### Developer Preview
Use "Developer Preview" when:
* The team has relatively high confidence the API will ship as stable.
* The team needs additional community feedback before fully committing to an exact API shape.
* The API may undergo only minor, superficial changes. This can include changes like renaming
or reordering parameters, but should not include significant conceptual or structural changes.
### Experimental
Use "Experimental" when:
* The team has low-to-medium confidence that the API should exist at all.
* The team needs additional community feedback before deciding to move forward with the API at all.
* The API may undergo significant conceptual or structural changes.
* The API relies on a not-yet-standardized platform feature.
| {
"end_byte": 1207,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/dev_preview_and_experimental.md"
} |
angular/contributing-docs/public-api-surface.md_0_5622 | # Supported public API surface of angular/angular code
Angular's SemVer, release schedule, and deprecation policy applies to these npm packages:
- `@angular/animations`
- `@angular/common`
- `@angular/core`
- `@angular/elements`
- `@angular/forms`
- `@angular/platform-browser-dynamic`
- `@angular/platform-browser`
- `@angular/platform-server`
- `@angular/router`
- `@angular/service-worker`
- `@angular/upgrade`
The `@angular/compiler` package is explicitly excluded from this list. The compiler is a generally
considered private/internal API and may change at any time. Only very specific use-cases, such as
linters or IDE integration, require direct access to the compiler API. If you are
working on this kind of integration, please reach out to us first.
Additionally, only the command line usage (not direct use of APIs) of
`@angular/compiler-cli` is covered.
Within the supported packages, Angular keeps stable:
- Symbols exported via the main entry point (e.g. `@angular/core`) and testing entry point (
e.g. `@angular/core/testing`). This applies to both runtime/JavaScript values and TypeScript
types.
- Symbols exported via global namespace `ng` (e.g. `ng.core`)
We explicitly consider the following to be _excluded_ from the public API:
- Any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other
documented package entry-points.
- Constructors of injectable classes (services and directives). Use dependency injection to obtain
instances of these classes
- Any class members or symbols marked as `private`, or prefixed with
underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and double barred latin o (`ɵɵ`).
- Extending any of our classes unless the support for this is specifically documented in the API
reference.
- The contents and API surface of the code generated by Angular's compiler.
- The `@angular/core/primitives` package, including its descendant entry-points.
Our peer dependencies (such as TypeScript, Zone.js, or RxJS) are not considered part of our API
surface, but they are included in our SemVer policies. We might update the required version of these
dependencies in minor releases if the update doesn't cause breaking changes for Angular
applications. Peer dependency updates that result in non-trivial breaking changes must be deferred
to major Angular releases.
<a name="final-classes"></a>
## Extending Angular classes
All classes in Angular's public API are considered `final`. They should not be extended unless
explicitly stated in the API documentation.
Extending such classes is not supported, since protected members and internal implementation may
change outside major releases.
<a name="golden-files"></a>
## Golden files
Angular tracks the status of the public API in a *golden file*, maintained with a tool called the
*public API guard*.
If you modify any part of a public API in one of the supported public packages, the PR will fail a
test in CI with an error message that instructs you to accept the golden file.
The public API guard provides a Bazel target that updates the current status of a given package. If
you add to or modify the public API in any way, you must use [yarn](https://yarnpkg.com/) to execute
the Bazel target in your terminal shell of choice (a recent version of `bash` is recommended).
```shell
yarn bazel run //packages/<modified_package>:<modified_package>_api.accept
```
Here is an example of a CI test failure that resulted from adding a new allowed type to a public
property in `core.d.ts`. Error messages from the API guard use [`git-diff` formatting](https://git-scm.com/docs/git-diff#_combined_diff_format).
```
FAIL: //packages/core:core_api (see /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/testlogs/packages/core/core_api/test_attempts/attempt_1.log)
INFO: From Action packages/compiler-cli/ngcc/test/fesm5_angular_core.js:
[BABEL] Note: The code generator has deoptimised the styling of /b/f/w/bazel-out/k8-fastbuild/bin/packages/core/npm_package/fesm2015/core.js as it exceeds the max of 500KB.
FAIL: //packages/core:core_api (see /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/testlogs/packages/core/core_api/test.log)
FAILED: //packages/core:core_api (Summary)
/home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/testlogs/packages/core/core_api/test.log
/home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/testlogs/packages/core/core_api/test_attempts/attempt_1.log
INFO: From Testing //packages/core:core_api:
==================== Test output for //packages/core:core_api:
/b/f/w/bazel-out/k8-fastbuild/bin/packages/core/core_api.sh.runfiles/angular/packages/core/npm_package/core.d.ts(7,1): error: No export declaration found for symbol "ComponentFactory"
--- goldens/public-api/core/core.d.ts Golden file
+++ goldens/public-api/core/core.d.ts Generated API
@@ -563,9 +563,9 @@
ngModule: Type<T>;
providers?: Provider[];
}
-export declare type NgIterable<T> = Array<T> | Iterable<T>;
+export declare type NgIterable<T> = Iterable<T>;
export declare interface NgModule {
bootstrap?: Array<Type<any> | any[]>;
declarations?: Array<Type<any> | any[]>;
If you modify a public API, you must accept the new golden file.
To do so, execute the following Bazel target:
yarn bazel run //packages/core:core_api.accept
```
| {
"end_byte": 5622,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/public-api-surface.md"
} |
angular/contributing-docs/branches-and-versioning.md_0_7450 | # Angular Branching and Versioning: A Practical Guide
This guide explains how the Angular team manages branches and how those branches relate to
merging PRs and publishing releases. Before reading, you should understand
[Semantic Versioning](https://semver.org/#semantic-versioning-200).
## Distribution tags on npm
Angular's branching relates directly to versions published on npm. We will reference these [npm
distribution tags](https://docs.npmjs.com/cli/v6/commands/npm-dist-tag#purpose) throughout:
| Tag | Description |
|--------|-----------------------------------------------------------------------------------|
| latest | The most recent stable version. |
| next | The most recent pre-release version of Angular for testing. May not always exist. |
| v*-lts | The most recent LTS release for the specified version, such as `v9-lts`. |
## Branch naming
Angular's main branch is `main`. This branch always represents the absolute latest changes. The
code on `main` always represents a pre-release version, often published with the `next` tag on npm.
For each minor and major version increment, a new branch is created. These branches use a naming
scheme matching `\d+\.\d+\.x` and receive subsequent patch changes for that version range. For
example, the `10.2.x` branch represents the latest patch changes for subsequent releases starting
with `10.2.`. The version tagged on npm as `latest` will always correspond to such a branch,
referred to as the **active patch branch**.
## Major releases lifecycle
Angular releases a major version roughly every six months. Following a major release, we move
through a consistent lifecycle to the next major release, and repeat. At a high level, this
process proceeds as follows:
* A major release occurs. The `main` branch now represents the next minor version.
* Six weeks later, a minor release occurs. The `main` branch now represents the next minor
version.
* Six weeks later, a second minor release occurs. The `main` branch now represents the next major
version.
* Three months later, a major release occurs and the process repeats.
### Example
* Angular publishes `11.0.0`. At this point in time, the `main` branch represents `11.1.0`.
* Six weeks later, we publish `11.1.0` and `main` represents `11.2.0`.
* Six weeks later, we publish `11.2.0` and `main` represents `12.0.0`.
* Three months later, this cycle repeats with the publication of `12.0.0`.
### Feature freeze and release candidates
Before publishing minor and major versions as `latest` on npm, they go through a feature freeze and
a release candidate (RC) phase.
**Feature freeze** means that `main` is forked into a branch for a specific version, with no
additional features permitted before releasing as `latest` to npm. This branch becomes the **active
RC branch**. Upon branching, the `main` branch increments to the next minor or major pre-release
version. One week after feature freeze, the first RC is published with the `next` tag on npm from
the active RC branch. Patch bug fixes continue to merge into `main`, the active RC branch, and
the active patch branch during this entire period.
One to three weeks after publishing the first RC, the active RC branch is published as `latest` on
npm and the branch becomes the active patch branch. At this point there is no active RC branch until
the next minor or major release.
## Targeting pull requests
Every pull request has a **base branch**:

This base branch represents the latest branch that will receive the change. Most pull requests
should specify `main`. However, some changes will explicitly use an earlier branch, such as
`11.1.x`, in order to patch an older version. Specific GitHub labels, described below, control the
additional branches into which a pull request will be cherry-picked.
### Labelling pull requests
There are five labels that target PRs to versions:
| Label | Description |
|---------------|-----------------------------------------------------------------------------|
| target: major | A change that includes a backwards-incompatible behavior or API change. |
| target: minor | A change that introduces a new, backwards-compatible functionality. |
| target: patch | A backwards-compatible bug fix. |
| target: rc | A change that should be explicitly included in an active release candidate. |
| target: lts | A critical security or browser compatibility fix for LTS releases. |
Every PR must have exactly one `target: *` label. Angular's dev tooling will merge the pull request
into its base branch and then cherry-pick the commits to the appropriate branches based on the
specified target label.
The vast majority of pull requests will target `major`, `minor`, or `patch` based on the contents of
the code change. In rare cases, a pull request will specify `target: rc` or `target: lts` to
explicitly target a special branch.
Breaking changes, marked with `target: major`, can only be merged when `main` represents the next
major version.
### Pull request examples
| I want to... | Target branch | Target label | Your change will land in... |
| ----------------------------------------------------------- | ----------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Make a non-breaking bug fix | `main` | `patch` | `main`, the active patch branch, and the active RC branch if there is one |
| Introduce a new feature | `main` | `minor` | `main` (any time) |
| Make a breaking change | `main` | `major` | `main` (only when `main` represents the next major version) |
| Make a critical security fix | `main` | `lts` | `main`, the active patch branch, the active RC branch if there is one, and all branches for versions within the LTS window |
| Bump the version of an RC | the active RC branch | `rc` | The active RC branch |
| Fix an RC bug for a major release feature | `main` | `rc` | `main` and the active RC branch |
| Backport a bug fix to the `latest` npm version during an RC | the active patch branch | `patch` | the active patch branch only |
| {
"end_byte": 7450,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/branches-and-versioning.md"
} |
angular/contributing-docs/building-and-testing-angular.md_0_7808 | # Building and Testing Angular
This document describes how to set up your development environment to build and test Angular.
It also explains the basic mechanics of using `git`, `node`, and `yarn`.
* [Prerequisite Software](#prerequisite-software)
* [Getting the Sources](#getting-the-sources)
* [Installing NPM Modules](#installing-npm-modules)
* [Building](#building)
* [Running Tests Locally](#running-tests-locally)
* [Formatting your Source Code](#formatting-your-source-code)
* [Linting/verifying your Source Code](#lintingverifying-your-source-code)
* [Publishing Snapshot Builds](#publishing-snapshot-builds)
* [Bazel Support](#bazel-support)
See the [contribution guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md)
if you'd like to contribute to Angular.
## Prerequisite Software
Before you can build and test Angular, you must install and configure the
following on your development machine:
* [Git](https://git-scm.com/) and/or the [**GitHub app**](https://desktop.github.com/) (for Mac and
Windows);
[GitHub's Guide to Installing Git](https://help.github.com/articles/set-up-git) is a good source
of information.\
**Windows Users**: Git Bash or an equivalent shell is required\
*Windows Powershell and cmd shells are not
supported [#46780](https://github.com/angular/angular/issues/46780) so some commands might fail*
* [Node.js](https://nodejs.org), (version specified in [`.nvmrc`](../.nvmrc)) which is used to run a
development web server,
run tests, and generate distributable files.
`.nvmrc` is read by [nvm](https://github.com/nvm-sh/nvm) commands like `nvm install`
and `nvm use`.
* [Yarn](https://yarnpkg.com) (version specified in the engines field
of [`package.json`](../package.json)) which is used to install dependencies.
* On Windows: [MSYS2](https://www.msys2.org/) which is used by Bazel. Follow
the [instructions](https://bazel.build/install/windows#installing-compilers-and-language-runtimes)
## Getting the Sources
Fork and clone the Angular repository:
1. Login to your GitHub account or create one by following the instructions given
[here](https://github.com/signup/free).
2. [Fork](https://help.github.com/forking) the [main Angular
repository](https://github.com/angular/angular).
3. Clone your fork of the Angular repository and define an `upstream` remote pointing back to
the Angular repository that you forked in the first place.
```shell
# Clone your GitHub repository:
git clone git@github.com:<github username>/angular.git
# Go to the Angular directory:
cd angular
# Add the main Angular repository as an upstream remote to your repository:
git remote add upstream https://github.com/angular/angular.git
```
## Installing NPM Modules
Next, install the JavaScript modules needed to build and test Angular:
```shell
# Install Angular project dependencies (package.json)
yarn install
```
## Building
To build Angular run:
```shell
yarn build
```
* Results are put in the `dist/packages-dist` folder.
## Running Tests Locally
Bazel is used as the primary tool for building and testing Angular.
To see how to run and debug Angular tests locally please refer to the
Bazel [Testing Angular](./building-with-bazel.md#testing-angular) section.
Note that you should execute all test suites before submitting a PR to
GitHub (`yarn test //packages/...`).
However, affected tests will be executed on our CI infrastructure. So if you forgot to run some
affected tests which would fail, GitHub will indicate the error state and present you the failures.
PRs can only be merged if the code is formatted properly and all tests are passing.
<a name="formatting-your-source-code"></a>
<a name="clang-format"></a>
<a name="prettier"></a>
### Testing changes against a local library/project
Often for developers the best way to ensure the changes they have made work as expected is to run
use changes in another library or project. To do this developers can build Angular locally, and
using `yarn link` build a local project with the created artifacts.
This can be done by running:
```sh
yarn ng-dev misc build-and-link <path-to-local-project-root>
```
### Building and serving a project
#### Cache
When making changes to Angular packages and testing in a local library/project you need to
run `ng cache disable` to disable the Angular CLI disk cache. If you are making changes that are not
reflected in your locally served library/project, verify if you
have [CLI Cache](https://angular.io/guide/workspace-config#cache-options) disabled.
#### Invoking the Angular CLI
The Angular CLI needs to be invoked using
Node.js [`--preserve-symlinks`](https://nodejs.org/api/cli.html#--preserve-symlinks) flag. Otherwise
the symbolic links will be resolved using their real path which causes node module resolution to
fail.
```sh
node --preserve-symlinks --preserve-symlinks-main node_modules/@angular/cli/lib/init.js serve
```
## Formatting your source code
Angular uses [prettier](https://clang.llvm.org/docs/ClangFormat.html) to format the source code.
If the source code is not properly formatted, the CI will fail and the PR cannot be merged.
You can automatically format your code by running:
- `yarn ng-dev format changed [shaOrRef]`: format only files changed since the provided
sha/ref. `shaOrRef` defaults to `main`.
- `yarn ng-dev format all`: format _all_ source code
- `yarn ng-dev format files <files..>`: format only provided files
## Linting/verifying your Source Code
You can check that your code is properly formatted and adheres to coding style by running:
``` shell
$ yarn lint
```
## Publishing Snapshot Builds
When a build of any branch on the upstream fork angular/angular is green on CI, it
automatically publishes build artifacts to repositories in the Angular org. For example,
the `@angular/core` package is published to https://github.com/angular/core-builds.
You may find that your un-merged change needs some validation from external participants.
Rather than requiring them to pull your Pull Request and build Angular locally, they can depend on
snapshots of the Angular packages created based on the code in the Pull Request.
### Publishing to GitHub Repos
You can also manually publish `*-builds` snapshots just like our CI build does for upstream
builds. Before being able to publish the packages, you need to build them locally by running the
`yarn build` command.
First time, you need to create the GitHub repositories:
``` shell
$ export TOKEN=[get one from https://github.com/settings/tokens]
$ CREATE_REPOS=1 ./scripts/ci/publish-build-artifacts.sh [GitHub username]
```
For subsequent snapshots, just run:
``` shell
$ ./scripts/ci/publish-build-artifacts.sh [GitHub username]
```
The script will publish the build snapshot to a branch with the same name as your current branch,
and create it if it doesn't exist.
## Bazel Support
### IDEs
#### VS Code
1. Install [Bazel](https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel)
extension for VS Code.
#### WebStorm / IntelliJ
1. Install the [Bazel](https://plugins.jetbrains.com/plugin/8609-bazel) plugin
2. You can find the settings under `Preferences->Other Settings->Bazel Settings`
It will automatically recognize `*.bazel` and `*.bzl` files.
### Remote Build Execution and Remote Caching
Bazel builds in the Angular repository use a shared cache. When a build occurs, a hash of the inputs
is computed
and checked against available outputs in the shared cache. If an output is found, it is used as the
output for the
build action rather than performing the build locally.
> Remote Build Execution requires authentication as a google.com account.
#### --config=remote flag
The `--config=remote` flag can be added to enable remote execution of builds.
| {
"end_byte": 7808,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/contributing-docs/building-and-testing-angular.md"
} |
angular/goldens/README.md_0_823 | ### *`public-api/`*
This directory contains all of the public api goldens for our npm packages we publish
to NPM. These are tested on all PRs and commits as part of our bazel tests.
To check or update the public api goldens, run one of the following commands:
```bash
yarn public-api:check
yarn public-api:update
```
### *`packages-circular-deps.json`*
This golden file contains a list of all circular dependencies in the project. As part of the
lint CI job we compare the current circular dependencies against this golden to ensure that
we don't add more cycles. If cycles have been fixed, this file is also updated so that we can
slowly burn down the number of cycles in the project.
To check or update the golden, run the following commands:
```bash
yarn ts-circular-deps:check
yarn ts-circular-deps:approve
```
| {
"end_byte": 823,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/README.md"
} |
angular/goldens/BUILD.bazel_0_216 | package(default_visibility = ["//visibility:public"])
exports_files([
"size-tracking/integration-payloads.json",
])
filegroup(
name = "public-api",
srcs = glob([
"public-api/**/*.md",
]),
)
| {
"end_byte": 216,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/BUILD.bazel"
} |
angular/goldens/public-api/manage.js_0_1973 | const {exec} = require('shelljs');
const {Parser: parser} = require('yargs/helpers');
// Remove all command line flags from the arguments.
const argv = parser(process.argv.slice(2));
// The command the user would like to run, either 'accept' or 'test'
const USER_COMMAND = argv._[0];
// The shell command to query for all Public API guard tests.
const BAZEL_PUBLIC_API_TARGET_QUERY_CMD = `yarn -s bazel query --output label 'kind(nodejs_test, ...) intersect attr("tags", "api_guard", ...)'`;
// Bazel targets for testing Public API goldens
process.stdout.write('Gathering all Public API targets');
const ALL_PUBLIC_API_TESTS = exec(BAZEL_PUBLIC_API_TARGET_QUERY_CMD, {silent: true})
.trim()
.split('\n')
.map((test) => test.trim());
process.stdout.clearLine();
process.stdout.cursorTo(0);
// Bazel targets for generating Public API goldens
const ALL_PUBLIC_API_ACCEPTS = ALL_PUBLIC_API_TESTS.map((test) => `${test}.accept`);
/**
* Run the provided bazel commands on each provided target individually.
*/
function runBazelCommandOnTargets(command, targets, present) {
for (const target of targets) {
process.stdout.write(`${present}: ${target}`);
const commandResult = exec(`yarn -s bazel ${command} ${target}`, {silent: true});
process.stdout.clearLine();
process.stdout.cursorTo(0);
if (commandResult.code) {
console.error(`Failed ${command}: ${target}`);
console.group();
console.error(commandResult.stdout || commandResult.stderr);
console.groupEnd();
} else {
console.log(`Successful ${command}: ${target}`);
}
}
}
switch (USER_COMMAND) {
case 'accept':
runBazelCommandOnTargets('run', ALL_PUBLIC_API_ACCEPTS, 'Running');
break;
case 'test':
runBazelCommandOnTargets('test', ALL_PUBLIC_API_TESTS, 'Testing');
break;
default:
console.warn('Invalid command provided.');
console.warn();
console.warn(`Run this script with either "accept" and "test"`);
break;
}
| {
"end_byte": 1973,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/manage.js"
} |
angular/goldens/public-api/compiler-cli/error_code.api.md_0_4446 | ## 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_IMPORT_NOT_STANDALONE = 2011,
COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
COMPONENT_INVALID_STYLE_URLS = 2021,
// (undocumented)
COMPONENT_MISSING_TEMPLATE = 2001,
COMPONENT_NOT_STANDALONE = 2010,
COMPONENT_RESOURCE_NOT_FOUND = 2008,
COMPONENT_UNKNOWN_DEFERRED_IMPORT = 2022,
COMPONENT_UNKNOWN_IMPORT = 2012,
// (undocumented)
CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES = 4003,
// (undocumented)
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL = 4004,
// (undocumented)
CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK = 4005,
// (undocumented)
CONFIG_FLAT_MODULE_NO_INDEX = 4001,
// (undocumented)
CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
CONFLICTING_INPUT_TRANSFORM = 2020,
CONFLICTING_LET_DECLARATION = 8017,
CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION = 8011,
// (undocumented)
DECORATOR_ARG_NOT_LITERAL = 1001,
// (undocumented)
DECORATOR_ARITY_WRONG = 1002,
DECORATOR_COLLISION = 1006,
// (undocumented)
DECORATOR_NOT_CALLED = 1003,
// (undocumented)
DECORATOR_UNEXPECTED = 1005,
DEFERRED_DEPENDENCY_IMPORTED_EAGERLY = 8014,
DEFERRED_DIRECTIVE_USED_EAGERLY = 8013,
DEFERRED_PIPE_USED_EAGERLY = 8012,
DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
// (undocumented)
DIRECTIVE_MISSING_SELECTOR = 2004,
DUPLICATE_VARIABLE_DECLARATION = 8006,
HOST_BINDING_PARSE_ERROR = 5001,
HOST_DIRECTIVE_COMPONENT = 2015,
HOST_DIRECTIVE_CONFLICTING_ALIAS = 2018,
HOST_DIRECTIVE_INVALID = 2013,
HOST_DIRECTIVE_MISSING_REQUIRED_BINDING = 2019,
HOST_DIRECTIVE_NOT_STANDALONE = 2014,
HOST_DIRECTIVE_UNDEFINED_BINDING = 2017,
ILLEGAL_FOR_LOOP_TRACK_ACCESS = 8009,
ILLEGAL_LET_WRITE = 8015,
IMPORT_CYCLE_DETECTED = 3003,
IMPORT_GENERATION_FAILURE = 3004,
INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT = 8010,
INCORRECTLY_DECLARED_ON_STATIC_MEMBER = 1100,
INITIALIZER_API_DECORATOR_METADATA_COLLISION = 1051,
INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY = 1053,
INITIALIZER_API_NO_REQUIRED_FUNCTION = 1052,
INITIALIZER_API_WITH_DISALLOWED_DECORATOR = 1050,
INJECTABLE_DUPLICATE_PROV = 9001,
INJECTABLE_INHERITS_INVALID_CONSTRUCTOR = 2016,
INLINE_TCB_REQUIRED = 8900,
INLINE_TYPE_CTOR_REQUIRED = 8901,
INTERPOLATED_SIGNAL_NOT_INVOKED = 8109,
INVALID_BANANA_IN_BOX = 8101,
LET_USED_BEFORE_DEFINITION = 8016,
LOCAL_COMPILATION_UNRESOLVED_CONST = 11001,
LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION = 11003,
MISSING_CONTROL_FLOW_DIRECTIVE = 8103,
MISSING_NGFOROF_LET = 8105,
MISSING_PIPE = 8004,
MISSING_REFERENCE_TARGET = 8003,
MISSING_REQUIRED_INPUTS = 8008,
NGMODULE_BOOTSTRAP_IS_STANDALONE = 6009,
NGMODULE_DECLARATION_IS_STANDALONE = 6008,
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
NGMODULE_INVALID_DECLARATION = 6001,
NGMODULE_INVALID_EXPORT = 6003,
NGMODULE_INVALID_IMPORT = 6002,
NGMODULE_INVALID_REEXPORT = 6004,
NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
NGMODULE_REEXPORT_NAME_COLLISION = 6006,
NON_STANDALONE_NOT_ALLOWED = 2023,
NULLISH_COALESCING_NOT_NULLABLE = 8102,
OPTIONAL_CHAIN_NOT_NULLABLE = 8107,
// (undocumented)
PARAM_MISSING_TOKEN = 2003,
// (undocumented)
PIPE_MISSING_NAME = 2002,
SCHEMA_INVALID_ATTRIBUTE = 8002,
SCHEMA_INVALID_ELEMENT = 8001,
SKIP_HYDRATION_NOT_STATIC = 8108,
SPLIT_TWO_WAY_BINDING = 8007,
SUFFIX_NOT_SUPPORTED = 8106,
SUGGEST_STRICT_TEMPLATES = 10001,
SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002,
// (undocumented)
SYMBOL_NOT_EXPORTED = 3001,
TEMPLATE_PARSE_ERROR = 5002,
TEXT_ATTRIBUTE_NOT_BINDING = 8104,
UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007,
UNDECORATED_PROVIDER = 2005,
UNINVOKED_FUNCTION_IN_EVENT_BINDING = 8111,
UNSUPPORTED_INITIALIZER_API_USAGE = 8110,
UNUSED_LET_DECLARATION = 8112,
UNUSED_STANDALONE_IMPORTS = 8113,
// (undocumented)
VALUE_HAS_WRONG_TYPE = 1010,
// (undocumented)
VALUE_NOT_LITERAL = 1011,
WARN_NGMODULE_ID_UNNECESSARY = 6100,
WRITE_TO_READ_ONLY_VARIABLE = 8005
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 4446,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/compiler-cli/error_code.api.md"
} |
angular/goldens/public-api/compiler-cli/extended_template_diagnostic_name.api.md_0_1363 | ## 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 enum ExtendedTemplateDiagnosticName {
// (undocumented)
CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION = "controlFlowPreventingContentProjection",
// (undocumented)
INTERPOLATED_SIGNAL_NOT_INVOKED = "interpolatedSignalNotInvoked",
// (undocumented)
INVALID_BANANA_IN_BOX = "invalidBananaInBox",
// (undocumented)
MISSING_CONTROL_FLOW_DIRECTIVE = "missingControlFlowDirective",
// (undocumented)
MISSING_NGFOROF_LET = "missingNgForOfLet",
// (undocumented)
NULLISH_COALESCING_NOT_NULLABLE = "nullishCoalescingNotNullable",
// (undocumented)
OPTIONAL_CHAIN_NOT_NULLABLE = "optionalChainNotNullable",
// (undocumented)
SKIP_HYDRATION_NOT_STATIC = "skipHydrationNotStatic",
// (undocumented)
SUFFIX_NOT_SUPPORTED = "suffixNotSupported",
// (undocumented)
TEXT_ATTRIBUTE_NOT_BINDING = "textAttributeNotBinding",
// (undocumented)
UNINVOKED_FUNCTION_IN_EVENT_BINDING = "uninvokedFunctionInEventBinding",
// (undocumented)
UNUSED_LET_DECLARATION = "unusedLetDeclaration",
// (undocumented)
UNUSED_STANDALONE_IMPORTS = "unusedStandaloneImports"
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 1363,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/compiler-cli/extended_template_diagnostic_name.api.md"
} |
angular/goldens/public-api/compiler-cli/compiler_options.api.md_0_2259 | ## 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;
generateExtraImportsInLocalMode?: boolean;
onlyExplicitDeferDependencyImports?: boolean;
onlyPublishPublicTypingsForNgModules?: boolean;
}
// @public
export enum DiagnosticCategoryLabel {
Error = "error",
Suppress = "suppress",
Warning = "warning"
}
// @public
export interface DiagnosticOptions {
extendedDiagnostics?: {
defaultCategory?: DiagnosticCategoryLabel;
checks?: {
[Name in ExtendedTemplateDiagnosticName]?: DiagnosticCategoryLabel;
};
};
strictStandalone?: boolean;
}
// @public
export interface I18nOptions {
enableI18nLegacyMessageIdFormat?: boolean;
i18nInLocale?: string;
i18nNormalizeLineEndingsInICUs?: boolean;
i18nOutFile?: string;
i18nOutFormat?: string;
i18nOutLocale?: string;
i18nPreserveWhitespaceForLegacyExtraction?: boolean;
i18nUseExternalIds?: boolean;
}
// @public
export interface LegacyNgcOptions {
// @deprecated
allowEmptyCodegenFiles?: boolean;
flatModuleId?: string;
flatModuleOutFile?: string;
// @deprecated
fullTemplateTypeCheck?: boolean;
preserveWhitespaces?: boolean;
strictInjectionParameters?: boolean;
}
// @public
export interface MiscOptions {
compileNonExportedClasses?: boolean;
disableTypeScriptVersionCheck?: boolean;
forbidOrphanComponents?: boolean;
}
// @public
export interface StrictTemplateOptions {
strictAttributeTypes?: boolean;
strictContextGenerics?: boolean;
strictDomEventTypes?: boolean;
strictDomLocalRefTypes?: boolean;
strictInputAccessModifiers?: boolean;
strictInputTypes?: boolean;
strictLiteralTypes?: boolean;
strictNullInputTypes?: boolean;
strictOutputEventTypes?: boolean;
strictSafeNavigationTypes?: boolean;
strictTemplates?: boolean;
}
// @public
export interface TargetOptions {
compilationMode?: 'full' | 'partial' | 'experimental-local';
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2259,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/compiler-cli/compiler_options.api.md"
} |
angular/goldens/public-api/upgrade/index.api.md_0_1409 | ## 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<any>, compilerOptions?: CompilerOptions | undefined);
bootstrap(element: Element, modules?: any[], config?: IAngularBootstrapConfig): UpgradeAdapterRef;
downgradeNg2Component(component: Type<any>): Function;
downgradeNg2Provider(token: any): Function;
registerForNg1Tests(modules?: string[]): UpgradeAdapterRef;
upgradeNg1Component(name: string): Type<any>;
upgradeNg1Provider(name: string, options?: {
asToken: any;
}): void;
}
// @public @deprecated
export class UpgradeAdapterRef {
dispose(): void;
// (undocumented)
ng1Injector: IInjectorService;
// (undocumented)
ng1RootScope: IRootScopeService;
// (undocumented)
ng2Injector: Injector;
// (undocumented)
ng2ModuleRef: NgModuleRef<any>;
ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void): void;
}
// @public (undocumented)
export const VERSION: Version;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 1409,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/upgrade/index.api.md"
} |
angular/goldens/public-api/upgrade/static/index.api.md_0_2932 | ## 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 * as i0 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<any>;
downgradedModule?: string;
propagateDigest?: boolean;
inputs?: string[];
outputs?: string[];
selectors?: string[];
}): any;
// @public
export function downgradeInjectable(token: any, downgradedModule?: string): Function;
// @public
export function downgradeModule<T>(moduleOrBootstrapFn: Type<T> | ((extraProviders: StaticProvider[]) => Promise<NgModuleRef<T>>)): string;
// @public @deprecated
export function downgradeModule<T>(moduleOrBootstrapFn: NgModuleFactory<T>): 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;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<UpgradeComponent, never, never, {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<UpgradeComponent, never>;
}
// @public
export class UpgradeModule {
$injector: any;
constructor(
injector: Injector,
ngZone: NgZone,
platformRef: PlatformRef);
bootstrap(element: Element, modules?: string[], config?: any): any;
injector: Injector;
ngZone: NgZone;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<UpgradeModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<UpgradeModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<UpgradeModule, never, never, never>;
}
// @public (undocumented)
export const VERSION: Version;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2932,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/upgrade/static/index.api.md"
} |
angular/goldens/public-api/upgrade/static/testing/index.api.md_0_467 | ## 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<any>;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 467,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/upgrade/static/testing/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_0_146 | ## API Report File for "@angular/forms"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
| {
"end_byte": 146,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_147_8758 | import { AfterViewInit } from '@angular/core';
import { ChangeDetectorRef } from '@angular/core';
import { ElementRef } from '@angular/core';
import { EventEmitter } from '@angular/core';
import * as i0 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<TValue = any, TRawValue extends TValue = TValue> {
constructor(validators: ValidatorFn | ValidatorFn[] | null, asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null);
addAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): void;
addValidators(validators: ValidatorFn | ValidatorFn[]): void;
get asyncValidator(): AsyncValidatorFn | null;
set asyncValidator(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;
readonly events: Observable<ControlEvent<TValue>>;
get<P extends string | readonly (string | number)[]>(path: P): AbstractControl<ɵGetProperty<TRawValue, P>> | null;
get<P extends string | Array<string | number>>(path: P): AbstractControl<ɵGetProperty<TRawValue, P>> | null;
getError(errorCode: string, path?: Array<string | number> | string): any;
getRawValue(): any;
hasAsyncValidator(validator: AsyncValidatorFn): boolean;
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
hasValidator(validator: ValidatorFn): boolean;
get invalid(): boolean;
markAllAsTouched(opts?: {
emitEvent?: boolean;
}): void;
markAsDirty(opts?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
markAsPending(opts?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
markAsPristine(opts?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
markAsTouched(opts?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
markAsUntouched(opts?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
get parent(): FormGroup | FormArray | null;
abstract patchValue(value: TValue, options?: Object): void;
get pending(): boolean;
get pristine(): boolean;
removeAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): void;
removeValidators(validators: ValidatorFn | ValidatorFn[]): void;
abstract reset(value?: TValue, options?: Object): void;
get root(): AbstractControl;
setAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[] | null): void;
setErrors(errors: ValidationErrors | null, opts?: {
emitEvent?: boolean;
}): void;
setParent(parent: FormGroup | FormArray | null): void;
setValidators(validators: ValidatorFn | ValidatorFn[] | null): void;
abstract setValue(value: TRawValue, options?: Object): void;
get status(): FormControlStatus;
readonly statusChanges: Observable<FormControlStatus>;
get 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: TValue;
readonly valueChanges: Observable<TValue>;
}
// @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 | number> | string): any;
hasError(errorCode: string, path?: Array<string | number> | 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<any> | null;
get touched(): boolean | null;
get untouched(): boolean | null;
get valid(): boolean | null;
get validator(): ValidatorFn | null;
get value(): any;
get valueChanges(): Observable<any> | null;
}
// @public
export interface AbstractControlOptions {
asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null;
updateOn?: 'change' | 'blur' | 'submit';
validators?: ValidatorFn | ValidatorFn[] | null;
}
// @public
export class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
get control(): FormGroup;
get formDirective(): Form | null;
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
ngOnInit(): void;
get path(): string[];
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractFormGroupDirective, never, never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractFormGroupDirective, never>;
}
// @public
export interface AsyncValidator extends Validator {
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
}
// @public
export interface AsyncValidatorFn {
// (undocumented)
(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
}
// @public
export class CheckboxControlValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxControlValueAccessor, "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxControlValueAccessor, never>;
}
// @public
export class CheckboxRequiredValidator extends RequiredValidator {
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxRequiredValidator, "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxRequiredValidator, never>;
}
// @public
export const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
// @public
export type ControlConfig<T> = [
T | FormControlState<T>,
(ValidatorFn | ValidatorFn[])?,
(AsyncValidatorFn | AsyncValidatorFn[])?
];
// @public
export abstract class ControlContainer extends AbstractControlDirective {
get formDirective(): Form | null;
name: string | number | null;
get path(): string[] | null;
}
// @public
export abstract class ControlEvent<T = any> {
abstract readonly source: AbstractControl<unknown>;
}
// @public
export interface ControlValueAccessor {
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState?(isDisabled: boolean): void;
writeValue(obj: any): void;
}
// @public
export class DefaultValueAccessor extends BaseControlValueAccessor implements ControlValueAccessor {
constructor(renderer: Renderer2, elementRef: ElementRef, _compositionMode: boolean);
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultValueAccessor, "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultValueAccessor, [null, null, { optional: true; }]>;
}
// @public
export class EmailValidator extends AbstractValidatorDirective {
email: boolean | string;
// (undocumented)
enabled(input: boolean): boolean;
// | {
"end_byte": 8758,
"start_byte": 147,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_8766_16821 | mented)
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailValidator, "[email][formControlName],[email][formControl],[email][ngModel]", never, { "email": { "alias": "email"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<EmailValidator, never>;
}
// @public
export interface Form {
addControl(dir: NgControl): void;
addFormGroup(dir: AbstractFormGroupDirective): void;
getControl(dir: NgControl): FormControl;
getFormGroup(dir: AbstractFormGroupDirective): FormGroup;
removeControl(dir: NgControl): void;
removeFormGroup(dir: AbstractFormGroupDirective): void;
updateModel(dir: NgControl, value: any): void;
}
// @public
export class FormArray<TControl extends AbstractControl<any> = any> extends AbstractControl<ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any>, ɵTypedOrUntyped<TControl, ɵFormArrayRawValue<TControl>, any>> {
constructor(controls: Array<TControl>, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
at(index: number): ɵTypedOrUntyped<TControl, TControl, AbstractControl<any>>;
clear(options?: {
emitEvent?: boolean;
}): void;
// (undocumented)
controls: ɵTypedOrUntyped<TControl, Array<TControl>, Array<AbstractControl<any>>>;
getRawValue(): ɵFormArrayRawValue<TControl>;
insert(index: number, control: TControl, options?: {
emitEvent?: boolean;
}): void;
get length(): number;
patchValue(value: ɵFormArrayValue<TControl>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
push(control: TControl, options?: {
emitEvent?: boolean;
}): void;
removeAt(index: number, options?: {
emitEvent?: boolean;
}): void;
reset(value?: ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
setControl(index: number, control: TControl, options?: {
emitEvent?: boolean;
}): void;
setValue(value: ɵFormArrayRawValue<TControl>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
}
// @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;
ngOnDestroy(): void;
ngOnInit(): void;
get path(): string[];
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormArrayName, "[formArrayName]", never, { "name": { "alias": "formArrayName"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormArrayName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
// @public
export class FormBuilder {
array<T>(controls: Array<T>, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormArray<ɵElement<T, null>>;
// @deprecated (undocumented)
control<T>(formState: T | FormControlState<T>, opts: FormControlOptions & {
initialValueIsDefault: true;
}): FormControl<T>;
// (undocumented)
control<T>(formState: T | FormControlState<T>, opts: FormControlOptions & {
nonNullable: true;
}): FormControl<T>;
// @deprecated (undocumented)
control<T>(formState: T | FormControlState<T>, opts: FormControlOptions, asyncValidator: AsyncValidatorFn | AsyncValidatorFn[]): FormControl<T | null>;
// (undocumented)
control<T>(formState: T | FormControlState<T>, validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl<T | null>;
group<T extends {}>(controls: T, options?: AbstractControlOptions | null): FormGroup<{
[K in keyof T]: ɵElement<T[K], null>;
}>;
// @deprecated
group(controls: {
[key: string]: any;
}, options: {
[key: string]: any;
}): FormGroup;
get nonNullable(): NonNullableFormBuilder;
record<T>(controls: {
[key: string]: T;
}, options?: AbstractControlOptions | null): FormRecord<ɵElement<T, null>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormBuilder, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<FormBuilder>;
}
// @public
export interface FormControl<TValue = any> extends AbstractControl<TValue> {
readonly defaultValue: TValue;
getRawValue(): TValue;
patchValue(value: TValue, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
emitModelToViewChange?: boolean;
emitViewToModelChange?: boolean;
}): void;
registerOnChange(fn: Function): void;
registerOnDisabledChange(fn: (isDisabled: boolean) => void): void;
reset(formState?: TValue | FormControlState<TValue>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
setValue(value: TValue, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
emitModelToViewChange?: boolean;
emitViewToModelChange?: boolean;
}): void;
}
// @public (undocumented)
export const FormControl: ɵFormControlCtor;
// @public
export class FormControlDirective extends NgControl implements OnChanges, OnDestroy {
constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null, callSetDisabledState?: SetDisabledStateOption | undefined);
get control(): FormControl;
form: FormControl;
set isDisabled(isDisabled: boolean);
// @deprecated (undocumented)
model: any;
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
// (undocumented)
ngOnDestroy(): void;
get path(): string[];
// @deprecated (undocumented)
update: EventEmitter<any>;
viewModel: any;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlDirective, "[formControl]", ["ngForm"], { "form": { "alias": "formControl"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlDirective, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
}
// @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 (undocumented)
model: any;
name: string | number | null;
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
// (undocumented)
ngOnDestroy(): void;
get path(): string[];
// @deprecated (undocumented)
update: EventEmitter<any>;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlName, "[formControlName]", never, { "name": { "alias": "formControlName"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵF | {
"end_byte": 16821,
"start_byte": 8766,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_16827_24864 | Declaration<FormControlName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
// @public
export interface FormControlOptions extends AbstractControlOptions {
// @deprecated (undocumented)
initialValueIsDefault?: boolean;
nonNullable?: boolean;
}
// @public
export interface FormControlState<T> {
// (undocumented)
disabled: boolean;
// (undocumented)
value: T;
}
// @public
export type FormControlStatus = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';
// @public
export class FormGroup<TControl extends {
[K in keyof TControl]: AbstractControl<any>;
} = any> extends AbstractControl<ɵTypedOrUntyped<TControl, ɵFormGroupValue<TControl>, any>, ɵTypedOrUntyped<TControl, ɵFormGroupRawValue<TControl>, any>> {
constructor(controls: TControl, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
addControl(this: FormGroup<{
[key: string]: AbstractControl<any>;
}>, name: string, control: AbstractControl, options?: {
emitEvent?: boolean;
}): void;
// (undocumented)
addControl<K extends string & keyof TControl>(name: K, control: Required<TControl>[K], options?: {
emitEvent?: boolean;
}): void;
contains<K extends string>(controlName: K): boolean;
// (undocumented)
contains(this: FormGroup<{
[key: string]: AbstractControl<any>;
}>, controlName: string): boolean;
// (undocumented)
controls: ɵTypedOrUntyped<TControl, TControl, {
[key: string]: AbstractControl<any>;
}>;
getRawValue(): ɵTypedOrUntyped<TControl, ɵFormGroupRawValue<TControl>, any>;
patchValue(value: ɵFormGroupValue<TControl>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
registerControl<K extends string & keyof TControl>(name: K, control: TControl[K]): TControl[K];
// (undocumented)
registerControl(this: FormGroup<{
[key: string]: AbstractControl<any>;
}>, name: string, control: AbstractControl<any>): AbstractControl<any>;
// (undocumented)
removeControl(this: FormGroup<{
[key: string]: AbstractControl<any>;
}>, name: string, options?: {
emitEvent?: boolean;
}): void;
// (undocumented)
removeControl<S extends string>(name: ɵOptionalKeys<TControl> & S, options?: {
emitEvent?: boolean;
}): void;
reset(value?: ɵTypedOrUntyped<TControl, ɵFormGroupValue<TControl>, any>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
setControl<K extends string & keyof TControl>(name: K, control: TControl[K], options?: {
emitEvent?: boolean;
}): void;
// (undocumented)
setControl(this: FormGroup<{
[key: string]: AbstractControl<any>;
}>, name: string, control: AbstractControl, options?: {
emitEvent?: boolean;
}): void;
setValue(value: ɵFormGroupRawValue<TControl>, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
}
// @public
export class FormGroupDirective extends ControlContainer implements Form, OnChanges, OnDestroy {
constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], callSetDisabledState?: SetDisabledStateOption | undefined);
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<any>;
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;
get submitted(): boolean;
updateModel(dir: FormControlName, value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupDirective, "[formGroup]", ["ngForm"], { "form": { "alias": "formGroup"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupDirective, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
// @public
export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]);
name: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupName, "[formGroupName]", never, { "name": { "alias": "formGroupName"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
// @public
export class FormRecord<TControl extends AbstractControl = AbstractControl> extends FormGroup<{
[key: string]: TControl;
}> {
}
// @public (undocumented)
export interface FormRecord<TControl> {
addControl(name: string, control: TControl, options?: {
emitEvent?: boolean;
}): void;
contains(controlName: string): boolean;
getRawValue(): {
[key: string]: ɵRawValue<TControl>;
};
patchValue(value: {
[key: string]: ɵValue<TControl>;
}, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
registerControl(name: string, control: TControl): TControl;
removeControl(name: string, options?: {
emitEvent?: boolean;
}): void;
reset(value?: {
[key: string]: ɵValue<TControl>;
}, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
setControl(name: string, control: TControl, options?: {
emitEvent?: boolean;
}): void;
setValue(value: {
[key: string]: ɵValue<TControl>;
}, options?: {
onlySelf?: boolean;
emitEvent?: boolean;
}): void;
}
// @public
export class FormResetEvent extends ControlEvent {
constructor(source: AbstractControl);
// (undocumented)
readonly source: AbstractControl;
}
// @public
export class FormsModule {
static withConfig(opts: {
callSetDisabledState?: SetDisabledStateOption;
}): ModuleWithProviders<FormsModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormsModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<FormsModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<FormsModule, [typeof i1_2.NgModel, typeof i2_2.NgModelGroup, typeof i3_2.NgForm], never, [typeof i4_2.ɵInternalFormsSharedModule, typeof i1_2.NgModel, typeof i2_2.NgModelGroup, typeof i3_2.NgForm]>;
}
// @public
export class FormSubmittedEvent extends ControlEvent {
constructor(source: AbstractControl);
// (undocumented)
readonly source: AbstractControl;
}
// @public
export const isFormArray: (control: unknown) => control is FormArray;
// @public
export const isFormControl: (control: unknown) => control is FormControl;
// @public
export const isFormGroup: (control: unknown) => control is FormGroup;
// @public
export const isFormRecord: (control: unknown) => control is FormRecord;
// @public
export class MaxLengthValidator extends AbstractValidatorDirective {
maxlength: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxL | {
"end_byte": 24864,
"start_byte": 16827,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_24865_32475 | ngthValidator, "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", never, { "maxlength": { "alias": "maxlength"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MaxLengthValidator, never>;
}
// @public
export class MaxValidator extends AbstractValidatorDirective {
max: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidator, "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MaxValidator, never>;
}
// @public
export class MinLengthValidator extends AbstractValidatorDirective {
minlength: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MinLengthValidator, "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", never, { "minlength": { "alias": "minlength"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MinLengthValidator, never>;
}
// @public
export class MinValidator extends AbstractValidatorDirective {
min: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MinValidator, "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", never, { "min": { "alias": "min"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MinValidator, never>;
}
// @public
export const NG_ASYNC_VALIDATORS: InjectionToken<readonly (Function | Validator)[]>;
// @public
export const NG_VALIDATORS: InjectionToken<readonly (Function | Validator)[]>;
// @public
export const NG_VALUE_ACCESSOR: InjectionToken<readonly ControlValueAccessor[]>;
// @public
export abstract class NgControl extends AbstractControlDirective {
name: string | number | null;
valueAccessor: ControlValueAccessor | null;
abstract viewToModelUpdate(newValue: any): void;
}
// @public
export class NgControlStatus extends AbstractControlStatus {
constructor(cd: NgControl);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatus, "[formControlName],[ngModel],[formControl]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlStatus, [{ self: true; }]>;
}
// @public
export class NgControlStatusGroup extends AbstractControlStatus {
constructor(cd: ControlContainer);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatusGroup, "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlStatusGroup, [{ optional: true; self: true; }]>;
}
// @public
export class NgForm extends ControlContainer implements Form, AfterViewInit {
constructor(validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], callSetDisabledState?: SetDisabledStateOption | undefined);
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<any>;
onReset(): void;
onSubmit($event: Event): boolean;
options: {
updateOn?: FormHooks;
};
get path(): string[];
removeControl(dir: NgModel): void;
removeFormGroup(dir: NgModelGroup): void;
resetForm(value?: any): void;
setValue(value: {
[key: string]: any;
}): void;
get submitted(): boolean;
updateModel(dir: NgControl, value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForm, "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", ["ngForm"], { "options": { "alias": "ngFormOptions"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgForm, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
// @public
export class NgModel extends NgControl implements OnChanges, OnDestroy {
constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[], valueAccessors: ControlValueAccessor[], _changeDetectorRef?: (ChangeDetectorRef | null) | undefined, callSetDisabledState?: SetDisabledStateOption | undefined);
// (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;
updateOn?: FormHooks;
};
get path(): string[];
update: EventEmitter<any>;
viewModel: any;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModel, "[ngModel]:not([formControlName]):not([formControl])", ["ngModel"], { "name": { "alias": "name"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; "options": { "alias": "ngModelOptions"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgModel, [{ optional: true; host: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
}
// @public
export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {
constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]);
name: string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModelGroup, "[ngModelGroup]", ["ngModelGroup"], { "name": { "alias": "ngModelGroup"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgModelGroup, [{ host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
// @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);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSelectOption, "option", never, { "ngValue": { "alias": "ngValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSelectOption, [null, null, { optional: true; host: true; }]>;
}
// @public
export abstract class NonNullableFormBuilder {
abstract array<T>(controls: Array<T>, va | {
"end_byte": 32475,
"start_byte": 24865,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_32489_40425 | : ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormArray<ɵElement<T, never>>;
abstract control<T>(formState: T | FormControlState<T>, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl<T>;
abstract group<T extends {}>(controls: T, options?: AbstractControlOptions | null): FormGroup<{
[K in keyof T]: ɵElement<T[K], never>;
}>;
abstract record<T>(controls: {
[key: string]: T;
}, options?: AbstractControlOptions | null): FormRecord<ɵElement<T, never>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NonNullableFormBuilder, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<NonNullableFormBuilder>;
}
// @public
export class NumberValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
registerOnChange(fn: (_: number | null) => void): void;
writeValue(value: number): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberValueAccessor, "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NumberValueAccessor, never>;
}
// @public
export class PatternValidator extends AbstractValidatorDirective {
pattern: string | RegExp;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<PatternValidator, "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", never, { "pattern": { "alias": "pattern"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PatternValidator, never>;
}
// @public
export class PristineChangeEvent extends ControlEvent {
constructor(pristine: boolean, source: AbstractControl);
// (undocumented)
readonly pristine: boolean;
// (undocumented)
readonly source: AbstractControl;
}
// @public
export class RadioControlValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor, OnDestroy, OnInit {
constructor(renderer: Renderer2, elementRef: ElementRef, _registry: RadioControlRegistry, _injector: Injector);
fireUncheck(value: any): void;
formControlName: string;
name: string;
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
ngOnInit(): void;
onChange: () => void;
registerOnChange(fn: (_: any) => {}): void;
// (undocumented)
setDisabledState(isDisabled: boolean): void;
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RadioControlValueAccessor, "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", never, { "name": { "alias": "name"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RadioControlValueAccessor, never>;
}
// @public
export class RangeValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
registerOnChange(fn: (_: number | null) => void): void;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RangeValueAccessor, "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RangeValueAccessor, never>;
}
// @public
export class ReactiveFormsModule {
static withConfig(opts: {
warnOnNgModelWithFormControl?: 'never' | 'once' | 'always';
callSetDisabledState?: SetDisabledStateOption;
}): ModuleWithProviders<ReactiveFormsModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ReactiveFormsModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ReactiveFormsModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ReactiveFormsModule, [typeof i5_2.FormControlDirective, typeof i6_2.FormGroupDirective, typeof i7_2.FormControlName, typeof i8_2.FormGroupName, typeof i8_2.FormArrayName], never, [typeof i4_2.ɵInternalFormsSharedModule, typeof i5_2.FormControlDirective, typeof i6_2.FormGroupDirective, typeof i7_2.FormControlName, typeof i8_2.FormGroupName, typeof i8_2.FormArrayName]>;
}
// @public
export class RequiredValidator extends AbstractValidatorDirective {
// (undocumented)
enabled(input: boolean): boolean;
required: boolean | string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RequiredValidator, ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", never, { "required": { "alias": "required"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RequiredValidator, never>;
}
// @public
export class SelectControlValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
set compareWith(fn: (o1: any, o2: any) => boolean);
registerOnChange(fn: (value: any) => any): void;
// (undocumented)
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectControlValueAccessor, "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SelectControlValueAccessor, never>;
}
// @public
export class SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
set compareWith(fn: (o1: any, o2: any) => boolean);
registerOnChange(fn: (value: any) => any): void;
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectMultipleControlValueAccessor, "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SelectMultipleControlValueAccessor, never>;
}
// @public
export type SetDisabledStateOption = 'whenDisabledForLegacyCode' | 'always';
// @public
export class StatusChangeEvent extends ControlEvent {
constructor(status: FormControlStatus, source: AbstractControl);
// (undocumented)
readonly source: AbstractControl;
// (undocumented)
readonly status: FormControlStatus;
}
// @public
export class TouchedChangeEvent extends ControlEvent {
constructor(touched: boolean, source: AbstractControl);
// (undocumented)
readonly source: AbstractControl;
// (undocumented)
readonly touched: boolean;
}
// @public
export type UntypedFormArray = FormArray<any>;
// @public (undocumented)
export const UntypedFormArray: UntypedFormArrayCtor;
// @public
export class UntypedFormBuilder extends FormBuilder {
array(controlsConfig: any[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): UntypedFormArray;
control(formState: any, validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): UntypedFormControl;
group(controlsConfig: {
[key: string]: any;
}, options?: AbstractControlOptions | null): UntypedFormGroup;
// @deprecat | {
"end_byte": 40425,
"start_byte": 32489,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/index.api.md_40430_42810 | ndocumented)
group(controlsConfig: {
[key: string]: any;
}, options: {
[key: string]: any;
}): UntypedFormGroup;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<UntypedFormBuilder, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<UntypedFormBuilder>;
}
// @public
export type UntypedFormControl = FormControl<any>;
// @public (undocumented)
export const UntypedFormControl: UntypedFormControlCtor;
// @public
export type UntypedFormGroup = FormGroup<any>;
// @public (undocumented)
export const UntypedFormGroup: UntypedFormGroupCtor;
// @public
export type ValidationErrors = {
[key: string]: any;
};
// @public
export interface Validator {
registerOnValidatorChange?(fn: () => void): void;
validate(control: AbstractControl): ValidationErrors | null;
}
// @public
export interface ValidatorFn {
// (undocumented)
(control: AbstractControl): ValidationErrors | null;
}
// @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;
static max(max: number): ValidatorFn;
static maxLength(maxLength: number): ValidatorFn;
static min(min: number): ValidatorFn;
static minLength(minLength: number): ValidatorFn;
static nullValidator(control: AbstractControl): ValidationErrors | null;
static pattern(pattern: string | RegExp): ValidatorFn;
static required(control: AbstractControl): ValidationErrors | null;
static requiredTrue(control: AbstractControl): ValidationErrors | null;
}
// @public
export class ValueChangeEvent<T> extends ControlEvent<T> {
constructor(value: T, source: AbstractControl);
// (undocumented)
readonly source: AbstractControl;
// (undocumented)
readonly value: T;
}
// @public (undocumented)
export const VERSION: Version;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 42810,
"start_byte": 40430,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/index.api.md"
} |
angular/goldens/public-api/forms/errors.api.md_0_1286 | ## 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 const enum RuntimeErrorCode {
// (undocumented)
COMPAREWITH_NOT_A_FN = 1201,
// (undocumented)
FORM_ARRAY_NAME_MISSING_PARENT = 1054,
// (undocumented)
FORM_CONTROL_NAME_INSIDE_MODEL_GROUP = 1051,
// (undocumented)
FORM_CONTROL_NAME_MISSING_PARENT = 1050,
// (undocumented)
FORM_GROUP_MISSING_INSTANCE = 1052,
// (undocumented)
FORM_GROUP_NAME_MISSING_PARENT = 1053,
// (undocumented)
MISSING_CONTROL = 1001,
// (undocumented)
MISSING_CONTROL_VALUE = 1002,
// (undocumented)
NAME_AND_FORM_CONTROL_NAME_MUST_MATCH = 1202,
// (undocumented)
NG_MISSING_VALUE_ACCESSOR = -1203,
// (undocumented)
NG_VALUE_ACCESSOR_NOT_PROVIDED = 1200,
// (undocumented)
NGMODEL_IN_FORM_GROUP = 1350,
// (undocumented)
NGMODEL_IN_FORM_GROUP_NAME = 1351,
// (undocumented)
NGMODEL_WITHOUT_NAME = 1352,
// (undocumented)
NGMODELGROUP_IN_FORM_GROUP = 1353,
// (undocumented)
NO_CONTROLS = 1000,
// (undocumented)
WRONG_VALIDATOR_RETURN_TYPE = -1101
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 1286,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/forms/errors.api.md"
} |
angular/goldens/public-api/core/global_utils.api.md_0_1583 | ## 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<string, string>;
// (undocumented)
outputs: Record<string, string>;
}
// @public
export function getComponent<T>(element: Element): T | null;
// @public
export function getContext<T extends {}>(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<T>(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)
```
| {
"end_byte": 1583,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/global_utils.api.md"
} |
angular/goldens/public-api/core/index.api.md_0_145 | ## API Report File for "@angular/core"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
| {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_146_8369 | import { EnvironmentProviders as EnvironmentProviders_2 } from '@angular/core';
import { Observable } from 'rxjs';
import { SIGNAL } from '@angular/core/primitives/signals';
import { SignalNode } from '@angular/core/primitives/signals';
import { Subject } from 'rxjs';
import { Subscription } from 'rxjs';
// @public
export interface AbstractType<T> extends Function {
// (undocumented)
prototype: T;
}
// @public
export interface AfterContentChecked {
ngAfterContentChecked(): void;
}
// @public
export interface AfterContentInit {
ngAfterContentInit(): void;
}
// @public
export function afterNextRender<E = never, W = never, M = never>(spec: {
earlyRead?: () => E;
write?: (...args: ɵFirstAvailable<[E]>) => W;
mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;
read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;
}, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
// @public
export function afterNextRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
// @public
export function afterRender<E = never, W = never, M = never>(spec: {
earlyRead?: () => E;
write?: (...args: ɵFirstAvailable<[E]>) => W;
mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;
read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;
}, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
// @public
export function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
// @public
export function afterRenderEffect(callback: (onCleanup: EffectCleanupRegisterFn) => void, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
// @public
export function afterRenderEffect<E = never, W = never, M = never>(spec: {
earlyRead?: (onCleanup: EffectCleanupRegisterFn) => E;
write?: (...args: [...ɵFirstAvailableSignal<[E]>, EffectCleanupRegisterFn]) => W;
mixedReadWrite?: (...args: [...ɵFirstAvailableSignal<[W, E]>, EffectCleanupRegisterFn]) => M;
read?: (...args: [...ɵFirstAvailableSignal<[M, W, E]>, EffectCleanupRegisterFn]) => void;
}, options?: Omit<AfterRenderOptions, 'phase'>): AfterRenderRef;
// @public
export interface AfterRenderOptions {
injector?: Injector;
manualCleanup?: boolean;
// @deprecated
phase?: AfterRenderPhase;
}
// @public @deprecated
export enum AfterRenderPhase {
EarlyRead = 0,
MixedReadWrite = 2,
Read = 3,
Write = 1
}
// @public
export interface AfterRenderRef {
destroy(): void;
}
// @public
export interface AfterViewChecked {
ngAfterViewChecked(): void;
}
// @public
export interface AfterViewInit {
ngAfterViewInit(): void;
}
// @public
export const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
// @public
export const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
// @public
export const APP_ID: InjectionToken<string>;
// @public @deprecated
export const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
// @public
export interface ApplicationConfig {
providers: Array<Provider | EnvironmentProviders>;
}
// @public
export class ApplicationInitStatus {
constructor();
// (undocumented)
readonly done = false;
// (undocumented)
readonly donePromise: Promise<any>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationInitStatus, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
}
// @public
export class ApplicationModule {
constructor(appRef: ApplicationRef);
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
}
// @public
export class ApplicationRef {
attachView(viewRef: ViewRef): void;
bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
// @deprecated
bootstrap<C>(componentFactory: ComponentFactory<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
readonly components: ComponentRef<any>[];
readonly componentTypes: Type<any>[];
destroy(): void;
get destroyed(): boolean;
detachView(viewRef: ViewRef): void;
get injector(): EnvironmentInjector;
readonly isStable: Observable<boolean>;
onDestroy(callback: () => void): VoidFunction;
tick(): void;
get viewCount(): number;
// (undocumented)
whenStable(): Promise<void>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
}
// @public (undocumented)
export function asNativeElements(debugEls: DebugElement[]): any;
// @public
export function assertInInjectionContext(debugFn: Function): void;
// @public
export function assertNotInReactiveContext(debugFn: Function, extraContext?: string): void;
// @public
export function assertPlatform(requiredToken: any): PlatformRef;
// @public
export interface Attribute {
attributeName: string;
}
// @public
export const Attribute: AttributeDecorator;
// @public
export interface AttributeDecorator {
(name: string): any;
// (undocumented)
new (name: string): Attribute;
}
// @public
export function booleanAttribute(value: unknown): boolean;
// @public
export interface BootstrapOptions {
// @deprecated
ignoreChangesOutsideZone?: boolean;
ngZone?: NgZone | 'zone.js' | 'noop';
ngZoneEventCoalescing?: boolean;
ngZoneRunCoalescing?: boolean;
}
// @public
export enum ChangeDetectionStrategy {
Default = 1,
OnPush = 0
}
// @public
export abstract class ChangeDetectorRef {
// @deprecated
abstract checkNoChanges(): void;
abstract detach(): void;
abstract detectChanges(): void;
abstract markForCheck(): void;
abstract reattach(): void;
}
// @public
export interface ClassProvider extends ClassSansProvider {
multi?: boolean;
provide: any;
}
// @public
export interface ClassSansProvider {
useClass: Type<any>;
}
// @public @deprecated
export class Compiler {
clearCache(): void;
clearCacheFor(type: Type<any>): void;
compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
getModuleId(moduleType: Type<any>): string | undefined;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<Compiler, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<Compiler>;
}
// @public
export const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
// @public @deprecated
export abstract class CompilerFactory {
// (undocumented)
abstract createCompiler(options?: CompilerOptions[]): Compiler;
}
// @public
export type CompilerOptions = {
defaultEncapsulation?: ViewEncapsulation;
providers?: StaticProvider[];
preserveWhitespaces?: boolean;
};
// @public
export interface Component extends Directive {
animations?: any[];
changeDetection?: ChangeDetectionStrategy;
encapsulation?: ViewEncapsulation;
imports?: (Type<any> | ReadonlyArray<any>)[];
// @deprecated
interpolation?: [string, string];
// @deprecated
moduleId?: string;
preserveWhitespaces?: boolean;
schemas?: SchemaMetadata[];
standalone?: boolean;
styles?: string | string[];
styleUrl?: string;
styleUrls?: string[];
template?: string;
templateUrl?: string;
viewProviders?: Provider[];
}
// @public
export const Component: ComponentDecorator;
// @public
export interface ComponentDecorator {
(obj: Component): TypeDecorator;
new (obj: Component): Component;
}
// @public @deprecated
export abstract class ComponentFactory<C> {
abstract get componentType(): Type<any>;
abstract create(injector: Injector, projectableNodes | {
"end_byte": 8369,
"start_byte": 146,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_8377_17149 | [], rootSelectorOrNode?: string | any, environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
abstract get inputs(): {
propName: string;
templateName: string;
transform?: (value: any) => any;
isSignal: boolean;
}[];
abstract get ngContentSelectors(): string[];
abstract get outputs(): {
propName: string;
templateName: string;
}[];
abstract get selector(): string;
}
// @public @deprecated
export abstract class ComponentFactoryResolver {
// (undocumented)
static NULL: ComponentFactoryResolver;
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
}
// @public
export interface ComponentMirror<C> {
get inputs(): ReadonlyArray<{
readonly propName: string;
readonly templateName: string;
readonly transform?: (value: any) => any;
readonly isSignal: boolean;
}>;
get isStandalone(): boolean;
get ngContentSelectors(): ReadonlyArray<string>;
get outputs(): ReadonlyArray<{
readonly propName: string;
readonly templateName: string;
}>;
get selector(): string;
get type(): Type<C>;
}
// @public
export abstract class ComponentRef<C> {
abstract get changeDetectorRef(): ChangeDetectorRef;
abstract get componentType(): Type<any>;
abstract destroy(): void;
abstract get hostView(): ViewRef;
abstract get injector(): Injector;
abstract get instance(): C;
abstract get location(): ElementRef;
abstract onDestroy(callback: Function): void;
abstract setInput(name: string, value: unknown): void;
}
// @public
export function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T>;
// @public
export interface ConstructorProvider extends ConstructorSansProvider {
multi?: boolean;
provide: Type<any>;
}
// @public
export interface ConstructorSansProvider {
deps?: any[];
}
// @public
export type ContentChild = Query;
// @public
export const ContentChild: ContentChildDecorator;
// @public
export const contentChild: ContentChildFunction;
// @public
export interface ContentChildDecorator {
(selector: ProviderToken<unknown> | Function | string, opts?: {
descendants?: boolean;
read?: any;
static?: boolean;
}): any;
// (undocumented)
new (selector: ProviderToken<unknown> | Function | string, opts?: {
descendants?: boolean;
read?: any;
static?: boolean;
}): ContentChild;
}
// @public
export interface ContentChildFunction {
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
descendants?: boolean;
read?: undefined;
debugName?: string;
}): Signal<LocatorT | undefined>;
// (undocumented)
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
descendants?: boolean;
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadT | undefined>;
required: {
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
descendants?: boolean;
read?: undefined;
debugName?: string;
}): Signal<LocatorT>;
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
descendants?: boolean;
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadT>;
};
}
// @public
export type ContentChildren = Query;
// @public
export const ContentChildren: ContentChildrenDecorator;
// @public (undocumented)
export function contentChildren<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
descendants?: boolean;
read?: undefined;
debugName?: string;
}): Signal<ReadonlyArray<LocatorT>>;
// @public (undocumented)
export function contentChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
descendants?: boolean;
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadonlyArray<ReadT>>;
// @public
export interface ContentChildrenDecorator {
(selector: ProviderToken<unknown> | Function | string, opts?: {
descendants?: boolean;
emitDistinctChangesOnly?: boolean;
read?: any;
}): any;
// (undocumented)
new (selector: ProviderToken<unknown> | Function | string, opts?: {
descendants?: boolean;
emitDistinctChangesOnly?: boolean;
read?: any;
}): Query;
}
// @public
export function createComponent<C>(component: Type<C>, options: {
environmentInjector: EnvironmentInjector;
hostElement?: Element;
elementInjector?: Injector;
projectableNodes?: Node[][];
}): ComponentRef<C>;
// @public
export interface CreateComputedOptions<T> {
debugName?: string;
equal?: ValueEqualityFn<T>;
}
// @public
export interface CreateEffectOptions {
// @deprecated (undocumented)
allowSignalWrites?: boolean;
debugName?: string;
forceRoot?: true;
injector?: Injector;
manualCleanup?: boolean;
}
// @public
export function createEnvironmentInjector(providers: Array<Provider | EnvironmentProviders>, parent: EnvironmentInjector, debugName?: string | null): EnvironmentInjector;
// @public
export function createNgModule<T>(ngModule: Type<T>, parentInjector?: Injector): NgModuleRef<T>;
// @public @deprecated
export const createNgModuleRef: typeof createNgModule;
// @public
export function createPlatform(injector: Injector): PlatformRef;
// @public
export function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
// @public
export interface CreateSignalOptions<T> {
debugName?: string;
equal?: ValueEqualityFn<T>;
}
// @public
export const CSP_NONCE: InjectionToken<string | null>;
// @public
export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
// @public (undocumented)
export class DebugElement extends DebugNode {
constructor(nativeNode: Element);
get attributes(): {
[key: string]: string | null;
};
get childNodes(): DebugNode[];
get children(): DebugElement[];
get classes(): {
[key: string]: boolean;
};
get name(): string;
get nativeElement(): any;
get properties(): {
[key: string]: any;
};
// (undocumented)
query(predicate: Predicate<DebugElement>): DebugElement;
// (undocumented)
queryAll(predicate: Predicate<DebugElement>): DebugElement[];
// (undocumented)
queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
get styles(): {
[key: string]: string | null;
};
triggerEventHandler(eventName: string, eventObj?: any): void;
}
// @public (undocumented)
export class DebugEventListener {
constructor(name: string, callback: Function);
// (undocumented)
callback: Function;
// (undocumented)
name: string;
}
// @public (undocumented)
export class DebugNode {
constructor(nativeNode: Node);
get componentInstance(): any;
get context(): any;
get injector(): Injector;
get listeners(): DebugEventListener[];
readonly nativeNode: any;
get parent(): DebugElement | null;
get providerTokens(): any[];
get references(): {
[key: string]: any;
};
}
// @public
export const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
// @public @deprecated (undocumented)
export class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
constructor(trackByFn?: TrackByFunction<V>);
// (undocumented)
check(collection: NgIterable<V>): boolean;
// (undocumented)
readonly collection: V[] | Iterable<V> | null;
// (undocumented)
diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
// (undocumented)
forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
// (undocumented)
forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
// (undocumented)
get isDirty(): boolean;
// (undocumented)
readonly length: number;
// (undocumented)
onDestroy(): void;
}
// @public @deprecated ( | {
"end_byte": 17149,
"start_byte": 8377,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_17149_25499 | undocumented)
export const defineInjectable: typeof ɵɵdefineInjectable;
// @public
export function destroyPlatform(): void;
// @public
export abstract class DestroyRef {
abstract onDestroy(callback: () => void): () => void;
}
// @public
export interface Directive {
exportAs?: string;
host?: {
[key: string]: string;
};
hostDirectives?: (Type<unknown> | {
directive: Type<unknown>;
inputs?: string[];
outputs?: string[];
})[];
inputs?: ({
name: string;
alias?: string;
required?: boolean;
transform?: (value: any) => any;
} | string)[];
jit?: true;
outputs?: string[];
providers?: Provider[];
queries?: {
[key: string]: any;
};
selector?: string;
standalone?: boolean;
}
// @public
export const Directive: DirectiveDecorator;
// @public
export interface DirectiveDecorator {
(obj?: Directive): TypeDecorator;
new (obj?: Directive): Directive;
}
// @public
export interface DoBootstrap {
// (undocumented)
ngDoBootstrap(appRef: ApplicationRef): void;
}
// @public
export interface DoCheck {
ngDoCheck(): void;
}
// @public
export function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef;
// @public
export type EffectCleanupFn = () => void;
// @public
export type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
// @public
export interface EffectRef {
destroy(): void;
}
// @public
export class ElementRef<T = any> {
constructor(nativeElement: T);
nativeElement: T;
}
// @public
export abstract class EmbeddedViewRef<C> extends ViewRef {
abstract context: C;
abstract get rootNodes(): any[];
}
// @public
export function enableProdMode(): void;
// @public @deprecated
export const ENVIRONMENT_INITIALIZER: InjectionToken<readonly (() => void)[]>;
// @public
export abstract class EnvironmentInjector implements Injector {
// (undocumented)
abstract destroy(): void;
abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
optional?: false;
}): T;
abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;
// @deprecated
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
// @deprecated (undocumented)
abstract get(token: any, notFoundValue?: any): any;
// @deprecated
abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
}
// @public
export type EnvironmentProviders = {
ɵbrand: 'EnvironmentProviders';
};
// @public
export class ErrorHandler {
// (undocumented)
handleError(error: any): void;
}
// @public
export interface EventEmitter<T> extends Subject<T>, OutputRef<T> {
new (isAsync?: boolean): EventEmitter<T>;
emit(value?: T): void;
subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
}
// @public (undocumented)
export const EventEmitter: {
new (isAsync?: boolean): EventEmitter<any>;
new <T>(isAsync?: boolean): EventEmitter<T>;
readonly prototype: EventEmitter<any>;
};
// @public
export interface ExistingProvider extends ExistingSansProvider {
multi?: boolean;
provide: any;
}
// @public
export interface ExistingSansProvider {
useExisting: any;
}
// @public
export interface FactoryProvider extends FactorySansProvider {
multi?: boolean;
provide: any;
}
// @public
export interface FactorySansProvider {
deps?: any[];
useFactory: Function;
}
// @public
export function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
// @public
export interface ForwardRefFn {
// (undocumented)
(): any;
}
// @public (undocumented)
export function getDebugNode(nativeNode: any): DebugNode | null;
// @public @deprecated
export function getModuleFactory(id: string): NgModuleFactory<any>;
// @public
export function getNgModuleById<T>(id: string): Type<T>;
// @public
export function getPlatform(): PlatformRef | null;
// @public
export interface GetTestability {
// (undocumented)
addToWindow(registry: TestabilityRegistry): void;
// (undocumented)
findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
}
// @public
export interface Host {
}
// @public
export const Host: HostDecorator;
// @public
export const HOST_TAG_NAME: InjectionToken<string>;
// @public
export class HostAttributeToken {
constructor(attributeName: string);
// (undocumented)
toString(): string;
}
// @public
export interface HostBinding {
hostPropertyName?: string;
}
// @public (undocumented)
export const HostBinding: HostBindingDecorator;
// @public
export interface HostBindingDecorator {
(hostPropertyName?: string): any;
// (undocumented)
new (hostPropertyName?: string): any;
}
// @public
export interface HostDecorator {
(): any;
// (undocumented)
new (): Host;
}
// @public
export interface HostListener {
args?: string[];
eventName?: string;
}
// @public (undocumented)
export const HostListener: HostListenerDecorator;
// @public
export interface HostListenerDecorator {
(eventName: string, args?: string[]): any;
// (undocumented)
new (eventName: string, args?: string[]): any;
}
// @public @deprecated
export type ImportedNgModuleProviders = EnvironmentProviders;
// @public
export function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders;
// @public
export type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown> | Array<ImportProvidersSource>;
// @public
export interface Inject {
token: any;
}
// @public
export const Inject: InjectDecorator;
// @public (undocumented)
export function inject<T>(token: ProviderToken<T>): T;
// @public @deprecated (undocumented)
export function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
// @public (undocumented)
export function inject<T>(token: ProviderToken<T>, options: InjectOptions & {
optional?: false;
}): T;
// @public (undocumented)
export function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;
// @public (undocumented)
export function inject(token: HostAttributeToken): string;
// @public (undocumented)
export function inject(token: HostAttributeToken, options: {
optional: true;
}): string | null;
// @public (undocumented)
export function inject(token: HostAttributeToken, options: {
optional: false;
}): string;
// @public
export interface Injectable {
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
}
// @public
export const Injectable: InjectableDecorator;
// @public
export interface InjectableDecorator {
(): TypeDecorator;
// (undocumented)
(options?: {
providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
} & InjectableProvider): TypeDecorator;
// (undocumented)
new (): Injectable;
// (undocumented)
new (options?: {
providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
} & InjectableProvider): Injectable;
}
// @public
export type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
// @public
export interface InjectableType<T> extends Type<T> {
ɵprov: unknown;
}
// @public
export interface InjectDecorator {
(token: any): any;
// (undocumented)
new (token: any): Inject;
}
// @public @deprecated
export enum InjectFlags {
Default = 0,
Host = 1,
Optional = 8,
Self = 2,
SkipSelf = 4
}
// @public
export class InjectionToken<T> {
constructor(_desc: string, options?: {
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
factory: () => T;
});
// (undocumented)
protected _desc: string;
// (undocumented)
toString(): string;
// (undocumented)
readonly ɵprov: unknown;
}
// @public
export interface InjectOptions {
host?: boolean;
optional?: boolean;
self?: boolean;
skipSe | {
"end_byte": 25499,
"start_byte": 17149,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_25499_33475 | lf?: boolean;
}
// @public
export const INJECTOR: InjectionToken<Injector>;
// @public
export abstract class Injector {
// @deprecated (undocumented)
static create(providers: StaticProvider[], parent?: Injector): Injector;
static create(options: {
providers: Array<Provider | StaticProvider>;
parent?: Injector;
name?: string;
}): Injector;
abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
optional?: false;
}): T;
abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
// @deprecated
abstract get<T>(token: ProviderToken<T>, 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;
}
// @public
export interface InjectorType<T> extends Type<T> {
// (undocumented)
ɵfac?: unknown;
// (undocumented)
ɵinj: unknown;
}
// @public
export interface Input {
alias?: string;
required?: boolean;
transform?: (value: any) => any;
}
// @public (undocumented)
export const Input: InputDecorator;
// @public
export const input: InputFunction;
// @public (undocumented)
export interface InputDecorator {
(arg?: string | Input): any;
// (undocumented)
new (arg?: string | Input): any;
}
// @public
export interface InputFunction {
<T>(): InputSignal<T | undefined>;
<T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
<T>(initialValue: undefined, opts: InputOptionsWithoutTransform<T>): InputSignal<T | undefined>;
<T, TransformT>(initialValue: T, opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
<T, TransformT>(initialValue: undefined, opts: InputOptionsWithTransform<T | undefined, TransformT>): InputSignalWithTransform<T | undefined, TransformT>;
required: {
<T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
<T, TransformT>(opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
};
}
// @public
export interface InputOptions<T, TransformT> {
alias?: string;
debugName?: string;
transform?: (v: TransformT) => T;
}
// @public
export type InputOptionsWithoutTransform<T> = Omit<InputOptions<T, T>, 'transform'> & {
transform?: undefined;
};
// @public
export type InputOptionsWithTransform<T, TransformT> = Required<Pick<InputOptions<T, TransformT>, 'transform'>> & InputOptions<T, TransformT>;
// @public
export interface InputSignal<T> extends InputSignalWithTransform<T, T> {
}
// @public
export interface InputSignalWithTransform<T, TransformT> extends Signal<T> {
// (undocumented)
[ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
// (undocumented)
[ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;
// (undocumented)
[SIGNAL]: ɵInputSignalNode<T, TransformT>;
}
// @public
export function isDevMode(): boolean;
// @public
export function isSignal(value: unknown): value is Signal<unknown>;
// @public
export function isStandalone(type: Type<unknown>): boolean;
// @public
export interface IterableChangeRecord<V> {
readonly currentIndex: number | null;
readonly item: V;
readonly previousIndex: number | null;
readonly trackById: any;
}
// @public
export interface IterableChanges<V> {
forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
}
// @public
export interface IterableDiffer<V> {
diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
}
// @public
export interface IterableDifferFactory {
// (undocumented)
create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
// (undocumented)
supports(objects: any): boolean;
}
// @public
export class IterableDiffers {
constructor(factories: IterableDifferFactory[]);
// (undocumented)
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
static extend(factories: IterableDifferFactory[]): StaticProvider;
// (undocumented)
find(iterable: any): IterableDifferFactory;
// (undocumented)
static ɵprov: unknown;
}
// @public
export interface KeyValueChangeRecord<K, V> {
readonly currentValue: V | null;
readonly key: K;
readonly previousValue: V | null;
}
// @public
export interface KeyValueChanges<K, V> {
forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
}
// @public
export interface KeyValueDiffer<K, V> {
diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
diff(object: {
[key: string]: V;
}): KeyValueChanges<string, V> | null;
}
// @public
export interface KeyValueDifferFactory {
create<K, V>(): KeyValueDiffer<K, V>;
supports(objects: any): boolean;
}
// @public
export class KeyValueDiffers {
constructor(factories: KeyValueDifferFactory[]);
// (undocumented)
static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
// (undocumented)
find(kv: any): KeyValueDifferFactory;
// (undocumented)
static ɵprov: unknown;
}
// @public (undocumented)
export function linkedSignal<D>(computation: () => D, options?: {
equal?: ValueEqualityFn<NoInfer<D>>;
}): WritableSignal<D>;
// @public (undocumented)
export function linkedSignal<S, D>(options: {
source: () => S;
computation: (source: NoInfer<S>, previous?: {
source: NoInfer<S>;
value: NoInfer<D>;
}) => D;
equal?: ValueEqualityFn<NoInfer<D>>;
}): WritableSignal<D>;
// @public
export const LOCALE_ID: InjectionToken<string>;
// @public
export function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders;
// @public
export function makeStateKey<T = void>(key: string): StateKey<T>;
// @public
export function mergeApplicationConfig(...configs: ApplicationConfig[]): ApplicationConfig;
// @public
export enum MissingTranslationStrategy {
// (undocumented)
Error = 0,
// (undocumented)
Ignore = 2,
// (undocumented)
Warning = 1
}
// @public
export const model: ModelFunction;
// @public
export interface ModelFunction {
<T>(): ModelSignal<T | undefined>;
<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;
// (undocumented)
required: {
<T>(opts?: ModelOptions): ModelSignal<T>;
};
}
// @public
export interface ModelOptions {
alias?: string;
debugName?: string;
}
// @public
export interface ModelSignal<T> extends WritableSignal<T>, InputSignal<T>, OutputRef<T> {
// (undocumented)
[SIGNAL]: ɵInputSignalNode<T, T>;
}
// @public @deprecated
export class ModuleWithComponentFactories<T> {
constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
| {
"end_byte": 33475,
"start_byte": 25499,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_33476_41756 | // (undocumented)
componentFactories: ComponentFactory<any>[];
// (undocumented)
ngModuleFactory: NgModuleFactory<T>;
}
// @public
export interface ModuleWithProviders<T> {
// (undocumented)
ngModule: Type<T>;
// (undocumented)
providers?: Array<Provider | EnvironmentProviders>;
}
// @public
export type NgIterable<T> = Array<T> | Iterable<T>;
// @public
export interface NgModule {
bootstrap?: Array<Type<any> | any[]>;
declarations?: Array<Type<any> | any[]>;
exports?: Array<Type<any> | any[]>;
id?: string;
imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
jit?: true;
providers?: Array<Provider | EnvironmentProviders>;
schemas?: Array<SchemaMetadata | any[]>;
}
// @public (undocumented)
export const NgModule: NgModuleDecorator;
// @public
export interface NgModuleDecorator {
(obj?: NgModule): TypeDecorator;
// (undocumented)
new (obj?: NgModule): NgModule;
}
// @public @deprecated (undocumented)
export abstract class NgModuleFactory<T> {
// (undocumented)
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
// (undocumented)
abstract get moduleType(): Type<T>;
}
// @public
export abstract class NgModuleRef<T> {
// @deprecated
abstract get componentFactoryResolver(): ComponentFactoryResolver;
abstract destroy(): void;
abstract get injector(): EnvironmentInjector;
abstract get instance(): T;
abstract onDestroy(callback: () => void): void;
}
// @public @deprecated
export class NgProbeToken {
constructor(name: string, token: any);
// (undocumented)
name: string;
// (undocumented)
token: any;
}
// @public
export class NgZone {
constructor(options: {
enableLongStackTrace?: boolean;
shouldCoalesceEventChangeDetection?: boolean;
shouldCoalesceRunChangeDetection?: boolean;
});
static assertInAngularZone(): void;
static assertNotInAngularZone(): void;
// (undocumented)
readonly hasPendingMacrotasks: boolean;
// (undocumented)
readonly hasPendingMicrotasks: boolean;
static isInAngularZone(): boolean;
readonly isStable: boolean;
readonly onError: EventEmitter<any>;
readonly onMicrotaskEmpty: EventEmitter<any>;
readonly onStable: EventEmitter<any>;
readonly onUnstable: EventEmitter<any>;
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
runOutsideAngular<T>(fn: (...args: any[]) => T): T;
runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
}
// @public
export interface NgZoneOptions {
eventCoalescing?: boolean;
// @deprecated
ignoreChangesOutsideZone?: boolean;
runCoalescing?: boolean;
}
// @public
export const NO_ERRORS_SCHEMA: SchemaMetadata;
// @public
export function numberAttribute(value: unknown, fallbackValue?: number): number;
// @public
export interface OnChanges {
ngOnChanges(changes: SimpleChanges): void;
}
// @public
export interface OnDestroy {
ngOnDestroy(): void;
}
// @public
export interface OnInit {
ngOnInit(): void;
}
// @public
export interface Optional {
}
// @public
export const Optional: OptionalDecorator;
// @public
export interface OptionalDecorator {
(): any;
// (undocumented)
new (): Optional;
}
// @public
export interface Output {
alias?: string;
}
// @public (undocumented)
export const Output: OutputDecorator;
// @public
export function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
// @public
export interface OutputDecorator {
(alias?: string): any;
// (undocumented)
new (alias?: string): any;
}
// @public
export class OutputEmitterRef<T> implements OutputRef<T> {
constructor();
emit(value: T): void;
// (undocumented)
subscribe(callback: (value: T) => void): OutputRefSubscription;
}
// @public
export interface OutputOptions {
// (undocumented)
alias?: string;
}
// @public
export interface OutputRef<T> {
subscribe(callback: (value: T) => void): OutputRefSubscription;
}
// @public
export interface OutputRefSubscription {
// (undocumented)
unsubscribe(): void;
}
// @public @deprecated
export const PACKAGE_ROOT_URL: InjectionToken<string>;
// @public
export class PendingTasks {
add(): () => void;
run<T>(fn: () => Promise<T>): Promise<T>;
// (undocumented)
static ɵprov: unknown;
}
// @public
export interface Pipe {
name: string;
pure?: boolean;
standalone?: boolean;
}
// @public (undocumented)
export const Pipe: PipeDecorator;
// @public
export interface PipeDecorator {
(obj: Pipe): TypeDecorator;
new (obj: Pipe): Pipe;
}
// @public
export interface PipeTransform {
// (undocumented)
transform(value: any, ...args: any[]): any;
}
// @public
export const PLATFORM_ID: InjectionToken<Object>;
// @public @deprecated
export const PLATFORM_INITIALIZER: InjectionToken<readonly (() => void)[]>;
// @public
export const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
// @public
export class PlatformRef {
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
// @deprecated
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
destroy(): void;
get destroyed(): boolean;
get injector(): Injector;
onDestroy(callback: () => void): void;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
}
// @public
export type Predicate<T> = (value: T) => boolean;
// @public
export function provideAppInitializer(initializerFn: () => Observable<unknown> | Promise<unknown> | void): EnvironmentProviders;
// @public
export function provideEnvironmentInitializer(initializerFn: () => void): EnvironmentProviders;
// @public
export function provideExperimentalCheckNoChangesForDebug(options: {
interval?: number;
useNgZoneOnStable?: boolean;
exhaustive?: boolean;
}): EnvironmentProviders_2;
// @public
export function provideExperimentalZonelessChangeDetection(): EnvironmentProviders;
// @public
export function providePlatformInitializer(initializerFn: () => void): EnvironmentProviders;
// @public
export type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
// @public
export type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
// @public
export function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders;
// @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;
}
// @public
export abstract class Query {
}
// @public
export class QueryList<T> implements Iterable<T> {
// (undocumented)
[Symbol.iterator]: () => Iterator<T>;
constructor(_emitDistinctChangesOnly?: boolean);
get changes(): Observable<any>;
destroy(): void;
// (undocumented)
readonly dirty = true;
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];
// (undocumented)
filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): 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<U>(fn: (item: T, index: number, array: T[]) => U): U[];
notifyOnChanges(): void;
reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
reset(results | {
"end_byte": 41756,
"start_byte": 33476,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_41763_49653 | rray<T | any[]>, identityAccessor?: (value: T) => unknown): void;
setDirty(): void;
some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
toArray(): T[];
// (undocumented)
toString(): string;
}
// @public
export function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | 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;
abstract parentNode(node: any): any;
abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
abstract removeClass(el: any, name: string): void;
abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
abstract setProperty(el: any, name: string, value: any): void;
abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
abstract setValue(node: any, value: string): void;
}
// @public
export abstract class RendererFactory2 {
abstract begin?(): void;
abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
abstract end?(): void;
abstract whenRenderingDone?(): Promise<any>;
}
// @public
export enum RendererStyleFlags2 {
DashCase = 2,
Important = 1
}
// @public
export interface RendererType2 {
data: {
[kind: string]: any;
};
encapsulation: ViewEncapsulation;
getExternalStyles?: ((encapsulationId?: string) => string[]) | null;
id: string;
styles: string[];
}
// @public
export function resolveForwardRef<T>(type: T): T;
// @public
export interface Resource<T> {
readonly error: Signal<unknown>;
hasValue(): this is Resource<T> & {
value: Signal<T>;
};
readonly isLoading: Signal<boolean>;
reload(): boolean;
readonly status: Signal<ResourceStatus>;
readonly value: Signal<T | undefined>;
}
// @public
export function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T>;
// @public
export type ResourceLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<T>;
// @public
export interface ResourceLoaderParams<R> {
// (undocumented)
abortSignal: AbortSignal;
// (undocumented)
previous: {
status: ResourceStatus;
};
// (undocumented)
request: Exclude<NoInfer<R>, undefined>;
}
// @public
export interface ResourceOptions<T, R> {
equal?: ValueEqualityFn<T>;
injector?: Injector;
loader: ResourceLoader<T, R>;
request?: () => R;
}
// @public
export interface ResourceRef<T> extends WritableResource<T> {
destroy(): void;
}
// @public
export enum ResourceStatus {
Error = 1,
Idle = 0,
Loading = 2,
Local = 5,
Reloading = 3,
Resolved = 4
}
// @public
export function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT;
// @public
export abstract class Sanitizer {
// (undocumented)
abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
// (undocumented)
static ɵprov: unknown;
}
// @public
export interface SchemaMetadata {
// (undocumented)
name: string;
}
// @public
export enum SecurityContext {
// (undocumented)
HTML = 1,
// (undocumented)
NONE = 0,
// (undocumented)
RESOURCE_URL = 5,
// (undocumented)
SCRIPT = 3,
// (undocumented)
STYLE = 2,
// (undocumented)
URL = 4
}
// @public
export interface Self {
}
// @public
export const Self: SelfDecorator;
// @public
export interface SelfDecorator {
(): any;
// (undocumented)
new (): Self;
}
// @public
export function setTestabilityGetter(getter: GetTestability): void;
// @public
export type Signal<T> = (() => T) & {
[SIGNAL]: unknown;
};
// @public
export function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T>;
// @public
export class SimpleChange {
constructor(previousValue: any, currentValue: any, firstChange: boolean);
// (undocumented)
currentValue: any;
// (undocumented)
firstChange: boolean;
isFirstChange(): boolean;
// (undocumented)
previousValue: any;
}
// @public
export interface SimpleChanges {
// (undocumented)
[propName: string]: SimpleChange;
}
// @public
export interface SkipSelf {
}
// @public
export const SkipSelf: SkipSelfDecorator;
// @public
export interface SkipSelfDecorator {
(): any;
// (undocumented)
new (): SkipSelf;
}
// @public
export type StateKey<T> = string & {
__not_a_string: never;
__value_type?: T;
};
// @public
export interface StaticClassProvider extends StaticClassSansProvider {
multi?: boolean;
provide: any;
}
// @public
export interface StaticClassSansProvider {
deps: any[];
useClass: Type<any>;
}
// @public
export type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
// @public
export abstract class TemplateRef<C> {
abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;
abstract readonly elementRef: ElementRef;
}
// @public
export class Testability implements PublicTestability {
constructor(_ngZone: NgZone, registry: TestabilityRegistry, testabilityGetter: GetTestability);
findProviders(using: any, provider: string, exactMatch: boolean): any[];
isStable(): boolean;
whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
}
// @public
export class TestabilityRegistry {
findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
getAllRootElements(): any[];
getAllTestabilities(): Testability[];
getTestability(elem: any): Testability | null;
registerApplication(token: any, testability: Testability): void;
unregisterAllApplications(): void;
unregisterApplication(token: any): void;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
}
// @public
export interface TrackByFunction<T> {
// (undocumented)
<U extends T>(index: number, item: T & U): any;
}
// @public
export class TransferState {
get<T>(key: StateKey<T>, defaultValue: T): T;
hasKey<T>(key: StateKey<T>): boolean;
get isEmpty(): boolean;
onSerialize<T>(key: StateKey<T>, callback: () => T): void;
remove<T>(key: StateKey<T>): void;
set<T>(key: StateKey<T>, value: T): void;
toJson(): string;
// (undocumented)
static ɵprov: unknown;
}
// @public
export const TRANSLATIONS: InjectionToken<string>;
// @public
export const TRANSLATIONS_FORMAT: InjectionToken<string>;
// @public
export const Type: FunctionConstructor;
// @public (undocumented)
export interface Type<T> extends Function {
// (undoc | {
"end_byte": 49653,
"start_byte": 41763,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/index.api.md_49665_55213 | new (...args: any[]): T;
}
// @public
export interface TypeDecorator {
<T extends Type<any>>(type: T): T;
// (undocumented)
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
// (undocumented)
(target: unknown, context: unknown): void;
}
// @public
export interface TypeProvider extends Type<any> {
}
// @public
export function untracked<T>(nonReactiveReadsFn: () => T): T;
// @public
export type ValueEqualityFn<T> = (a: T, b: T) => boolean;
// @public
export interface ValueProvider extends ValueSansProvider {
multi?: boolean;
provide: any;
}
// @public
export interface ValueSansProvider {
useValue: any;
}
// @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;
}
// @public
export type ViewChild = Query;
// @public
export const ViewChild: ViewChildDecorator;
// @public
export const viewChild: ViewChildFunction;
// @public
export interface ViewChildDecorator {
(selector: ProviderToken<unknown> | Function | string, opts?: {
read?: any;
static?: boolean;
}): any;
// (undocumented)
new (selector: ProviderToken<unknown> | Function | string, opts?: {
read?: any;
static?: boolean;
}): ViewChild;
}
// @public
export interface ViewChildFunction {
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadT | undefined>;
// (undocumented)
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
debugName?: string;
}): Signal<LocatorT | undefined>;
required: {
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
debugName?: string;
}): Signal<LocatorT>;
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadT>;
};
}
// @public
export type ViewChildren = Query;
// @public
export const ViewChildren: ViewChildrenDecorator;
// @public (undocumented)
export function viewChildren<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
debugName?: string;
}): Signal<ReadonlyArray<LocatorT>>;
// @public (undocumented)
export function viewChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
read: ProviderToken<ReadT>;
debugName?: string;
}): Signal<ReadonlyArray<ReadT>>;
// @public
export interface ViewChildrenDecorator {
(selector: ProviderToken<unknown> | Function | string, opts?: {
read?: any;
emitDistinctChangesOnly?: boolean;
}): any;
// (undocumented)
new (selector: ProviderToken<unknown> | Function | string, opts?: {
read?: any;
emitDistinctChangesOnly?: boolean;
}): ViewChildren;
}
// @public
export abstract class ViewContainerRef {
abstract clear(): void;
abstract createComponent<C>(componentType: Type<C>, options?: {
index?: number;
injector?: Injector;
ngModuleRef?: NgModuleRef<unknown>;
environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;
projectableNodes?: Node[][];
}): ComponentRef<C>;
// @deprecated
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, options?: {
index?: number;
injector?: Injector;
}): EmbeddedViewRef<C>;
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
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;
}
// @public
export enum ViewEncapsulation {
Emulated = 0,
None = 2,
ShadowDom = 3
}
// @public
export abstract class ViewRef extends ChangeDetectorRef {
abstract destroy(): void;
abstract get destroyed(): boolean;
abstract onDestroy(callback: Function): void;
}
// @public
export interface WritableResource<T> extends Resource<T> {
// (undocumented)
asReadonly(): Resource<T>;
// (undocumented)
hasValue(): this is WritableResource<T> & {
value: WritableSignal<T>;
};
set(value: T | undefined): void;
update(updater: (value: T | undefined) => T | undefined): void;
// (undocumented)
readonly value: WritableSignal<T | undefined>;
}
// @public
export interface WritableSignal<T> extends Signal<T> {
// (undocumented)
[ɵWRITABLE_SIGNAL]: T;
asReadonly(): Signal<T>;
set(value: T): void;
update(updateFn: (value: T) => T): void;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 55213,
"start_byte": 49665,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/index.api.md"
} |
angular/goldens/public-api/core/errors.api.md_0_5002 | ## 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 formatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
// @public
export class RuntimeError<T extends number = RuntimeErrorCode> extends Error {
constructor(code: T, message: null | false | string);
// (undocumented)
code: T;
}
// @public
export const enum RuntimeErrorCode {
// (undocumented)
APPLICATION_REF_ALREADY_DESTROYED = 406,
// (undocumented)
ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT = -602,
// (undocumented)
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
// (undocumented)
BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,
// (undocumented)
COMPONENT_ID_COLLISION = -912,
// (undocumented)
CYCLIC_DI_DEPENDENCY = -200,
// (undocumented)
DEFER_LOADING_FAILED = 750,
// (undocumented)
DUPLICATE_DIRECTIVE = 309,
// (undocumented)
EXPORT_NOT_FOUND = -301,
// (undocumented)
EXPRESSION_CHANGED_AFTER_CHECKED = -100,
// (undocumented)
HOST_DIRECTIVE_COMPONENT = 310,
// (undocumented)
HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
// (undocumented)
HOST_DIRECTIVE_NOT_STANDALONE = 308,
// (undocumented)
HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
// (undocumented)
HOST_DIRECTIVE_UNRESOLVABLE = 307,
// (undocumented)
HYDRATION_MISSING_NODE = -502,
// (undocumented)
HYDRATION_MISSING_SIBLINGS = -501,
// (undocumented)
HYDRATION_NODE_MISMATCH = -500,
// (undocumented)
HYDRATION_STABLE_TIMEDOUT = -506,
// (undocumented)
IMAGE_PERFORMANCE_WARNING = -913,
// (undocumented)
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
// (undocumented)
INFINITE_CHANGE_DETECTION = 103,
// (undocumented)
INJECTOR_ALREADY_DESTROYED = 205,
// (undocumented)
INVALID_DIFFER_INPUT = 900,
// (undocumented)
INVALID_EVENT_BINDING = 306,
// (undocumented)
INVALID_FACTORY_DEPENDENCY = 202,
// (undocumented)
INVALID_I18N_STRUCTURE = 700,
// (undocumented)
INVALID_INHERITANCE = 903,
// (undocumented)
INVALID_INJECTION_TOKEN = 204,
// (undocumented)
INVALID_MULTI_PROVIDER = -209,
// (undocumented)
INVALID_SKIP_HYDRATION_HOST = -504,
// (undocumented)
LOOP_TRACK_DUPLICATE_KEYS = -955,
// (undocumented)
LOOP_TRACK_RECREATE = -956,
// (undocumented)
MISSING_DOCUMENT = 210,
// (undocumented)
MISSING_GENERATED_DEF = 906,
// (undocumented)
MISSING_HYDRATION_ANNOTATIONS = -505,
// (undocumented)
MISSING_INJECTION_CONTEXT = -203,
// (undocumented)
MISSING_INJECTION_TOKEN = 208,
// (undocumented)
MISSING_LOCALE_DATA = 701,
// (undocumented)
MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,
// (undocumented)
MISSING_SSR_CONTENT_INTEGRITY_MARKER = -507,
// (undocumented)
MISSING_ZONEJS = 908,
// (undocumented)
MULTIPLE_COMPONENTS_MATCH = -300,
// (undocumented)
MULTIPLE_MATCHING_PIPES = 313,
// (undocumented)
MULTIPLE_PLATFORMS = 400,
// (undocumented)
NO_SUPPORTING_DIFFER_FACTORY = 901,
// (undocumented)
OUTPUT_REF_DESTROYED = 953,
// (undocumented)
PIPE_NOT_FOUND = -302,
// (undocumented)
PLATFORM_ALREADY_DESTROYED = 404,
// (undocumented)
PLATFORM_NOT_FOUND = 401,
// (undocumented)
PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,
// (undocumented)
PROVIDER_IN_WRONG_CONTEXT = 207,
// (undocumented)
PROVIDER_NOT_FOUND = -201,
// (undocumented)
RECURSIVE_APPLICATION_REF_TICK = 101,
// (undocumented)
RENDERER_NOT_FOUND = 407,
// (undocumented)
REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,
// (undocumented)
REQUIRED_INPUT_NO_VALUE = -950,
// (undocumented)
REQUIRED_MODEL_NO_VALUE = 952,
// (undocumented)
REQUIRED_QUERY_NO_VALUE = -951,
// (undocumented)
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,
// (undocumented)
RUNTIME_DEPS_ORPHAN_COMPONENT = 981,
// (undocumented)
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
// (undocumented)
TEMPLATE_STRUCTURE_ERROR = 305,
// (undocumented)
TYPE_IS_NOT_STANDALONE = 907,
// (undocumented)
UNEXPECTED_ZONE_STATE = 909,
// (undocumented)
UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,
// (undocumented)
UNINITIALIZED_LET_ACCESS = 314,
// (undocumented)
UNKNOWN_BINDING = 303,
// (undocumented)
UNKNOWN_ELEMENT = 304,
// (undocumented)
UNSAFE_IFRAME_ATTRS = -910,
// (undocumented)
UNSAFE_VALUE_IN_RESOURCE_URL = 904,
// (undocumented)
UNSAFE_VALUE_IN_SCRIPT = 905,
// (undocumented)
UNSUPPORTED_PROJECTION_DOM_NODES = -503,
// (undocumented)
VIEW_ALREADY_ATTACHED = 902,
// (undocumented)
VIEW_ALREADY_DESTROYED = 911
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 5002,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/errors.api.md"
} |
angular/goldens/public-api/core/primitives/signals/index.api.md_0_4499 | ## API Report File for "@angular/core_primitives_signals"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public
export interface ComputedNode<T> extends ReactiveNode {
computation: () => T;
// (undocumented)
equal: ValueEqualityFn<T>;
error: unknown;
value: T;
}
// @public
export function consumerAfterComputation(node: ReactiveNode | null, prevConsumer: ReactiveNode | null): void;
// @public
export function consumerBeforeComputation(node: ReactiveNode | null): ReactiveNode | null;
// @public
export function consumerDestroy(node: ReactiveNode): void;
// @public (undocumented)
export function consumerMarkDirty(node: ReactiveNode): void;
// @public
export function consumerPollProducersForChange(node: ReactiveNode): boolean;
// @public
export function createComputed<T>(computation: () => T): ComputedGetter<T>;
// @public
export function createSignal<T>(initialValue: T): SignalGetter<T>;
// @public (undocumented)
export function createWatch(fn: (onCleanup: WatchCleanupRegisterFn) => void, schedule: (watch: Watch) => void, allowSignalWrites: boolean): Watch;
// @public
export function defaultEquals<T>(a: T, b: T): boolean;
// @public (undocumented)
export function getActiveConsumer(): ReactiveNode | null;
// @public (undocumented)
export function isInNotificationPhase(): boolean;
// @public (undocumented)
export function isReactive(value: unknown): value is Reactive;
// @public
export function producerAccessed(node: ReactiveNode): void;
// @public
export function producerIncrementEpoch(): void;
// @public (undocumented)
export function producerMarkClean(node: ReactiveNode): void;
// @public
export function producerNotifyConsumers(node: ReactiveNode): void;
// @public
export function producerUpdatesAllowed(): boolean;
// @public
export function producerUpdateValueVersion(node: ReactiveNode): void;
// @public (undocumented)
export interface Reactive {
// (undocumented)
[SIGNAL]: ReactiveNode;
}
// @public (undocumented)
export const REACTIVE_NODE: ReactiveNode;
// @public
export interface ReactiveNode {
consumerAllowSignalWrites: boolean;
// (undocumented)
readonly consumerIsAlwaysLive: boolean;
// (undocumented)
consumerMarkedDirty(node: unknown): void;
consumerOnSignalRead(node: unknown): void;
debugName?: string;
dirty: boolean;
lastCleanEpoch: Version;
liveConsumerIndexOfThis: number[] | undefined;
liveConsumerNode: ReactiveNode[] | undefined;
nextProducerIndex: number;
producerIndexOfThis: number[] | undefined;
producerLastReadVersion: Version[] | undefined;
producerMustRecompute(node: unknown): boolean;
producerNode: ReactiveNode[] | undefined;
// (undocumented)
producerRecomputeValue(node: unknown): void;
version: Version;
}
// @public (undocumented)
export function runPostSignalSetFn(): void;
// @public (undocumented)
export function setActiveConsumer(consumer: ReactiveNode | null): ReactiveNode | null;
// @public (undocumented)
export function setAlternateWeakRefImpl(impl: unknown): void;
// @public (undocumented)
export function setPostSignalSetFn(fn: (() => void) | null): (() => void) | null;
// @public (undocumented)
export function setThrowInvalidWriteToSignalError(fn: () => never): void;
// @public
export const SIGNAL: unique symbol;
// @public (undocumented)
export const SIGNAL_NODE: SignalNode<unknown>;
// @public (undocumented)
export interface SignalGetter<T> extends SignalBaseGetter<T> {
// (undocumented)
readonly [SIGNAL]: SignalNode<T>;
}
// @public (undocumented)
export interface SignalNode<T> extends ReactiveNode {
// (undocumented)
equal: ValueEqualityFn<T>;
// (undocumented)
value: T;
}
// @public (undocumented)
export function signalSetFn<T>(node: SignalNode<T>, newValue: T): void;
// @public (undocumented)
export function signalUpdateFn<T>(node: SignalNode<T>, updater: (value: T) => T): void;
// @public
export type ValueEqualityFn<T> = (a: T, b: T) => boolean;
// @public (undocumented)
export interface Watch {
// (undocumented)
[SIGNAL]: WatchNode;
// (undocumented)
cleanup(): void;
destroy(): void;
// (undocumented)
notify(): void;
run(): void;
}
// @public
export type WatchCleanupFn = () => void;
// @public
export type WatchCleanupRegisterFn = (cleanupFn: WatchCleanupFn) => void;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 4499,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/primitives/signals/index.api.md"
} |
angular/goldens/public-api/core/primitives/event-dispatch/index.api.md_0_4171 | ## API Report File for "@angular/core_primitives_event-dispatch"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public (undocumented)
export const Attribute: {
JSACTION: "jsaction";
};
// @public
export function bootstrapAppScopedEarlyEventContract(container: HTMLElement, appId: string, bubbleEventTypes: string[], captureEventTypes: string[], dataContainer?: EarlyJsactionDataContainer): void;
// @public
export function clearAppScopedEarlyEventContract(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
// @public (undocumented)
export interface EarlyJsactionDataContainer {
// (undocumented)
_ejsa?: EarlyJsactionData;
// (undocumented)
_ejsas?: {
[appId: string]: EarlyJsactionData | undefined;
};
}
// @public
export class EventContract implements UnrenamedEventContract {
constructor(containerManager: EventContractContainerManager);
addEvent(eventType: string, prefixedEventType?: string, passive?: boolean): void;
cleanUp(): void;
ecrd(dispatcher: Dispatcher, restriction: Restriction): void;
handler(eventType: string): EventHandler | undefined;
// (undocumented)
static MOUSE_SPECIAL_SUPPORT: boolean;
registerDispatcher(dispatcher: Dispatcher, restriction: Restriction): void;
replayEarlyEventInfos(earlyEventInfos: eventInfoLib.EventInfo[]): void;
replayEarlyEvents(earlyJsactionData?: EarlyJsactionData | undefined): void;
}
// @public
export class EventContractContainer implements EventContractContainerManager {
constructor(element: Element);
addEventListener(eventType: string, getHandler: (element: Element) => (event: Event) => void, passive?: boolean): void;
cleanUp(): void;
// (undocumented)
readonly element: Element;
}
// @public
export class EventDispatcher {
constructor(dispatchDelegate: (event: Event, actionName: string) => void, clickModSupport?: boolean);
dispatch(eventInfo: EventInfo): void;
}
// @public
export class EventInfoWrapper {
constructor(eventInfo: EventInfo);
// (undocumented)
clone(): EventInfoWrapper;
// (undocumented)
readonly eventInfo: EventInfo;
// (undocumented)
getAction(): {
name: string;
element: Element;
} | undefined;
// (undocumented)
getContainer(): Element;
// (undocumented)
getEvent(): Event;
// (undocumented)
getEventType(): string;
// (undocumented)
getIsReplay(): boolean | undefined;
// (undocumented)
getResolved(): boolean | undefined;
// (undocumented)
getTargetElement(): Element;
// (undocumented)
getTimestamp(): number;
// (undocumented)
setAction(action: ActionInfo | undefined): void;
// (undocumented)
setContainer(container: Element): void;
// (undocumented)
setEvent(event: Event): void;
// (undocumented)
setEventType(eventType: string): void;
// (undocumented)
setIsReplay(replay: boolean): void;
// (undocumented)
setResolved(resolved: boolean): void;
// (undocumented)
setTargetElement(targetElement: Element): void;
// (undocumented)
setTimestamp(timestamp: number): void;
}
// @public
export const EventPhase: {
REPLAY: number;
};
// @public
export function getActionCache(element: Element): {
[key: string]: string | undefined;
};
// @public
export function getAppScopedQueuedEventInfos(appId: string, dataContainer?: EarlyJsactionDataContainer): EventInfo[];
// @public
export const isCaptureEventType: (eventType: string) => boolean;
// @public
export const isEarlyEventType: (eventType: string) => boolean;
// @public
export function registerAppScopedDispatcher(restriction: Restriction, appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void;
// @public
export function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: EventDispatcher): void;
// @public
export function removeAllAppScopedEventListeners(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 4171,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/primitives/event-dispatch/index.api.md"
} |
angular/goldens/public-api/core/testing/index.api.md_0_7512 | ## API Report File for "@angular/core_testing"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { ChangeDetectorRef } from '@angular/core';
import { Component } from '@angular/core';
import { ComponentRef } from '@angular/core';
import { DebugElement } from '@angular/core';
import { ɵDeferBlockBehavior as DeferBlockBehavior } from '@angular/core';
import { ɵDeferBlockState as DeferBlockState } from '@angular/core';
import { Directive } from '@angular/core';
import { ElementRef } from '@angular/core';
import { InjectFlags } from '@angular/core';
import { InjectionToken } from '@angular/core';
import { InjectOptions } 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';
import { ɵDeferBlockDetails } from '@angular/core';
// @public
export const __core_private_testing_placeholder__ = "";
// @public
export class ComponentFixture<T> {
constructor(componentRef: ComponentRef<T>);
autoDetectChanges(autoDetect?: boolean): void;
changeDetectorRef: ChangeDetectorRef;
checkNoChanges(): void;
componentInstance: T;
// (undocumented)
componentRef: ComponentRef<T>;
debugElement: DebugElement;
destroy(): void;
detectChanges(checkNoChanges?: boolean): void;
elementRef: ElementRef;
getDeferBlocks(): Promise<DeferBlockFixture[]>;
isStable(): boolean;
nativeElement: any;
// (undocumented)
ngZone: NgZone | null;
whenRenderingDone(): Promise<any>;
whenStable(): Promise<any>;
}
// @public (undocumented)
export const ComponentFixtureAutoDetect: InjectionToken<boolean>;
// @public (undocumented)
export const ComponentFixtureNoNgZone: InjectionToken<boolean>;
export { DeferBlockBehavior }
// @public
export class DeferBlockFixture {
constructor(block: ɵDeferBlockDetails, componentFixture: ComponentFixture<unknown>);
getDeferBlocks(): Promise<DeferBlockFixture[]>;
render(state: DeferBlockState): Promise<void>;
}
export { DeferBlockState }
// @public
export function discardPeriodicTasks(): void;
// @public
export function fakeAsync(fn: Function, options?: {
flush?: boolean;
}): (...args: any[]) => any;
// @public
export function flush(maxTurns?: number): number;
// @public
export function flushMicrotasks(): void;
// @public
export function getTestBed(): TestBed;
// @public
export function inject(tokens: any[], fn: Function): () => any;
// @public (undocumented)
export class InjectSetupWrapper {
constructor(_moduleDef: () => TestModuleMetadata);
// (undocumented)
inject(tokens: any[], fn: Function): () => any;
}
// @public
export type MetadataOverride<T> = {
add?: Partial<T>;
remove?: Partial<T>;
set?: Partial<T>;
};
// @public
export interface ModuleTeardownOptions {
destroyAfterEach: boolean;
rethrowErrors?: boolean;
}
// @public
export function resetFakeAsyncZone(): void;
// @public (undocumented)
export interface TestBed {
// (undocumented)
compileComponents(): Promise<any>;
// (undocumented)
configureCompiler(config: {
providers?: any[];
useJit?: boolean;
}): void;
// (undocumented)
configureTestingModule(moduleDef: TestModuleMetadata): TestBed;
// (undocumented)
createComponent<T>(component: Type<T>): ComponentFixture<T>;
// (undocumented)
execute(tokens: any[], fn: Function, context?: any): any;
flushEffects(): void;
// @deprecated (undocumented)
get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
// @deprecated (undocumented)
get(token: any, notFoundValue?: any): any;
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, options?: TestEnvironmentOptions): void;
// (undocumented)
inject<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
optional?: false;
}): T;
// (undocumented)
inject<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
// (undocumented)
inject<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;
// @deprecated (undocumented)
inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
// @deprecated (undocumented)
inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T | null;
// (undocumented)
get ngModule(): Type<any> | Type<any>[];
// (undocumented)
overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBed;
// (undocumented)
overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBed;
// (undocumented)
overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBed;
// (undocumented)
overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBed;
overrideProvider(token: any, provider: {
useFactory: Function;
deps: any[];
multi?: boolean;
}): TestBed;
// (undocumented)
overrideProvider(token: any, provider: {
useValue: any;
multi?: boolean;
}): TestBed;
// (undocumented)
overrideProvider(token: any, provider: {
useFactory?: Function;
useValue?: any;
deps?: any[];
multi?: boolean;
}): TestBed;
// (undocumented)
overrideTemplate(component: Type<any>, template: string): TestBed;
// (undocumented)
overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBed;
// (undocumented)
get platform(): PlatformRef;
resetTestEnvironment(): void;
// (undocumented)
resetTestingModule(): TestBed;
runInInjectionContext<T>(fn: () => T): T;
}
// @public
export const TestBed: TestBedStatic;
// @public
export interface TestBedStatic extends TestBed {
// (undocumented)
new (...args: any[]): TestBed;
}
// @public
export class TestComponentRenderer {
// (undocumented)
insertRootElement(rootElementId: string): void;
// (undocumented)
removeAllRootElements?(): void;
}
// @public (undocumented)
export interface TestEnvironmentOptions {
errorOnUnknownElements?: boolean;
errorOnUnknownProperties?: boolean;
teardown?: ModuleTeardownOptions;
}
// @public (undocumented)
export interface TestModuleMetadata {
// (undocumented)
declarations?: any[];
deferBlockBehavior?: DeferBlockBehavior;
errorOnUnknownElements?: boolean;
errorOnUnknownProperties?: boolean;
// (undocumented)
imports?: any[];
// (undocumented)
providers?: any[];
rethrowApplicationErrors?: boolean;
// (undocumented)
schemas?: Array<SchemaMetadata | any[]>;
// (undocumented)
teardown?: ModuleTeardownOptions;
}
// @public
export function tick(millis?: number, tickOptions?: {
processNewMacroTasksSynchronously: boolean;
}): void;
// @public
export function waitForAsync(fn: Function): (done: any) => 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)
```
| {
"end_byte": 7512,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/testing/index.api.md"
} |
angular/goldens/public-api/core/rxjs-interop/index.api.md_0_2867 | ## API Report File for "@angular/core_rxjs-interop"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { DestroyRef } from '@angular/core';
import { Injector } from '@angular/core';
import { MonoTypeOperatorFunction } from 'rxjs';
import { Observable } from 'rxjs';
import { OutputOptions } from '@angular/core';
import { OutputRef } from '@angular/core';
import { ResourceLoaderParams } from '@angular/core';
import { ResourceOptions } from '@angular/core';
import { ResourceRef } from '@angular/core';
import { Signal } from '@angular/core';
import { Subscribable } from 'rxjs';
import { ValueEqualityFn } from '@angular/core/primitives/signals';
// @public
export function outputFromObservable<T>(observable: Observable<T>, opts?: OutputOptions): OutputRef<T>;
// @public
export function outputToObservable<T>(ref: OutputRef<T>): Observable<T>;
// @public
export function pendingUntilEvent<T>(injector?: Injector): MonoTypeOperatorFunction<T>;
// @public
export function rxResource<T, R>(opts: RxResourceOptions<T, R>): ResourceRef<T>;
// @public
export interface RxResourceOptions<T, R> extends Omit<ResourceOptions<T, R>, 'loader'> {
// (undocumented)
loader: (params: ResourceLoaderParams<R>) => Observable<T>;
}
// @public
export function takeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T>;
// @public
export function toObservable<T>(source: Signal<T>, options?: ToObservableOptions): Observable<T>;
// @public
export interface ToObservableOptions {
injector?: Injector;
}
// @public (undocumented)
export function toSignal<T>(source: Observable<T> | Subscribable<T>): Signal<T | undefined>;
// @public (undocumented)
export function toSignal<T>(source: Observable<T> | Subscribable<T>, options: NoInfer<ToSignalOptions<T | undefined>> & {
initialValue?: undefined;
requireSync?: false;
}): Signal<T | undefined>;
// @public (undocumented)
export function toSignal<T>(source: Observable<T> | Subscribable<T>, options: NoInfer<ToSignalOptions<T | null>> & {
initialValue?: null;
requireSync?: false;
}): Signal<T | null>;
// @public (undocumented)
export function toSignal<T>(source: Observable<T> | Subscribable<T>, options: NoInfer<ToSignalOptions<T>> & {
initialValue?: undefined;
requireSync: true;
}): Signal<T>;
// @public (undocumented)
export function toSignal<T, const U extends T>(source: Observable<T> | Subscribable<T>, options: NoInfer<ToSignalOptions<T | U>> & {
initialValue: U;
requireSync?: false;
}): Signal<T | U>;
// @public
export interface ToSignalOptions<T> {
equal?: ValueEqualityFn<T>;
initialValue?: unknown;
injector?: Injector;
manualCleanup?: boolean;
rejectErrors?: boolean;
requireSync?: boolean;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2867,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/core/rxjs-interop/index.api.md"
} |
angular/goldens/public-api/platform-server/index.api.md_0_2310 | ## 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 { ApplicationRef } from '@angular/core';
import { EnvironmentProviders } from '@angular/core';
import * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser/animations';
import * as i2 from '@angular/platform-browser';
import { InjectionToken } from '@angular/core';
import { PlatformRef } from '@angular/core';
import { Provider } 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<readonly (() => void | Promise<void>)[]>;
// @public
export const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
// @public
export interface PlatformConfig {
document?: string;
url?: string;
}
// @public (undocumented)
export const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
// @public
export class PlatformState {
constructor(_doc: any);
getDocument(): any;
renderToString(): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformState, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformState>;
}
// @public
export function provideServerRendering(): EnvironmentProviders;
// @public
export function renderApplication<T>(bootstrap: () => Promise<ApplicationRef>, options: {
document?: string | Document;
url?: string;
platformProviders?: Provider[];
}): Promise<string>;
// @public
export function renderModule<T>(moduleType: Type<T>, options: {
document?: string | Document;
url?: string;
extraProviders?: StaticProvider[];
}): Promise<string>;
// @public
export class ServerModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ServerModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ServerModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ServerModule, never, [typeof i1.NoopAnimationsModule], [typeof i2.BrowserModule]>;
}
// @public (undocumented)
export const VERSION: Version;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2310,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-server/index.api.md"
} |
angular/goldens/public-api/platform-server/init/index.api.md_0_222 | ## 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)
```
| {
"end_byte": 222,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-server/init/index.api.md"
} |
angular/goldens/public-api/platform-server/testing/index.api.md_0_985 | ## 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 * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser/animations';
import * as i2 from '@angular/platform-browser-dynamic/testing';
import { PlatformRef } from '@angular/core';
import { StaticProvider } from '@angular/core';
// @public
export const platformServerTesting: (extraProviders?: StaticProvider[]) => PlatformRef;
// @public
export class ServerTestingModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ServerTestingModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ServerTestingModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ServerTestingModule, never, [typeof i1.NoopAnimationsModule], [typeof i2.BrowserDynamicTestingModule]>;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 985,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-server/testing/index.api.md"
} |
angular/goldens/public-api/localize/index.api.md_0_921 | ## 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<MessageId, TargetMessage>): void;
// @public
export type MessageId = string;
// @public
export type TargetMessage = string;
// @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)
```
| {
"end_byte": 921,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/localize/index.api.md"
} |
angular/goldens/public-api/localize/init/index.api.md_0_477 | ## 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
import { ɵ$localize as $localize } from '@angular/localize';
import { ɵLocalizeFn as LocalizeFn } from '@angular/localize';
import { ɵTranslateFn as TranslateFn } from '@angular/localize';
export { $localize }
export { LocalizeFn }
export { TranslateFn }
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 477,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/localize/init/index.api.md"
} |
angular/goldens/public-api/localize/tools/index.api.md_0_7093 | ## API Report File for "@angular/localize_tools"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { AbsoluteFsPath } from '@angular/compiler-cli/private/localize';
import { Element as Element_2 } from '@angular/compiler';
import { Logger } from '@angular/compiler-cli/private/localize';
import { MessageId } from '@angular/localize';
import { NodePath } from '@babel/core';
import { ParseError } from '@angular/compiler';
import { PathManipulation } from '@angular/compiler-cli/private/localize';
import { PluginObj } from '@babel/core';
import { ReadonlyFileSystem } from '@angular/compiler-cli/private/localize';
import { types } from '@babel/core';
import { ɵParsedMessage } from '@angular/localize';
import { ɵParsedTranslation } from '@angular/localize';
import { ɵSourceLocation } from '@angular/localize';
import { ɵSourceMessage } from '@angular/localize';
// @public
export class ArbTranslationParser implements TranslationParser<ArbJsonObject> {
// (undocumented)
analyze(_filePath: string, contents: string): ParseAnalysis<ArbJsonObject>;
// (undocumented)
parse(_filePath: string, contents: string, arb?: ArbJsonObject): ParsedTranslationBundle;
}
// @public
export class ArbTranslationSerializer implements TranslationSerializer {
constructor(sourceLocale: string, basePath: AbsoluteFsPath, fs: PathManipulation);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export function buildLocalizeReplacement(messageParts: TemplateStringsArray, substitutions: readonly types.Expression[]): types.Expression;
// @public
export function checkDuplicateMessages(fs: PathManipulation, messages: ɵParsedMessage[], duplicateMessageHandling: DiagnosticHandlingStrategy, basePath: AbsoluteFsPath): Diagnostics;
// @public
export type DiagnosticHandlingStrategy = 'error' | 'warning' | 'ignore';
// @public
export class Diagnostics {
// (undocumented)
add(type: DiagnosticHandlingStrategy, message: string): void;
// (undocumented)
error(message: string): void;
// (undocumented)
formatDiagnostics(message: string): string;
// (undocumented)
get hasErrors(): boolean;
// (undocumented)
merge(other: Diagnostics): void;
// (undocumented)
readonly messages: {
type: 'warning' | 'error';
message: string;
}[];
// (undocumented)
warn(message: string): void;
}
// @public
export function isGlobalIdentifier(identifier: NodePath<types.Identifier>): boolean;
// @public
export class LegacyMessageIdMigrationSerializer implements TranslationSerializer {
constructor(_diagnostics: Diagnostics);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export function makeEs2015TranslatePlugin(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, { missingTranslation, localizeName }?: TranslatePluginOptions, fs?: PathManipulation): PluginObj;
// @public
export function makeEs5TranslatePlugin(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, { missingTranslation, localizeName }?: TranslatePluginOptions, fs?: PathManipulation): PluginObj;
// @public
export function makeLocalePlugin(locale: string, { localizeName }?: TranslatePluginOptions): PluginObj;
// @public
export class MessageExtractor {
constructor(fs: ReadonlyFileSystem, logger: Logger, { basePath, useSourceMaps, localizeName }: ExtractionOptions);
// (undocumented)
extractMessages(filename: string): ɵParsedMessage[];
}
// @public
export class SimpleJsonTranslationParser implements TranslationParser<SimpleJsonFile> {
// (undocumented)
analyze(filePath: string, contents: string): ParseAnalysis<SimpleJsonFile>;
// (undocumented)
parse(_filePath: string, contents: string, json?: SimpleJsonFile): ParsedTranslationBundle;
}
// @public
export class SimpleJsonTranslationSerializer implements TranslationSerializer {
constructor(sourceLocale: string);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export function translate(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, messageParts: TemplateStringsArray, substitutions: readonly any[], missingTranslation: DiagnosticHandlingStrategy): [TemplateStringsArray, readonly any[]];
// @public
export function unwrapExpressionsFromTemplateLiteral(quasi: NodePath<types.TemplateLiteral>, fs?: PathManipulation): [types.Expression[], (ɵSourceLocation | undefined)[]];
// @public
export function unwrapMessagePartsFromLocalizeCall(call: NodePath<types.CallExpression>, fs?: PathManipulation): [TemplateStringsArray, (ɵSourceLocation | undefined)[]];
// @public
export function unwrapMessagePartsFromTemplateLiteral(elements: NodePath<types.TemplateElement>[], fs?: PathManipulation): [TemplateStringsArray, (ɵSourceLocation | undefined)[]];
// @public
export function unwrapSubstitutionsFromLocalizeCall(call: NodePath<types.CallExpression>, fs?: PathManipulation): [types.Expression[], (ɵSourceLocation | undefined)[]];
// @public
export class Xliff1TranslationParser implements TranslationParser<XmlTranslationParserHint> {
// (undocumented)
analyze(filePath: string, contents: string): ParseAnalysis<XmlTranslationParserHint>;
// (undocumented)
parse(filePath: string, contents: string, hint: XmlTranslationParserHint): ParsedTranslationBundle;
}
// @public
export class Xliff1TranslationSerializer implements TranslationSerializer {
constructor(sourceLocale: string, basePath: AbsoluteFsPath, useLegacyIds: boolean, formatOptions?: FormatOptions, fs?: PathManipulation);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export class Xliff2TranslationParser implements TranslationParser<XmlTranslationParserHint> {
// (undocumented)
analyze(filePath: string, contents: string): ParseAnalysis<XmlTranslationParserHint>;
// (undocumented)
parse(filePath: string, contents: string, hint: XmlTranslationParserHint): ParsedTranslationBundle;
}
// @public
export class Xliff2TranslationSerializer implements TranslationSerializer {
constructor(sourceLocale: string, basePath: AbsoluteFsPath, useLegacyIds: boolean, formatOptions?: FormatOptions, fs?: PathManipulation);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export class XmbTranslationSerializer implements TranslationSerializer {
constructor(basePath: AbsoluteFsPath, useLegacyIds: boolean, fs?: PathManipulation);
// (undocumented)
serialize(messages: ɵParsedMessage[]): string;
}
// @public
export class XtbTranslationParser implements TranslationParser<XmlTranslationParserHint> {
// (undocumented)
analyze(filePath: string, contents: string): ParseAnalysis<XmlTranslationParserHint>;
// (undocumented)
parse(filePath: string, contents: string, hint: XmlTranslationParserHint): ParsedTranslationBundle;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 7093,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/localize/tools/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_0_147 | ## API Report File for "@angular/common"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
| {
"end_byte": 147,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_148_7883 | import { ChangeDetectorRef } from '@angular/core';
import { DoCheck } from '@angular/core';
import { ElementRef } from '@angular/core';
import * as i0 from '@angular/core';
import { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
import { ɵImageConfig as ImageConfig } 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 { OnInit } from '@angular/core';
import { PipeTransform } from '@angular/core';
import { Provider } 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<string>;
// @public
export class AsyncPipe implements OnDestroy, PipeTransform {
constructor(ref: ChangeDetectorRef);
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
transform<T>(obj: Observable<T> | Subscribable<T> | Promise<T>): T | null;
// (undocumented)
transform<T>(obj: null | undefined): null;
// (undocumented)
transform<T>(obj: Observable<T> | Subscribable<T> | Promise<T> | null | undefined): T | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<AsyncPipe, "async", true>;
}
// @public
export class BrowserPlatformLocation extends PlatformLocation {
constructor();
// (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;
set pathname(newPath: string);
// (undocumented)
get port(): string;
// (undocumented)
get protocol(): string;
// (undocumented)
pushState(state: any, title: string, url: string): void;
// (undocumented)
replaceState(state: any, title: string, url: string): void;
// (undocumented)
get search(): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserPlatformLocation, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserPlatformLocation>;
}
// @public
export class CommonModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CommonModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<CommonModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<CommonModule, never, [typeof i1.NgClass, typeof i2.NgComponentOutlet, typeof i3.NgForOf, typeof i4.NgIf, typeof i5.NgTemplateOutlet, typeof i6.NgStyle, typeof i7.NgSwitch, typeof i7.NgSwitchCase, typeof i7.NgSwitchDefault, typeof i8.NgPlural, typeof i8.NgPluralCase, typeof i9.AsyncPipe, typeof i10.UpperCasePipe, typeof i10.LowerCasePipe, typeof i11.JsonPipe, typeof i12.SlicePipe, typeof i13.DecimalPipe, typeof i13.PercentPipe, typeof i10.TitleCasePipe, typeof i13.CurrencyPipe, typeof i14.DatePipe, typeof i15.I18nPluralPipe, typeof i16.I18nSelectPipe, typeof i17.KeyValuePipe], [typeof i1.NgClass, typeof i2.NgComponentOutlet, typeof i3.NgForOf, typeof i4.NgIf, typeof i5.NgTemplateOutlet, typeof i6.NgStyle, typeof i7.NgSwitch, typeof i7.NgSwitchCase, typeof i7.NgSwitchDefault, typeof i8.NgPlural, typeof i8.NgPluralCase, typeof i9.AsyncPipe, typeof i10.UpperCasePipe, typeof i10.LowerCasePipe, typeof i11.JsonPipe, typeof i12.SlicePipe, typeof i13.DecimalPipe, typeof i13.PercentPipe, typeof i10.TitleCasePipe, typeof i13.CurrencyPipe, typeof i14.DatePipe, typeof i15.I18nPluralPipe, typeof i16.I18nSelectPipe, typeof i17.KeyValuePipe]>;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPipe, "currency", true>;
}
// @public
export const DATE_PIPE_DEFAULT_OPTIONS: InjectionToken<DatePipeConfig>;
// @public @deprecated
export const DATE_PIPE_DEFAULT_TIMEZONE: InjectionToken<string>;
// @public
export class DatePipe implements PipeTransform {
constructor(locale: string, defaultTimezone?: (string | null) | undefined, defaultOptions?: (DatePipeConfig | null) | undefined);
// (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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, [null, { optional: true; }, { optional: true; }]>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "date", true>;
}
// @public
export interface DatePipeConfig {
// (undocumented)
dateFormat?: string;
// (undocumented)
timezone?: string;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<DecimalPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<DecimalPipe, "number", true>;
}
// @public
export const DOCUMENT: InjectionToken<Document>;
// @public
export function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string;
// @public
export function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string;
// @public
export function formatNumber(value: number, locale: string, digitsInfo?: string): string;
// @public
export function formatPercen | {
"end_byte": 7883,
"start_byte": 148,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_7884_15693 | (value: number, locale: string, digitsInfo?: string): string;
// @public @deprecated
export enum FormatWidth {
Full = 3,
Long = 2,
Medium = 1,
Short = 0
}
// @public @deprecated
export enum FormStyle {
// (undocumented)
Format = 0,
// (undocumented)
Standalone = 1
}
// @public @deprecated
export function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
// @public @deprecated
export function getLocaleCurrencyCode(locale: string): string | null;
// @public @deprecated
export function getLocaleCurrencyName(locale: string): string | null;
// @public @deprecated
export function getLocaleCurrencySymbol(locale: string): string | null;
// @public @deprecated
export function getLocaleDateFormat(locale: string, width: FormatWidth): string;
// @public @deprecated
export function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
// @public @deprecated
export function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
// @public @deprecated
export function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>;
// @public @deprecated
export function getLocaleDirection(locale: string): 'ltr' | 'rtl';
// @public @deprecated
export function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>;
// @public @deprecated
export function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
// @public @deprecated
export function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
// @public @deprecated
export function getLocaleFirstDayOfWeek(locale: string): WeekDay;
// @public @deprecated
export function getLocaleId(locale: string): string;
// @public @deprecated
export function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
// @public @deprecated
export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
// @public @deprecated
export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
// @public @deprecated (undocumented)
export const getLocalePluralCase: (locale: string) => (value: number) => Plural;
// @public @deprecated
export function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
// @public @deprecated
export function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
// @public @deprecated
export function getNumberOfCurrencyDigits(code: string): number;
// @public
export class HashLocationStrategy extends LocationStrategy implements OnDestroy {
constructor(_platformLocation: PlatformLocation, _baseHref?: string);
// (undocumented)
back(): void;
// (undocumented)
forward(): void;
// (undocumented)
getBaseHref(): string;
// (undocumented)
getState(): unknown;
// (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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HashLocationStrategy, [null, { optional: true; }]>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<HashLocationStrategy>;
}
// @public
export class I18nPluralPipe implements PipeTransform {
constructor(_localization: NgLocalization);
// (undocumented)
transform(value: number | null | undefined, pluralMap: {
[count: string]: string;
}, locale?: string): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<I18nPluralPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<I18nPluralPipe, "i18nPlural", true>;
}
// @public
export class I18nSelectPipe implements PipeTransform {
// (undocumented)
transform(value: string | null | undefined, mapping: {
[key: string]: string;
}): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<I18nSelectPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<I18nSelectPipe, "i18nSelect", true>;
}
export { IMAGE_CONFIG }
// @public
export const IMAGE_LOADER: InjectionToken<ImageLoader>;
export { ImageConfig }
// @public
export type ImageLoader = (config: ImageLoaderConfig) => string;
// @public
export interface ImageLoaderConfig {
isPlaceholder?: boolean;
loaderParams?: {
[key: string]: any;
};
src: string;
width?: number;
}
// @public
export interface ImagePlaceholderConfig {
// (undocumented)
blur?: boolean;
}
// @public
export function isPlatformBrowser(platformId: Object): boolean;
// @public
export function isPlatformServer(platformId: Object): boolean;
// @public
export class JsonPipe implements PipeTransform {
// (undocumented)
transform(value: any): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<JsonPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<JsonPipe, "json", true>;
}
// @public
export interface KeyValue<K, V> {
// (undocumented)
key: K;
// (undocumented)
value: V;
}
// @public
export class KeyValuePipe implements PipeTransform {
constructor(differs: KeyValueDiffers);
// (undocumented)
transform<K, V>(input: ReadonlyMap<K, V>, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>>;
// (undocumented)
transform<K extends number, V>(input: Record<K, V>, compareFn?: ((a: KeyValue<string, V>, b: KeyValue<string, V>) => number) | null): Array<KeyValue<string, V>>;
// (undocumented)
transform<K extends string, V>(input: Record<K, V> | ReadonlyMap<K, V>, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>>;
// (undocumented)
transform(input: null | undefined, compareFn?: ((a: KeyValue<unknown, unknown>, b: KeyValue<unknown, unknown>) => number) | null): null;
// (undocumented)
transform<K, V>(input: ReadonlyMap<K, V> | null | undefined, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>> | null;
// (undocumented)
transform<K extends number, V>(input: Record<K, V> | null | undefined, compareFn?: ((a: KeyValue<string, V>, b: KeyValue<string, V>) => number) | null): Array<KeyValue<string, V>> | null;
// (undocumented)
transform<K extends string, V>(input: Record<K, V> | ReadonlyMap<K, V> | null | undefined, compareFn?: ((a: KeyValue<K, V>, b: KeyValue<K, V>) => number) | null): Array<KeyValue<K, V>> | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<KeyValuePipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<KeyValuePipe, "keyvalue", true>;
}
// @public
class Location_2 implements OnDestroy {
constructor(locationStrategy: LocationStrategy);
back(): void;
forward(): void;
getState(): unknown;
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;
// (undocumented)
ngOnDestroy(): void;
normalize(url: string): string;
static normalizeQueryParams: (params: string) => string;
onUrlChange(fn: (url: string, state: unknown) => void): | {
"end_byte": 15693,
"start_byte": 7884,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_15694_23098 | VoidFunction;
path(includeHash?: boolean): string;
prepareExternalUrl(url: string): string;
replaceState(path: string, query?: string, state?: any): void;
static stripTrailingSlash: (url: string) => string;
subscribe(onNext: (value: PopStateEvent_2) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<Location_2, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<Location_2>;
}
export { Location_2 as Location }
// @public
export const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
// @public
export interface LocationChangeEvent {
// (undocumented)
state: any;
// (undocumented)
type: string;
}
// @public (undocumented)
export interface LocationChangeListener {
// (undocumented)
(event: LocationChangeEvent): any;
}
// @public
export abstract class LocationStrategy {
// (undocumented)
abstract back(): void;
// (undocumented)
abstract forward(): void;
// (undocumented)
abstract getBaseHref(): string;
// (undocumented)
abstract getState(): unknown;
// (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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<LocationStrategy, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<LocationStrategy>;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<LowerCasePipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<LowerCasePipe, "lowercase", true>;
}
// @public
export class NgClass implements DoCheck {
constructor(_ngEl: ElementRef, _renderer: Renderer2);
// (undocumented)
set klass(value: string);
// (undocumented)
set ngClass(value: string | string[] | Set<string> | {
[klass: string]: any;
} | null | undefined);
// (undocumented)
ngDoCheck(): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": { "alias": "class"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgClass, never>;
}
// @public
export class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy {
constructor(_viewContainerRef: ViewContainerRef);
// (undocumented)
ngComponentOutlet: Type<any> | null;
// (undocumented)
ngComponentOutletContent?: any[][];
// (undocumented)
ngComponentOutletInjector?: Injector;
// (undocumented)
ngComponentOutletInputs?: Record<string, unknown>;
// (undocumented)
ngComponentOutletNgModule?: Type<any>;
// @deprecated (undocumented)
ngComponentOutletNgModuleFactory?: NgModuleFactory<any>;
// (undocumented)
ngDoCheck(): void;
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": { "alias": "ngComponentOutlet"; "required": false; }; "ngComponentOutletInputs": { "alias": "ngComponentOutletInputs"; "required": false; }; "ngComponentOutletInjector": { "alias": "ngComponentOutletInjector"; "required": false; }; "ngComponentOutletContent": { "alias": "ngComponentOutletContent"; "required": false; }; "ngComponentOutletNgModule": { "alias": "ngComponentOutletNgModule"; "required": false; }; "ngComponentOutletNgModuleFactory": { "alias": "ngComponentOutletNgModuleFactory"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgComponentOutlet, never>;
}
// @public
class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
ngDoCheck(): void;
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
set ngForTrackBy(fn: TrackByFunction<T>);
// (undocumented)
get ngForTrackBy(): TrackByFunction<T>;
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": { "alias": "ngForOf"; "required": false; }; "ngForTrackBy": { "alias": "ngForTrackBy"; "required": false; }; "ngForTemplate": { "alias": "ngForTemplate"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgForOf<any, any>, never>;
}
export { NgForOf as NgFor }
export { NgForOf }
// @public (undocumented)
export class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
$implicit: T;
constructor(
$implicit: T,
ngForOf: U,
index: number,
count: number);
count: number;
// (undocumented)
get even(): boolean;
// (undocumented)
get first(): boolean;
index: number;
// (undocumented)
get last(): boolean;
ngForOf: U;
// (undocumented)
get odd(): boolean;
}
// @public
export class NgIf<T = unknown> {
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>);
set ngIf(condition: T);
set ngIfElse(templateRef: TemplateRef<NgIfContext<T>> | null);
set ngIfThen(templateRef: TemplateRef<NgIfContext<T>> | null);
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<Exclude<T, false | 0 | '' | null | undefined>>;
static ngTemplateGuard_ngIf: 'binding';
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": { "alias": "ngIf"; "required": false; }; "ngIfThen": { "alias": "ngIfThen"; "required": false; }; "ngIfElse": { "alias": "ngIfElse"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgIf<any>, never>;
}
// @public (undocumented)
export class NgIfContext<T = unknown> {
// (undocumented)
$implicit: T;
// (undocumented)
ngIf: T;
}
// @public
export class NgLocaleLocalization extends NgLocalization {
constructor(locale: string);
// (undocumented)
getPluralCategory(value: any, locale?: string): string;
// (undocumented)
protected locale: string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgLocaleLocalization, never>;
// (undocumente | {
"end_byte": 23098,
"start_byte": 15694,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_23099_30417 | )
static ɵprov: i0.ɵɵInjectableDeclaration<NgLocaleLocalization>;
}
// @public (undocumented)
export abstract class NgLocalization {
// (undocumented)
abstract getPluralCategory(value: any, locale?: string): string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgLocalization, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<NgLocalization>;
}
// @public
export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
disableOptimizedSrcset: boolean;
fill: boolean;
height: number | undefined;
loaderParams?: {
[key: string]: any;
};
loading?: 'lazy' | 'eager' | 'auto';
// (undocumented)
static ngAcceptInputType_disableOptimizedSrcset: unknown;
// (undocumented)
static ngAcceptInputType_fill: unknown;
// (undocumented)
static ngAcceptInputType_height: unknown;
// (undocumented)
static ngAcceptInputType_ngSrc: string | i0.ɵSafeValue;
// (undocumented)
static ngAcceptInputType_placeholder: boolean | string;
// (undocumented)
static ngAcceptInputType_priority: unknown;
// (undocumented)
static ngAcceptInputType_width: unknown;
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
ngOnInit(): void;
ngSrc: string;
ngSrcset: string;
placeholder?: string | boolean;
placeholderConfig?: ImagePlaceholderConfig;
priority: boolean;
sizes?: string;
width: number | undefined;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": { "alias": "ngSrc"; "required": true; }; "ngSrcset": { "alias": "ngSrcset"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "loaderParams": { "alias": "loaderParams"; "required": false; }; "disableOptimizedSrcset": { "alias": "disableOptimizedSrcset"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderConfig": { "alias": "placeholderConfig"; "required": false; }; "src": { "alias": "src"; "required": false; }; "srcset": { "alias": "srcset"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgOptimizedImage, never>;
}
// @public
export class NgPlural {
constructor(_localization: NgLocalization);
// (undocumented)
addCase(value: string, switchView: SwitchView): void;
// (undocumented)
set ngPlural(value: number);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": { "alias": "ngPlural"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgPlural, never>;
}
// @public
export class NgPluralCase {
constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
// (undocumented)
value: string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPluralCase, "[ngPluralCase]", never, {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgPluralCase, [{ attribute: "ngPluralCase"; }, null, null, { host: true; }]>;
}
// @public
export class NgStyle implements DoCheck {
constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2);
// (undocumented)
ngDoCheck(): void;
// (undocumented)
set ngStyle(values: {
[klass: string]: any;
} | null | undefined);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": { "alias": "ngStyle"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgStyle, never>;
}
// @public
export class NgSwitch {
// (undocumented)
set ngSwitch(newValue: any);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": { "alias": "ngSwitch"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitch, never>;
}
// @public
export class NgSwitchCase implements DoCheck {
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
ngDoCheck(): void;
ngSwitchCase: any;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": { "alias": "ngSwitchCase"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchCase, [null, null, { optional: true; host: true; }]>;
}
// @public
export class NgSwitchDefault {
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchDefault, "[ngSwitchDefault]", never, {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchDefault, [null, null, { optional: true; host: true; }]>;
}
// @public
export class NgTemplateOutlet<C = unknown> implements OnChanges {
constructor(_viewContainerRef: ViewContainerRef);
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
ngTemplateOutlet: TemplateRef<C> | null;
ngTemplateOutletContext: C | null;
ngTemplateOutletInjector: Injector | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet<any>, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgTemplateOutlet<any>, never>;
}
// @public @deprecated
export enum NumberFormatStyle {
// (undocumented)
Currency = 2,
// (undocumented)
Decimal = 0,
// (undocumented)
Percent = 1,
// (undocumented)
Scientific = 3
}
// @public @deprecated
export const NumberSymbol: {
readonly Decimal: 0;
readonly Group: 1;
readonly List: 2;
readonly PercentSign: 3;
readonly PlusSign: 4;
readonly MinusSign: 5;
readonly Exponential: 6;
readonly SuperscriptingExponent: 7;
readonly PerMille: 8;
readonly Infinity: 9;
readonly NaN: 10;
readonly TimeSeparator: 11;
readonly CurrencyDecimal: 12;
readonly CurrencyGroup: 13;
};
// @public (undocumented)
export type NumberSymbol = (typeof NumberSymbol)[keyof typeof NumberSymbol];
// @public
export class PathLocationStrategy extends LocationStrategy implements OnDestroy {
constructor(_platformLocation: PlatformLocation, href?: string);
// (undocumented)
back(): void;
// (undocumented)
forward(): void;
// (undocumented) | {
"end_byte": 30417,
"start_byte": 23099,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/index.api.md_30418_37325 | getBaseHref(): string;
// (undocumented)
getState(): unknown;
// (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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PathLocationStrategy, [null, { optional: true; }]>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<PathLocationStrategy>;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PercentPipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<PercentPipe, "percent", true>;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PlatformLocation, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformLocation>;
}
// @public @deprecated
export enum Plural {
// (undocumented)
Few = 3,
// (undocumented)
Many = 4,
// (undocumented)
One = 1,
// (undocumented)
Other = 5,
// (undocumented)
Two = 2,
// (undocumented)
Zero = 0
}
// @public (undocumented)
interface PopStateEvent_2 {
// (undocumented)
pop?: boolean;
// (undocumented)
state?: any;
// (undocumented)
type?: string;
// (undocumented)
url?: string;
}
export { PopStateEvent_2 as PopStateEvent }
// @public
export const PRECONNECT_CHECK_BLOCKLIST: InjectionToken<(string | string[])[]>;
// @public
export const provideCloudflareLoader: (path: string) => Provider[];
// @public
export const provideCloudinaryLoader: (path: string) => Provider[];
// @public
export const provideImageKitLoader: (path: string) => Provider[];
// @public
export const provideImgixLoader: (path: string) => Provider[];
// @public
export function provideNetlifyLoader(path?: string): Provider[];
// @public
export function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
// @public
export class SlicePipe implements PipeTransform {
// (undocumented)
transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;
// (undocumented)
transform(value: null | undefined, start: number, end?: number): null;
// (undocumented)
transform<T>(value: ReadonlyArray<T> | null | undefined, start: number, end?: number): Array<T> | null;
// (undocumented)
transform(value: string, start: number, end?: number): string;
// (undocumented)
transform(value: string | null | undefined, start: number, end?: number): string | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SlicePipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<SlicePipe, "slice", true>;
}
// @public @deprecated
export type Time = {
hours: number;
minutes: number;
};
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<TitleCasePipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<TitleCasePipe, "titlecase", true>;
}
// @public @deprecated
export enum TranslationWidth {
Abbreviated = 1,
Narrow = 0,
Short = 3,
Wide = 2
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<UpperCasePipe, never>;
// (undocumented)
static ɵpipe: i0.ɵɵPipeDeclaration<UpperCasePipe, "uppercase", true>;
}
// @public (undocumented)
export const VERSION: Version;
// @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;
}
// @public @deprecated
export enum WeekDay {
// (undocumented)
Friday = 5,
// (undocumented)
Monday = 1,
// (undocumented)
Saturday = 6,
// (undocumented)
Sunday = 0,
// (undocumented)
Thursday = 4,
// (undocumented)
Tuesday = 2,
// (undocumented)
Wednesday = 3
}
// @public
export abstract class XhrFactory {
// (undocumented)
abstract build(): XMLHttpRequest;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 37325,
"start_byte": 30418,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/index.api.md"
} |
angular/goldens/public-api/common/errors.api.md_0_1501 | ## 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 const enum RuntimeErrorCode {
// (undocumented)
EQUALITY_NG_SWITCH_DIFFERENCE = 2001,
// (undocumented)
INVALID_INPUT = 2952,
// (undocumented)
INVALID_LOADER_ARGUMENTS = 2959,
// (undocumented)
INVALID_PIPE_ARGUMENT = 2100,
// (undocumented)
LCP_IMG_MISSING_PRIORITY = 2955,
// (undocumented)
LCP_IMG_NGSRC_MODIFIED = 2964,
// (undocumented)
MISSING_BUILTIN_LOADER = 2962,
// (undocumented)
MISSING_NECESSARY_LOADER = 2963,
// (undocumented)
NG_FOR_MISSING_DIFFER = -2200,
// (undocumented)
OVERSIZED_IMAGE = 2960,
// (undocumented)
OVERSIZED_PLACEHOLDER = 2965,
// (undocumented)
PARENT_NG_SWITCH_NOT_FOUND = 2000,
// (undocumented)
PLACEHOLDER_DIMENSION_LIMIT_EXCEEDED = 2967,
// (undocumented)
PRIORITY_IMG_MISSING_PRECONNECT_TAG = 2956,
// (undocumented)
REQUIRED_INPUT_MISSING = 2954,
// (undocumented)
TOO_MANY_PRELOADED_IMAGES = 2961,
// (undocumented)
TOO_MANY_PRIORITY_ATTRIBUTES = 2966,
// (undocumented)
UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE = 2958,
// (undocumented)
UNEXPECTED_INPUT_CHANGE = 2953,
// (undocumented)
UNEXPECTED_SRC_ATTR = 2950,
// (undocumented)
UNEXPECTED_SRCSET_ATTR = 2951
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 1501,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/errors.api.md"
} |
angular/goldens/public-api/common/upgrade/index.api.md_0_4823 | ## 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 * as i0 from '@angular/core';
import * as i1 from '@angular/common';
import { InjectionToken } from '@angular/core';
import { Location as Location_2 } 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_2, 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;
replace(): this;
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;
}
// @public
export class $locationShimProvider {
$get(): $locationShim;
constructor(ngUpgrade: UpgradeModule, location: Location_2, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy);
hashPrefix(prefix?: string): void;
html5Mode(mode?: any): void;
}
// @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;
host: string;
search: string;
hash: string;
hostname: string;
port: string;
pathname: string;
};
}
// @public
export const LOCATION_UPGRADE_CONFIGURATION: InjectionToken<LocationUpgradeConfig>;
// @public
export interface LocationUpgradeConfig {
appBaseHref?: string;
hashPrefix?: string;
serverBaseHref?: string;
urlCodec?: typeof UrlCodec;
useHash?: boolean;
}
// @public
export class LocationUpgradeModule {
// (undocumented)
static config(config?: LocationUpgradeConfig): ModuleWithProviders<LocationUpgradeModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<LocationUpgradeModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<LocationUpgradeModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<LocationUpgradeModule, never, [typeof i1.CommonModule], never>;
}
// @public
export abstract class UrlCodec {
abstract areEqual(valA: string, valB: string): boolean;
abstract decodeHash(hash: string): string;
abstract decodePath(path: string): string;
abstract decodeSearch(search: string): {
[k: string]: unknown;
};
abstract encodeHash(hash: string): string;
abstract encodePath(path: string): string;
abstract encodeSearch(search: string | {
[k: string]: unknown;
}): string;
abstract normalize(href: string): string;
abstract normalize(path: string, search: {
[k: string]: unknown;
}, hash: string, baseUrl?: string): string;
abstract parse(url: string, base?: string): {
href: string;
protocol: string;
host: string;
search: string;
hash: string;
hostname: string;
port: string;
pathname: string;
};
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 4823,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/upgrade/index.api.md"
} |
angular/goldens/public-api/common/testing/index.api.md_0_4865 | ## API Report File for "@angular/common_testing"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { Location as Location_2 } from '@angular/common';
import { LocationChangeListener } from '@angular/common';
import { LocationStrategy } from '@angular/common';
import { PlatformLocation } from '@angular/common';
import { Provider } from '@angular/core';
import { SubscriptionLike } from 'rxjs';
// @public
export const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken<MockPlatformLocationConfig>;
// @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[];
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MockLocationStrategy, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<MockLocationStrategy>;
}
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MockPlatformLocation, [{ optional: true; }]>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<MockPlatformLocation>;
}
// @public
export interface MockPlatformLocationConfig {
// (undocumented)
appBaseHref?: string;
// (undocumented)
startUrl?: string;
}
// @public
export function provideLocationMocks(): Provider[];
// @public
export class SpyLocation implements Location_2 {
// (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)
ngOnDestroy(): void;
// (undocumented)
normalize(url: string): string;
// (undocumented)
onUrlChange(fn: (url: string, state: unknown) => void): VoidFunction;
// (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[];
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SpyLocation, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<SpyLocation>;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 4865,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/testing/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_0_152 | ## API Report File for "@angular/common_http"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
| {
"end_byte": 152,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_153_9807 | import { EnvironmentInjector } from '@angular/core';
import { EnvironmentProviders } from '@angular/core';
import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { ModuleWithProviders } from '@angular/core';
import { Observable } from 'rxjs';
import { Provider } from '@angular/core';
import { XhrFactory } from '@angular/common';
// @public
export class FetchBackend implements HttpBackend {
// (undocumented)
handle(request: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FetchBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<FetchBackend>;
}
// @public
export const HTTP_INTERCEPTORS: InjectionToken<readonly HttpInterceptor[]>;
// @public
export const HTTP_TRANSFER_CACHE_ORIGIN_MAP: InjectionToken<Record<string, string>>;
// @public
export abstract class HttpBackend implements HttpHandler {
// (undocumented)
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
}
// @public
export class HttpClient {
constructor(handler: HttpHandler);
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
body?: any | null;
}): Observable<ArrayBuffer>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
body?: any | null;
}): Observable<Blob>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
body?: any | null;
}): Observable<string>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpEvent<ArrayBuffer>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpEvent<Blob>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpEvent<string>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpEvent<Object>>;
delete<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | (string | number | boolean)[];
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpEvent<T>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpResponse<ArrayBuffer>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpResponse<Blob>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpResponse<string>>;
delete(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpResponse<Object>>;
delete<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<HttpResponse<T>>;
delete(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<Object>;
delete<T>(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
body?: any | null;
}): Observable<T>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<ArrayBuffer>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Blob>;
get(url: string, options: {
headers?: Http | {
"end_byte": 9807,
"start_byte": 153,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_9807_19772 | Headers | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<string>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Blob>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<string>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Object>>;
get<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<T>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Blob>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<string>>;
get(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Object>>;
get<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<T>>;
get(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Object>;
get<T>(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<T>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<ArrayBuffer>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Blob>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<string>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Blob>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
| {
"end_byte": 19772,
"start_byte": 9807,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_19772_29717 | };
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<string>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Object>>;
head<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<T>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Blob>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<string>>;
head(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Object>>;
head<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<T>>;
head(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Object>;
head<T>(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<T>;
jsonp(url: string, callbackParam: string): Observable<Object>;
jsonp<T>(url: string, callbackParam: string): Observable<T>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<ArrayBuffer>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<Blob>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<string>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpEvent<Blob>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpEvent<string>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<Object>>;
options<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<T>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
| {
"end_byte": 29717,
"start_byte": 19772,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_29731_39488 | pParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpResponse<Blob>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpResponse<string>>;
options(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<Object>>;
options<T>(url: string, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<T>>;
options(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<Object>;
options<T>(url: string, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<T>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<ArrayBuffer>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<Blob>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<string>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpEvent<Blob>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpEvent<string>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<Object>>;
patch<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<T>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpResponse<Blob>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpResponse<string>>;
patch(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<Object>>;
patch<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<T>>;
patch(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<Object>;
patch<T>(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: bool | {
"end_byte": 39488,
"start_byte": 29731,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_39488_49230 | ean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<T>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<ArrayBuffer>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Blob>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<string>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Blob>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<string>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Object>>;
post<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<T>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Blob>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<string>>;
post(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Object>>;
post<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<T>>;
post(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Object>;
post<T>(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<T>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<ArrayBuffer>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<Blob>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: Http | {
"end_byte": 49230,
"start_byte": 39488,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_49230_58936 | Context;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<string>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpEvent<Blob>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpEvent<string>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<Object>>;
put<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpEvent<T>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
}): Observable<HttpResponse<Blob>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
}): Observable<HttpResponse<string>>;
put(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<Object>>;
put<T>(url: string, body: any | null, options: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<T>>;
put(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<Object>;
put<T>(url: string, body: any | null, options?: {
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType?: 'json';
withCredentials?: boolean;
}): Observable<T>;
request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<ArrayBuffer>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Blob>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<string>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
observe: 'events';
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<ArrayBuffer>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<Blob>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'events';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<string>>;
re | {
"end_byte": 58936,
"start_byte": 49230,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_58947_67931 | d: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
reportProgress?: boolean;
observe: 'events';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<any>>;
request<R>(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
reportProgress?: boolean;
observe: 'events';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpEvent<R>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'arraybuffer';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<ArrayBuffer>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'blob';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<Blob>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
observe: 'response';
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
reportProgress?: boolean;
responseType: 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<string>>;
request(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
reportProgress?: boolean;
observe: 'response';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
withCredentials?: boolean;
}): Observable<HttpResponse<Object>>;
request<R>(method: string, url: string, options: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
reportProgress?: boolean;
observe: 'response';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<HttpResponse<R>>;
request(method: string, url: string, options?: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
reportProgress?: boolean;
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<Object>;
request<R>(method: string, url: string, options?: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
observe?: 'body';
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
responseType?: 'json';
reportProgress?: boolean;
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<R>;
request(method: string, url: string, options?: {
body?: any;
headers?: HttpHeaders | {
[header: string]: string | string[];
};
context?: HttpContext;
params?: HttpParams | {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
observe?: 'body' | 'events' | 'response';
reportProgress?: boolean;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
}): Observable<any>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClient, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<HttpClient>;
}
// @public @deprecated
export class HttpClientJsonpModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientJsonpModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientJsonpModule, never, never, never>;
}
// @public @deprecated
export class HttpClientModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientModule, never, never, never>;
}
// @public @deprecated
export class HttpClientXsrfModule {
static disable(): ModuleWithProviders<HttpClientXsrfModule>;
static withOptions(options?: {
cookieName?: string;
headerName?: string;
}): ModuleWithProviders<HttpClientXsrfModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientXsrfModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientXsrfModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientXsrfModule, never, never, never>;
}
// @public
export class HttpContext {
delete(token: HttpContextToken<unknown>): HttpContext;
get<T>(token: HttpContextToken<T>): T;
has(token: HttpContextToken<unknown>): boolean;
// (undocumented)
keys(): IterableIterator<HttpContextToken<unknown>>;
set<T>(token: HttpContextToken<T>, value: T): HttpContext;
}
// @public
export class HttpContextToken<T> {
constructor(defaultValue: () => T);
// (undocumented)
readonly defaultValue: () => T;
}
// @public
export interface HttpDownloadProgressEvent extends HttpProgressEvent {
partialText?: string;
// (undocumented)
type: HttpEventType.DownloadProgress;
}
// @public
export class HttpErrorResponse extends HttpResponseBase implements Error {
constructor(init: {
error?: any;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
});
// (undocumented)
readonly error: any | null;
// (undocumented)
readonly message: string;
// (undocumented)
readonly name = "HttpErrorResponse";
readonly ok = false;
}
// @public
export type HttpEvent<T> = HttpSentEvent | HttpHeaderResponse | HttpResponse<T> | HttpProgressEvent | HttpUserEvent<T>;
// @public
export enum HttpEventType {
DownloadProgress = 3,
Response = 4,
ResponseHeader = 2,
Sent = 0,
UploadProgress = 1,
User = 5
}
// @public
export interface HttpFeature<KindT extends HttpFeatureKind> {
// (undocumented)
ɵkind: KindT;
// (undocumented)
ɵproviders: Provider[];
}
// @public
export enum HttpFeatureKind {
// (undocumented)
CustomXsrfConfiguration = 2,
// (undocumented)
Fetch = 6,
// (undocumented)
| {
"end_byte": 67931,
"start_byte": 58947,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_67932_76595 | Interceptors = 0,
// (undocumented)
JsonpSupport = 4,
// (undocumented)
LegacyInterceptors = 1,
// (undocumented)
NoXsrfProtection = 3,
// (undocumented)
RequestsMadeViaParent = 5
}
// @public
export abstract class HttpHandler {
// (undocumented)
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
}
// @public
export type HttpHandlerFn = (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>;
// @public
export class HttpHeaderResponse extends HttpResponseBase {
constructor(init?: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
});
clone(update?: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
}): HttpHeaderResponse;
// (undocumented)
readonly type: HttpEventType.ResponseHeader;
}
// @public
export class HttpHeaders {
constructor(headers?: string | {
[name: string]: string | number | (string | number)[];
} | Headers);
append(name: string, value: string | string[]): HttpHeaders;
delete(name: string, value?: string | string[]): HttpHeaders;
get(name: string): string | null;
getAll(name: string): string[] | null;
has(name: string): boolean;
keys(): string[];
set(name: string, value: string | string[]): HttpHeaders;
}
// @public
export interface HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
}
// @public
export type HttpInterceptorFn = (req: HttpRequest<unknown>, next: HttpHandlerFn) => Observable<HttpEvent<unknown>>;
// @public
export interface HttpParameterCodec {
// (undocumented)
decodeKey(key: string): string;
// (undocumented)
decodeValue(value: string): string;
// (undocumented)
encodeKey(key: string): string;
// (undocumented)
encodeValue(value: string): string;
}
// @public
export class HttpParams {
constructor(options?: HttpParamsOptions);
append(param: string, value: string | number | boolean): HttpParams;
appendAll(params: {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
}): HttpParams;
delete(param: string, value?: string | number | boolean): HttpParams;
get(param: string): string | null;
getAll(param: string): string[] | null;
has(param: string): boolean;
keys(): string[];
set(param: string, value: string | number | boolean): HttpParams;
toString(): string;
}
// @public
export interface HttpParamsOptions {
encoder?: HttpParameterCodec;
fromObject?: {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
};
fromString?: string;
}
// @public
export interface HttpProgressEvent {
loaded: number;
total?: number;
type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;
}
// @public
export class HttpRequest<T> {
constructor(method: 'GET' | 'HEAD', url: string, init?: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
});
constructor(method: 'DELETE' | 'JSONP' | 'OPTIONS', url: string, init?: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
});
constructor(method: 'POST', url: string, body: T | null, init?: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
});
constructor(method: 'PUT' | 'PATCH', url: string, body: T | null, init?: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
});
constructor(method: string, url: string, body: T | null, init?: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
});
readonly body: T | null;
// (undocumented)
clone(): HttpRequest<T>;
// (undocumented)
clone(update: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
body?: T | null;
method?: string;
url?: string;
setHeaders?: {
[name: string]: string | string[];
};
setParams?: {
[param: string]: string;
};
}): HttpRequest<T>;
// (undocumented)
clone<V>(update: {
headers?: HttpHeaders;
context?: HttpContext;
reportProgress?: boolean;
params?: HttpParams;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
withCredentials?: boolean;
transferCache?: {
includeHeaders?: string[];
} | boolean;
body?: V | null;
method?: string;
url?: string;
setHeaders?: {
[name: string]: string | string[];
};
setParams?: {
[param: string]: string;
};
}): HttpRequest<V>;
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 | URLSearchParams | string | null;
readonly transferCache?: {
includeHeaders?: string[];
} | boolean;
// (undocumented)
readonly url: string;
readonly urlWithParams: string;
readonly withCredentials: boolean;
}
// @public
export class HttpResponse<T> extends HttpResponseBase {
constructor(init?: {
body?: T | null;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
});
readonly body: T | null;
// (undocumented)
clone(): HttpResponse<T>;
// (undocumented)
clone(update: {
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
}): HttpResponse<T>;
// (undocumented)
clone<V>(update: {
body?: V | null;
headers?: HttpHeaders;
status?: number;
statusText?: string;
url?: string;
}): HttpResponse<V>;
// (undocumented)
readonly type: HttpEventType.Response;
}
// @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;
}
// @public
export interface HttpSentEvent {
// (undocumented)
type: HttpEventType.Sent;
}
// @public
export enum HttpStatusCode {
// (undocumented)
Accepted = 202,
// (undocumented)
AlreadyReported = 208,
// (undocumented)
BadGateway = 502,
// (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)
HttpVersionNotSuppor | {
"end_byte": 76595,
"start_byte": 67932,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/index.api.md_76595_81870 | ted = 505,
// (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,
// (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
}
// @public
export type HttpTransferCacheOptions = {
includeHeaders?: string[];
filter?: (req: HttpRequest<unknown>) => boolean;
includePostRequests?: boolean;
includeRequestsWithAuthHeaders?: boolean;
};
// @public
export interface HttpUploadProgressEvent extends HttpProgressEvent {
// (undocumented)
type: HttpEventType.UploadProgress;
}
// @public
export class HttpUrlEncodingCodec implements HttpParameterCodec {
decodeKey(key: string): string;
decodeValue(value: string): string;
encodeKey(key: string): string;
encodeValue(value: string): string;
}
// @public
export interface HttpUserEvent<T> {
// (undocumented)
type: HttpEventType.User;
}
// @public
export class HttpXhrBackend implements HttpBackend {
constructor(xhrFactory: XhrFactory);
handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpXhrBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<HttpXhrBackend>;
}
// @public
export abstract class HttpXsrfTokenExtractor {
abstract getToken(): string | null;
}
// @public
export class JsonpClientBackend implements HttpBackend {
constructor(callbackMap: JsonpCallbackContext, document: any);
handle(req: HttpRequest<never>): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<JsonpClientBackend, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<JsonpClientBackend>;
}
// @public
export class JsonpInterceptor {
constructor(injector: EnvironmentInjector);
intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<JsonpInterceptor, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<JsonpInterceptor>;
}
// @public
export function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
// @public
export function withFetch(): HttpFeature<HttpFeatureKind.Fetch>;
// @public
export function withInterceptors(interceptorFns: HttpInterceptorFn[]): HttpFeature<HttpFeatureKind.Interceptors>;
// @public
export function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors>;
// @public
export function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport>;
// @public
export function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtection>;
// @public
export function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;
// @public
export function withXsrfConfiguration({ cookieName, headerName, }: {
cookieName?: string;
headerName?: string;
}): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 81870,
"start_byte": 76595,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/index.api.md"
} |
angular/goldens/public-api/common/http/errors.api.md_0_573 | ## 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 const enum RuntimeErrorCode {
// (undocumented)
HEADERS_ALTERED_BY_TRANSFER_CACHE = 2802,
// (undocumented)
HTTP_ORIGIN_MAP_CONTAINS_PATH = 2804,
// (undocumented)
HTTP_ORIGIN_MAP_USED_IN_CLIENT = 2803,
// (undocumented)
MISSING_JSONP_MODULE = -2800,
// (undocumented)
NOT_USING_FETCH_BACKEND_IN_SSR = 2801
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 573,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/errors.api.md"
} |
angular/goldens/public-api/common/http/testing/index.api.md_0_2825 | ## 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 * as i0 from '@angular/core';
import * as i1 from '@angular/common/http';
import { Observer } from 'rxjs';
import { Provider } from '@angular/core';
// @public @deprecated
export class HttpClientTestingModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientTestingModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HttpClientTestingModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HttpClientTestingModule, never, [typeof i1.HttpClientModule], never>;
}
// @public
export abstract class HttpTestingController {
abstract expectNone(url: string, description?: string): void;
abstract expectNone(params: RequestMatch, description?: string): void;
abstract expectNone(matchFn: (req: HttpRequest<any>) => boolean, description?: string): void;
abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
abstract expectOne(url: string, description?: string): TestRequest;
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
abstract expectOne(matchFn: (req: HttpRequest<any>) => boolean, description?: string): TestRequest;
abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
abstract verify(opts?: {
ignoreCancelled?: boolean;
}): void;
}
// @public (undocumented)
export function provideHttpClientTesting(): Provider[];
// @public
export interface RequestMatch {
// (undocumented)
method?: string;
// (undocumented)
url?: string;
}
// @public
export class TestRequest {
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
get cancelled(): boolean;
// @deprecated
error(error: ErrorEvent, opts?: TestRequestErrorOptions): void;
error(error: ProgressEvent, opts?: TestRequestErrorOptions): void;
event(event: HttpEvent<any>): void;
flush(body: ArrayBuffer | Blob | boolean | string | number | Object | (boolean | string | number | Object | null)[] | null, opts?: {
headers?: HttpHeaders | {
[name: string]: string | string[];
};
status?: number;
statusText?: string;
}): void;
// (undocumented)
request: HttpRequest<any>;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2825,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/common/http/testing/index.api.md"
} |
angular/goldens/public-api/elements/index.api.md_0_2010 | ## 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<P>(component: Type<any>, config: NgElementConfig): NgElementConstructor<P>;
// @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<P> {
new (injector?: Injector): NgElement & WithProperties<P>;
readonly observedAttributes: string[];
}
// @public
export interface NgElementStrategy {
// (undocumented)
connect(element: HTMLElement): void;
// (undocumented)
disconnect(): void;
// (undocumented)
events: Observable<NgElementStrategyEvent>;
// (undocumented)
getInputValue(propName: string): any;
// (undocumented)
setInputValue(propName: string, value: string, transform?: (value: any) => any): 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<P> = {
[property in keyof P]: P[property];
};
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2010,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/elements/index.api.md"
} |
angular/goldens/public-api/platform-browser-dynamic/index.api.md_0_858 | ## 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 { StaticProvider } from '@angular/core';
import { Version } from '@angular/core';
// @public @deprecated (undocumented)
export class JitCompilerFactory implements CompilerFactory {
// (undocumented)
createCompiler(options?: CompilerOptions[]): Compiler;
}
// @public (undocumented)
export const platformBrowserDynamic: (extraProviders?: StaticProvider[]) => PlatformRef;
// @public (undocumented)
export const VERSION: Version;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 858,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser-dynamic/index.api.md"
} |
angular/goldens/public-api/platform-browser-dynamic/testing/index.api.md_0_947 | ## 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 * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser/testing';
import { PlatformRef } from '@angular/core';
import { StaticProvider } from '@angular/core';
// @public
export class BrowserDynamicTestingModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserDynamicTestingModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserDynamicTestingModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserDynamicTestingModule, never, never, [typeof i1.BrowserTestingModule]>;
}
// @public (undocumented)
export const platformBrowserDynamicTesting: (extraProviders?: StaticProvider[]) => PlatformRef;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 947,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser-dynamic/testing/index.api.md"
} |
angular/goldens/public-api/animations/index.api.md_0_7719 | ## API Report File for "@angular/animations"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import * as i0 from '@angular/core';
// @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;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AnimationBuilder, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<AnimationBuilder>;
}
// @public
interface AnimationEvent_2 {
disabled: boolean;
element: any;
fromState: string;
phaseName: string;
toState: string;
totalTime: number;
triggerName: string;
}
export { AnimationEvent_2 as AnimationEvent }
// @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 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: number): 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)
```
| {
"end_byte": 7719,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/animations/index.api.md"
} |
angular/goldens/public-api/animations/errors.api.md_0_2294 | ## 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 const enum RuntimeErrorCode {
// (undocumented)
ANIMATION_FAILED = 3502,
// (undocumented)
BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS = 3600,
// (undocumented)
BUILDING_FAILED = 3501,
// (undocumented)
CREATE_ANIMATION_FAILED = 3504,
// (undocumented)
INVALID_CSS_UNIT_VALUE = 3005,
// (undocumented)
INVALID_DEFINITION = 3007,
// (undocumented)
INVALID_EXPRESSION = 3015,
// (undocumented)
INVALID_KEYFRAMES = 3011,
// (undocumented)
INVALID_NODE_TYPE = 3004,
// (undocumented)
INVALID_OFFSET = 3012,
// (undocumented)
INVALID_PARALLEL_ANIMATION = 3010,
// (undocumented)
INVALID_PARAM_VALUE = 3003,
// (undocumented)
INVALID_PROPERTY = 3009,
// (undocumented)
INVALID_QUERY = 3014,
// (undocumented)
INVALID_STAGGER = 3013,
// (undocumented)
INVALID_STATE = 3008,
// (undocumented)
INVALID_STYLE_PARAMS = 3001,
// (undocumented)
INVALID_STYLE_VALUE = 3002,
// (undocumented)
INVALID_TIMING_VALUE = 3000,
// (undocumented)
INVALID_TRANSITION_ALIAS = 3016,
// (undocumented)
INVALID_TRIGGER = 3006,
// (undocumented)
KEYFRAME_OFFSETS_OUT_OF_ORDER = 3200,
// (undocumented)
KEYFRAMES_MISSING_OFFSETS = 3202,
// (undocumented)
MISSING_EVENT = 3303,
// (undocumented)
MISSING_OR_DESTROYED_ANIMATION = 3300,
// (undocumented)
MISSING_PLAYER = 3301,
// (undocumented)
MISSING_TRIGGER = 3302,
// (undocumented)
NEGATIVE_DELAY_VALUE = 3101,
// (undocumented)
NEGATIVE_STEP_VALUE = 3100,
// (undocumented)
REGISTRATION_FAILED = 3503,
// (undocumented)
TRANSITION_FAILED = 3505,
// (undocumented)
TRIGGER_BUILD_FAILED = 3404,
// (undocumented)
TRIGGER_PARSING_FAILED = 3403,
// (undocumented)
TRIGGER_TRANSITIONS_FAILED = 3402,
// (undocumented)
UNREGISTERED_TRIGGER = 3401,
// (undocumented)
UNSUPPORTED_TRIGGER_EVENT = 3400,
// (undocumented)
VALIDATION_FAILED = 3500
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2294,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/animations/errors.api.md"
} |
angular/goldens/public-api/animations/browser/index.api.md_0_2091 | ## 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
import { AnimationPlayer } from '@angular/animations';
import * as i0 from '@angular/core';
// @public (undocumented)
export abstract class AnimationDriver {
// (undocumented)
abstract animate(element: any, keyframes: Array<Map<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;
abstract getParentElement(element: unknown): unknown;
// @deprecated (undocumented)
static NOOP: AnimationDriver;
// (undocumented)
abstract query(element: any, selector: string, multi: boolean): any[];
// (undocumented)
abstract validateAnimatableStyleProperty?: (prop: string) => boolean;
// (undocumented)
abstract validateStyleProperty(prop: string): boolean;
}
// @public
export class NoopAnimationDriver implements AnimationDriver {
// (undocumented)
animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: any[], scrubberAccessRequested?: boolean): AnimationPlayer;
// (undocumented)
computeStyle(element: any, prop: string, defaultValue?: string): string;
// (undocumented)
containsElement(elm1: any, elm2: any): boolean;
// (undocumented)
getParentElement(element: unknown): unknown;
// (undocumented)
query(element: any, selector: string, multi: boolean): any[];
// (undocumented)
validateStyleProperty(prop: string): boolean;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationDriver, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<NoopAnimationDriver>;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2091,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/animations/browser/index.api.md"
} |
angular/goldens/public-api/animations/browser/testing/index.api.md_0_2160 | ## 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 { ɵStyleDataMap } from '@angular/animations';
// @public (undocumented)
export class MockAnimationDriver implements AnimationDriver {
// (undocumented)
animate(element: any, keyframes: Array<ɵStyleDataMap>, 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;
// (undocumented)
getParentElement(element: unknown): unknown;
// (undocumented)
static log: AnimationPlayer[];
// (undocumented)
query(element: any, selector: string, multi: boolean): any[];
// (undocumented)
validateAnimatableStyleProperty(prop: string): boolean;
// (undocumented)
validateStyleProperty(prop: string): boolean;
}
// @public (undocumented)
export class MockAnimationPlayer extends NoopAnimationPlayer {
constructor(element: any, keyframes: Array<ɵStyleDataMap>, duration: number, delay: number, easing: string, previousPlayers: any[]);
// (undocumented)
beforeDestroy(): void;
// (undocumented)
currentSnapshot: ɵStyleDataMap;
// (undocumented)
delay: number;
// (undocumented)
destroy(): void;
// (undocumented)
duration: number;
// (undocumented)
easing: string;
// (undocumented)
element: any;
// (undocumented)
finish(): void;
// (undocumented)
hasStarted(): boolean;
// (undocumented)
keyframes: Array<ɵStyleDataMap>;
// (undocumented)
play(): void;
// (undocumented)
previousPlayers: any[];
// (undocumented)
previousStyles: ɵStyleDataMap;
// (undocumented)
reset(): void;
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2160,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/animations/browser/testing/index.api.md"
} |
angular/goldens/public-api/service-worker/index.api.md_0_3558 | ## 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 { EnvironmentProviders } from '@angular/core';
import * as i0 from '@angular/core';
import { ModuleWithProviders } from '@angular/core';
import { Observable } from 'rxjs';
// @public
export interface NoNewVersionDetectedEvent {
// (undocumented)
type: 'NO_NEW_VERSION_DETECTED';
// (undocumented)
version: {
hash: string;
appData?: Object;
};
}
// @public
export function provideServiceWorker(script: string, options?: SwRegistrationOptions): EnvironmentProviders;
// @public (undocumented)
export class ServiceWorkerModule {
static register(script: string, options?: SwRegistrationOptions): ModuleWithProviders<ServiceWorkerModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ServiceWorkerModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ServiceWorkerModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ServiceWorkerModule, never, never, never>;
}
// @public
export class SwPush {
constructor(sw: NgswCommChannel);
get isEnabled(): boolean;
readonly messages: Observable<object>;
readonly notificationClicks: Observable<{
action: string;
notification: NotificationOptions & {
title: string;
};
}>;
requestSubscription(options: {
serverPublicKey: string;
}): Promise<PushSubscription>;
readonly subscription: Observable<PushSubscription | null>;
unsubscribe(): Promise<void>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SwPush, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<SwPush>;
}
// @public
export abstract class SwRegistrationOptions {
enabled?: boolean;
registrationStrategy?: string | (() => Observable<unknown>);
scope?: string;
}
// @public
export class SwUpdate {
constructor(sw: NgswCommChannel);
activateUpdate(): Promise<boolean>;
checkForUpdate(): Promise<boolean>;
get isEnabled(): boolean;
readonly unrecoverable: Observable<UnrecoverableStateEvent>;
readonly versionUpdates: Observable<VersionEvent>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SwUpdate, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<SwUpdate>;
}
// @public
export interface UnrecoverableStateEvent {
// (undocumented)
reason: string;
// (undocumented)
type: 'UNRECOVERABLE_STATE';
}
// @public
export interface VersionDetectedEvent {
// (undocumented)
type: 'VERSION_DETECTED';
// (undocumented)
version: {
hash: string;
appData?: object;
};
}
// @public
export type VersionEvent = VersionDetectedEvent | VersionInstallationFailedEvent | VersionReadyEvent | NoNewVersionDetectedEvent;
// @public
export interface VersionInstallationFailedEvent {
// (undocumented)
error: string;
// (undocumented)
type: 'VERSION_INSTALLATION_FAILED';
// (undocumented)
version: {
hash: string;
appData?: object;
};
}
// @public
export interface VersionReadyEvent {
// (undocumented)
currentVersion: {
hash: string;
appData?: object;
};
// (undocumented)
latestVersion: {
hash: string;
appData?: object;
};
// (undocumented)
type: 'VERSION_READY';
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 3558,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/service-worker/index.api.md"
} |
angular/goldens/public-api/service-worker/config/index.api.md_0_2195 | ## 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<CacheQueryOptions, 'ignoreSearch'>;
// (undocumented)
installMode?: 'prefetch' | 'lazy';
// (undocumented)
name: string;
// (undocumented)
resources: {
files?: Glob[];
urls?: Glob[];
};
// (undocumented)
updateMode?: 'prefetch' | 'lazy';
}
// @public
export interface Config {
// (undocumented)
appData?: {};
// (undocumented)
applicationMaxAge?: Duration;
// (undocumented)
assetGroups?: AssetGroup[];
// (undocumented)
dataGroups?: DataGroup[];
// (undocumented)
index: string;
// (undocumented)
navigationRequestStrategy?: 'freshness' | 'performance';
// (undocumented)
navigationUrls?: string[];
}
// @public
export interface DataGroup {
// (undocumented)
cacheConfig: {
maxSize: number;
maxAge: Duration;
timeout?: Duration;
refreshAhead?: Duration;
strategy?: 'freshness' | 'performance';
cacheOpaqueResponses?: boolean;
};
// (undocumented)
cacheQueryOptions?: Pick<CacheQueryOptions, 'ignoreSearch'>;
// (undocumented)
name: string;
// (undocumented)
urls: Glob[];
// (undocumented)
version?: number;
}
// @public (undocumented)
export type Duration = string;
// @public
export interface Filesystem {
// (undocumented)
hash(file: string): Promise<string>;
// (undocumented)
list(dir: string): Promise<string[]>;
// (undocumented)
read(file: string): Promise<string>;
// (undocumented)
write(file: string, contents: string): Promise<void>;
}
// @public
class Generator_2 {
constructor(fs: Filesystem, baseHref: string);
// (undocumented)
readonly fs: Filesystem;
// (undocumented)
process(config: Config): Promise<Object>;
}
export { Generator_2 as Generator }
// @public (undocumented)
export type Glob = string;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 2195,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/service-worker/config/index.api.md"
} |
angular/goldens/public-api/platform-browser/index.api.md_0_7912 | ## 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 { ApplicationConfig as ApplicationConfig_2 } from '@angular/core';
import { ApplicationRef } from '@angular/core';
import { ComponentRef } from '@angular/core';
import { DebugElement } from '@angular/core';
import { DebugNode } from '@angular/core';
import { EnvironmentProviders } from '@angular/core';
import { HttpTransferCacheOptions } from '@angular/common/http';
import * as i0 from '@angular/core';
import * as i1 from '@angular/common';
import { InjectionToken } from '@angular/core';
import { NgZone } from '@angular/core';
import { PlatformRef } from '@angular/core';
import { Predicate } from '@angular/core';
import { Provider } 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 @deprecated
export type ApplicationConfig = ApplicationConfig_2;
// @public
export function bootstrapApplication(rootComponent: Type<unknown>, options?: ApplicationConfig): Promise<ApplicationRef>;
// @public
export class BrowserModule {
constructor(providersAlreadyPresent: boolean | null);
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserModule, [{ optional: true; skipSelf: true; }]>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserModule, never, never, [typeof i1.CommonModule, typeof i0.ApplicationModule]>;
}
// @public
export class By {
static all(): Predicate<DebugNode>;
static css(selector: string): Predicate<DebugElement>;
static directive(type: Type<any>): Predicate<DebugNode>;
}
// @public
export function createApplication(options?: ApplicationConfig): Promise<ApplicationRef>;
// @public
export function disableDebugTools(): void;
// @public
export abstract class DomSanitizer implements Sanitizer {
abstract bypassSecurityTrustHtml(value: string): SafeHtml;
abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;
abstract bypassSecurityTrustScript(value: string): SafeScript;
abstract bypassSecurityTrustStyle(value: string): SafeStyle;
abstract bypassSecurityTrustUrl(value: string): SafeUrl;
abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<DomSanitizer, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<DomSanitizer>;
}
// @public
export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
// @public
export const EVENT_MANAGER_PLUGINS: InjectionToken<EventManagerPlugin[]>;
// @public
export class EventManager {
constructor(plugins: EventManagerPlugin[], _zone: NgZone);
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
getZone(): NgZone;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<EventManager, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<EventManager>;
}
// @public
export abstract class EventManagerPlugin {
constructor(_doc: any);
abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
// (undocumented)
manager: EventManager;
abstract supports(eventName: string): boolean;
}
// @public
export const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
// @public
export const HAMMER_LOADER: InjectionToken<HammerLoader>;
// @public
export class HammerGestureConfig {
buildHammer(element: HTMLElement): HammerInstance;
events: string[];
options?: {
cssProps?: any;
domEvents?: boolean;
enable?: boolean | ((manager: any) => boolean);
preset?: any[];
touchAction?: string;
recognizers?: any[];
inputClass?: any;
inputTarget?: EventTarget;
};
overrides: {
[key: string]: Object;
};
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HammerGestureConfig, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<HammerGestureConfig>;
}
// @public
export type HammerLoader = () => Promise<void>;
// @public
export class HammerModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<HammerModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<HammerModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<HammerModule, never, never, never>;
}
// @public
export interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {
// (undocumented)
ɵkind: FeatureKind;
// (undocumented)
ɵproviders: Provider[];
}
// @public
export enum HydrationFeatureKind {
// (undocumented)
EventReplay = 3,
// (undocumented)
HttpTransferCacheOptions = 1,
// (undocumented)
I18nSupport = 2,
// (undocumented)
IncrementalHydration = 4,
// (undocumented)
NoHttpTransferCache = 0
}
// @public
export class Meta {
constructor(_doc: any);
addTag(tag: MetaDefinition, forceCreation?: boolean): HTMLMetaElement | null;
addTags(tags: MetaDefinition[], forceCreation?: boolean): HTMLMetaElement[];
getTag(attrSelector: string): HTMLMetaElement | null;
getTags(attrSelector: string): HTMLMetaElement[];
removeTag(attrSelector: string): void;
removeTagElement(meta: HTMLMetaElement): void;
updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<Meta, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<Meta>;
}
// @public
export type MetaDefinition = {
charset?: string;
content?: string;
httpEquiv?: string;
id?: string;
itemprop?: string;
name?: string;
property?: string;
scheme?: string;
url?: string;
} & {
[prop: string]: string;
};
// @public
export const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
// @public
export function provideClientHydration(...features: HydrationFeature<HydrationFeatureKind>[]): EnvironmentProviders;
// @public
export function provideProtractorTestingSupport(): Provider[];
// @public
export const REMOVE_STYLES_ON_COMPONENT_DESTROY: InjectionToken<boolean>;
// @public
export interface SafeHtml extends SafeValue {
}
// @public
export interface SafeResourceUrl extends SafeValue {
}
// @public
export interface SafeScript extends SafeValue {
}
// @public
export interface SafeStyle extends SafeValue {
}
// @public
export interface SafeUrl extends SafeValue {
}
// @public
export interface SafeValue {
}
// @public
export class Title {
constructor(_doc: any);
getTitle(): string;
setTitle(newTitle: string): void;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<Title, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<Title>;
}
// @public (undocumented)
export const VERSION: Version;
// @public
export function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay>;
// @public
export function withHttpTransferCacheOptions(options: HttpTransferCacheOptions): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions>;
// @public
export function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport>;
// @public
export function withIncrementalHydration(): HydrationFeature<HydrationFeatureKind.IncrementalHydration>;
// @public
export function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache>;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 7912,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser/index.api.md"
} |
angular/goldens/public-api/platform-browser/errors.api.md_0_935 | ## 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 const enum RuntimeErrorCode {
// (undocumented)
ANIMATION_RENDERER_ASYNC_LOADING_FAILURE = 5300,
// (undocumented)
BROWSER_MODULE_ALREADY_LOADED = 5100,
// (undocumented)
NO_PLUGIN_FOR_EVENT = 5101,
// (undocumented)
ROOT_NODE_NOT_FOUND = -5104,
// (undocumented)
SANITIZATION_UNEXPECTED_CTX = 5202,
// (undocumented)
SANITIZATION_UNSAFE_RESOURCE_URL = 5201,
// (undocumented)
SANITIZATION_UNSAFE_SCRIPT = 5200,
// (undocumented)
TESTABILITY_NOT_FOUND = 5103,
// (undocumented)
UNEXPECTED_SYNTHETIC_PROPERTY = 5105,
// (undocumented)
UNSUPPORTED_EVENT_TARGET = 5102,
// (undocumented)
UNSUPPORTED_ZONEJS_INSTANCE = -5000
}
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 935,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser/errors.api.md"
} |
angular/goldens/public-api/platform-browser/testing/index.api.md_0_874 | ## 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 * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser';
import { PlatformRef } from '@angular/core';
import { StaticProvider } from '@angular/core';
// @public
export class BrowserTestingModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserTestingModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserTestingModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserTestingModule, never, never, [typeof i1.BrowserModule]>;
}
// @public
export const platformBrowserTesting: (extraProviders?: StaticProvider[]) => PlatformRef;
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 874,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser/testing/index.api.md"
} |
angular/goldens/public-api/platform-browser/animations/index.api.md_0_1576 | ## 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 { ANIMATION_MODULE_TYPE } from '@angular/core';
import * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser';
import { ModuleWithProviders } from '@angular/core';
import { Provider } from '@angular/core';
export { ANIMATION_MODULE_TYPE }
// @public
export class BrowserAnimationsModule {
static withConfig(config: BrowserAnimationsModuleConfig): ModuleWithProviders<BrowserAnimationsModule>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserAnimationsModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BrowserAnimationsModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserAnimationsModule, never, never, [typeof i1.BrowserModule]>;
}
// @public
export interface BrowserAnimationsModuleConfig {
disableAnimations?: boolean;
}
// @public
export class NoopAnimationsModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationsModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<NoopAnimationsModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<NoopAnimationsModule, never, never, [typeof i1.BrowserModule]>;
}
// @public
export function provideAnimations(): Provider[];
// @public
export function provideNoopAnimations(): Provider[];
// (No @packageDocumentation comment for this package)
```
| {
"end_byte": 1576,
"start_byte": 0,
"url": "https://github.com/angular/angular/blob/main/goldens/public-api/platform-browser/animations/index.api.md"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.