ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to goldens/public-api. Additionally, provides a README in the goldens directory and a script assist in testing the current state of the repo against the goldens as well as a command for accepting all changes to the goldens in a single command. PR Close #35768
This commit is contained in:

committed by
Matias Niemelä

parent
19cfaf7f4c
commit
15f8afa4bf
216
goldens/public-api/animations/animations.d.ts
vendored
Normal file
216
goldens/public-api/animations/animations.d.ts
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
export declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata;
|
||||
|
||||
export declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata;
|
||||
|
||||
export declare interface AnimateChildOptions extends AnimationOptions {
|
||||
duration?: number | string;
|
||||
}
|
||||
|
||||
export declare type AnimateTimings = {
|
||||
duration: number;
|
||||
delay: number;
|
||||
easing: string | null;
|
||||
};
|
||||
|
||||
export declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata;
|
||||
|
||||
export declare interface AnimationAnimateChildMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export declare interface AnimationAnimateMetadata extends AnimationMetadata {
|
||||
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null;
|
||||
timings: string | number | AnimateTimings;
|
||||
}
|
||||
|
||||
export declare interface AnimationAnimateRefMetadata extends AnimationMetadata {
|
||||
animation: AnimationReferenceMetadata;
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export declare abstract class AnimationBuilder {
|
||||
abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;
|
||||
}
|
||||
|
||||
export declare interface AnimationEvent {
|
||||
disabled: boolean;
|
||||
element: any;
|
||||
fromState: string;
|
||||
phaseName: string;
|
||||
toState: string;
|
||||
totalTime: number;
|
||||
triggerName: string;
|
||||
}
|
||||
|
||||
export declare abstract class AnimationFactory {
|
||||
abstract create(element: any, options?: AnimationOptions): AnimationPlayer;
|
||||
}
|
||||
|
||||
export declare interface AnimationGroupMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
steps: AnimationMetadata[];
|
||||
}
|
||||
|
||||
export declare interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
||||
steps: AnimationStyleMetadata[];
|
||||
}
|
||||
|
||||
export declare interface AnimationMetadata {
|
||||
type: AnimationMetadataType;
|
||||
}
|
||||
|
||||
export declare const enum AnimationMetadataType {
|
||||
State = 0,
|
||||
Transition = 1,
|
||||
Sequence = 2,
|
||||
Group = 3,
|
||||
Animate = 4,
|
||||
Keyframes = 5,
|
||||
Style = 6,
|
||||
Trigger = 7,
|
||||
Reference = 8,
|
||||
AnimateChild = 9,
|
||||
AnimateRef = 10,
|
||||
Query = 11,
|
||||
Stagger = 12
|
||||
}
|
||||
|
||||
export declare interface AnimationOptions {
|
||||
delay?: number | string;
|
||||
params?: {
|
||||
[name: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
export declare interface AnimationPlayer {
|
||||
beforeDestroy?: () => any;
|
||||
parentPlayer: AnimationPlayer | null;
|
||||
readonly totalTime: number;
|
||||
destroy(): void;
|
||||
finish(): void;
|
||||
getPosition(): number;
|
||||
hasStarted(): boolean;
|
||||
init(): void;
|
||||
onDestroy(fn: () => void): void;
|
||||
onDone(fn: () => void): void;
|
||||
onStart(fn: () => void): void;
|
||||
pause(): void;
|
||||
play(): void;
|
||||
reset(): void;
|
||||
restart(): void;
|
||||
setPosition(position: any /** TODO #9100 */): void;
|
||||
}
|
||||
|
||||
export declare interface AnimationQueryMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
options: AnimationQueryOptions | null;
|
||||
selector: string;
|
||||
}
|
||||
|
||||
export declare interface AnimationQueryOptions extends AnimationOptions {
|
||||
limit?: number;
|
||||
optional?: boolean;
|
||||
}
|
||||
|
||||
export declare interface AnimationReferenceMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export declare interface AnimationSequenceMetadata extends AnimationMetadata {
|
||||
options: AnimationOptions | null;
|
||||
steps: AnimationMetadata[];
|
||||
}
|
||||
|
||||
export declare interface AnimationStaggerMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
timings: string | number;
|
||||
}
|
||||
|
||||
export declare interface AnimationStateMetadata extends AnimationMetadata {
|
||||
name: string;
|
||||
options?: {
|
||||
params: {
|
||||
[name: string]: any;
|
||||
};
|
||||
};
|
||||
styles: AnimationStyleMetadata;
|
||||
}
|
||||
|
||||
export declare interface AnimationStyleMetadata extends AnimationMetadata {
|
||||
offset: number | null;
|
||||
styles: '*' | {
|
||||
[key: string]: string | number;
|
||||
} | Array<{
|
||||
[key: string]: string | number;
|
||||
} | '*'>;
|
||||
}
|
||||
|
||||
export declare interface AnimationTransitionMetadata extends AnimationMetadata {
|
||||
animation: AnimationMetadata | AnimationMetadata[];
|
||||
expr: string | ((fromState: string, toState: string, element?: any, params?: {
|
||||
[key: string]: any;
|
||||
}) => boolean);
|
||||
options: AnimationOptions | null;
|
||||
}
|
||||
|
||||
export declare interface AnimationTriggerMetadata extends AnimationMetadata {
|
||||
definitions: AnimationMetadata[];
|
||||
name: string;
|
||||
options: {
|
||||
params?: {
|
||||
[name: string]: any;
|
||||
};
|
||||
} | null;
|
||||
}
|
||||
|
||||
export declare const AUTO_STYLE = "*";
|
||||
|
||||
export declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata;
|
||||
|
||||
export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata;
|
||||
|
||||
export declare class NoopAnimationPlayer implements AnimationPlayer {
|
||||
parentPlayer: AnimationPlayer | null;
|
||||
readonly totalTime: number;
|
||||
constructor(duration?: number, delay?: number);
|
||||
destroy(): void;
|
||||
finish(): void;
|
||||
getPosition(): number;
|
||||
hasStarted(): boolean;
|
||||
init(): void;
|
||||
onDestroy(fn: () => void): void;
|
||||
onDone(fn: () => void): void;
|
||||
onStart(fn: () => void): void;
|
||||
pause(): void;
|
||||
play(): void;
|
||||
reset(): void;
|
||||
restart(): void;
|
||||
setPosition(position: number): void;
|
||||
}
|
||||
|
||||
export declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata;
|
||||
|
||||
export declare function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata;
|
||||
|
||||
export declare function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata;
|
||||
|
||||
export declare function state(name: string, styles: AnimationStyleMetadata, options?: {
|
||||
params: {
|
||||
[name: string]: any;
|
||||
};
|
||||
}): AnimationStateMetadata;
|
||||
|
||||
export declare function style(tokens: '*' | {
|
||||
[key: string]: string | number;
|
||||
} | Array<'*' | {
|
||||
[key: string]: string | number;
|
||||
}>): AnimationStyleMetadata;
|
||||
|
||||
export declare function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: {
|
||||
[key: string]: any;
|
||||
}) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata;
|
||||
|
||||
export declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata;
|
||||
|
||||
export declare function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata;
|
11
goldens/public-api/animations/browser/browser.d.ts
vendored
Normal file
11
goldens/public-api/animations/browser/browser.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export declare abstract class AnimationDriver {
|
||||
abstract animate(element: any, keyframes: {
|
||||
[key: string]: string | number;
|
||||
}[], duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any;
|
||||
abstract computeStyle(element: any, prop: string, defaultValue?: string): string;
|
||||
abstract containsElement(elm1: any, elm2: any): boolean;
|
||||
abstract matchesElement(element: any, selector: string): boolean;
|
||||
abstract query(element: any, selector: string, multi: boolean): any[];
|
||||
abstract validateStyleProperty(prop: string): boolean;
|
||||
static NOOP: AnimationDriver;
|
||||
}
|
34
goldens/public-api/animations/browser/testing/testing.d.ts
vendored
Normal file
34
goldens/public-api/animations/browser/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
export declare class MockAnimationDriver implements AnimationDriver {
|
||||
animate(element: any, keyframes: {
|
||||
[key: string]: string | number;
|
||||
}[], duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer;
|
||||
computeStyle(element: any, prop: string, defaultValue?: string): string;
|
||||
containsElement(elm1: any, elm2: any): boolean;
|
||||
matchesElement(element: any, selector: string): boolean;
|
||||
query(element: any, selector: string, multi: boolean): any[];
|
||||
validateStyleProperty(prop: string): boolean;
|
||||
static log: AnimationPlayer[];
|
||||
}
|
||||
|
||||
export declare class MockAnimationPlayer extends NoopAnimationPlayer {
|
||||
currentSnapshot: ɵStyleData;
|
||||
delay: number;
|
||||
duration: number;
|
||||
easing: string;
|
||||
element: any;
|
||||
keyframes: {
|
||||
[key: string]: string | number;
|
||||
}[];
|
||||
previousPlayers: any[];
|
||||
previousStyles: {
|
||||
[key: string]: string | number;
|
||||
};
|
||||
constructor(element: any, keyframes: {
|
||||
[key: string]: string | number;
|
||||
}[], duration: number, delay: number, easing: string, previousPlayers: any[]);
|
||||
beforeDestroy(): void;
|
||||
destroy(): void;
|
||||
finish(): void;
|
||||
hasStarted(): boolean;
|
||||
play(): void;
|
||||
}
|
420
goldens/public-api/common/common.d.ts
vendored
Normal file
420
goldens/public-api/common/common.d.ts
vendored
Normal file
@ -0,0 +1,420 @@
|
||||
export declare const APP_BASE_HREF: InjectionToken<string>;
|
||||
|
||||
export declare class AsyncPipe implements OnDestroy, PipeTransform {
|
||||
constructor(_ref: ChangeDetectorRef);
|
||||
ngOnDestroy(): void;
|
||||
transform<T>(obj: null): null;
|
||||
transform<T>(obj: undefined): undefined;
|
||||
transform<T>(obj: Observable<T> | null | undefined): T | null;
|
||||
transform<T>(obj: Promise<T> | null | undefined): T | null;
|
||||
}
|
||||
|
||||
export declare class CommonModule {
|
||||
}
|
||||
|
||||
export declare class CurrencyPipe implements PipeTransform {
|
||||
constructor(_locale: string, _defaultCurrencyCode?: string);
|
||||
transform(value: any, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
|
||||
}
|
||||
|
||||
export declare class DatePipe implements PipeTransform {
|
||||
constructor(locale: string);
|
||||
transform(value: any, format?: string, timezone?: string, locale?: string): string | null;
|
||||
}
|
||||
|
||||
export declare class DecimalPipe implements PipeTransform {
|
||||
constructor(_locale: string);
|
||||
transform(value: any, digitsInfo?: string, locale?: string): string | null;
|
||||
}
|
||||
|
||||
export declare const DOCUMENT: InjectionToken<Document>;
|
||||
|
||||
export declare function formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string;
|
||||
|
||||
export declare function formatDate(value: string | number | Date, format: string, locale: string, timezone?: string): string;
|
||||
|
||||
export declare function formatNumber(value: number, locale: string, digitsInfo?: string): string;
|
||||
|
||||
export declare function formatPercent(value: number, locale: string, digitsInfo?: string): string;
|
||||
|
||||
export declare enum FormatWidth {
|
||||
Short = 0,
|
||||
Medium = 1,
|
||||
Long = 2,
|
||||
Full = 3
|
||||
}
|
||||
|
||||
export declare enum FormStyle {
|
||||
Format = 0,
|
||||
Standalone = 1
|
||||
}
|
||||
|
||||
export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
|
||||
|
||||
export declare function getLocaleCurrencyCode(locale: string): string | null;
|
||||
|
||||
export declare function getLocaleCurrencyName(locale: string): string | null;
|
||||
|
||||
export declare function getLocaleCurrencySymbol(locale: string): string | null;
|
||||
|
||||
export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string];
|
||||
|
||||
export declare function getLocaleDirection(locale: string): 'ltr' | 'rtl';
|
||||
|
||||
export declare function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string];
|
||||
|
||||
export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
|
||||
|
||||
export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
|
||||
|
||||
export declare function getLocaleId(locale: string): string;
|
||||
|
||||
export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
|
||||
|
||||
export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
|
||||
|
||||
export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
|
||||
|
||||
export declare const getLocalePluralCase: (locale: string) => ((value: number) => Plural);
|
||||
|
||||
export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
|
||||
|
||||
export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
|
||||
|
||||
export declare function getNumberOfCurrencyDigits(code: string): number;
|
||||
|
||||
export declare class HashLocationStrategy extends LocationStrategy {
|
||||
constructor(_platformLocation: PlatformLocation, _baseHref?: string);
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getBaseHref(): string;
|
||||
onPopState(fn: LocationChangeListener): void;
|
||||
path(includeHash?: boolean): string;
|
||||
prepareExternalUrl(internal: string): string;
|
||||
pushState(state: any, title: string, path: string, queryParams: string): void;
|
||||
replaceState(state: any, title: string, path: string, queryParams: string): void;
|
||||
}
|
||||
|
||||
export declare class I18nPluralPipe implements PipeTransform {
|
||||
constructor(_localization: NgLocalization);
|
||||
transform(value: number, pluralMap: {
|
||||
[count: string]: string;
|
||||
}, locale?: string): string;
|
||||
}
|
||||
|
||||
export declare class I18nSelectPipe implements PipeTransform {
|
||||
transform(value: string | null | undefined, mapping: {
|
||||
[key: string]: string;
|
||||
}): string;
|
||||
}
|
||||
|
||||
export declare function isPlatformBrowser(platformId: Object): boolean;
|
||||
|
||||
export declare function isPlatformServer(platformId: Object): boolean;
|
||||
|
||||
export declare function isPlatformWorkerApp(platformId: Object): boolean;
|
||||
|
||||
export declare function isPlatformWorkerUi(platformId: Object): boolean;
|
||||
|
||||
export declare class JsonPipe implements PipeTransform {
|
||||
transform(value: any): string;
|
||||
}
|
||||
|
||||
export declare interface KeyValue<K, V> {
|
||||
key: K;
|
||||
value: V;
|
||||
}
|
||||
|
||||
export declare class KeyValuePipe implements PipeTransform {
|
||||
constructor(differs: KeyValueDiffers);
|
||||
transform<K, V>(input: null, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): null;
|
||||
transform<V>(input: {
|
||||
[key: string]: V;
|
||||
} | Map<string, V>, compareFn?: (a: KeyValue<string, V>, b: KeyValue<string, V>) => number): Array<KeyValue<string, V>>;
|
||||
transform<V>(input: {
|
||||
[key: number]: V;
|
||||
} | Map<number, V>, compareFn?: (a: KeyValue<number, V>, b: KeyValue<number, V>) => number): Array<KeyValue<number, V>>;
|
||||
transform<K, V>(input: Map<K, V>, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): Array<KeyValue<K, V>>;
|
||||
}
|
||||
|
||||
export declare class Location {
|
||||
constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation);
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getState(): unknown;
|
||||
go(path: string, query?: string, state?: any): void;
|
||||
isCurrentPathEqualTo(path: string, query?: string): boolean;
|
||||
normalize(url: string): string;
|
||||
onUrlChange(fn: (url: string, state: unknown) => void): void;
|
||||
path(includeHash?: boolean): string;
|
||||
prepareExternalUrl(url: string): string;
|
||||
replaceState(path: string, query?: string, state?: any): void;
|
||||
subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
|
||||
static joinWithSlash: (start: string, end: string) => string;
|
||||
static normalizeQueryParams: (params: string) => string;
|
||||
static stripTrailingSlash: (url: string) => string;
|
||||
}
|
||||
|
||||
export declare const LOCATION_INITIALIZED: InjectionToken<Promise<any>>;
|
||||
|
||||
export declare interface LocationChangeEvent {
|
||||
state: any;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export declare interface LocationChangeListener {
|
||||
(event: LocationChangeEvent): any;
|
||||
}
|
||||
|
||||
export declare abstract class LocationStrategy {
|
||||
abstract back(): void;
|
||||
abstract forward(): void;
|
||||
abstract getBaseHref(): string;
|
||||
abstract onPopState(fn: LocationChangeListener): void;
|
||||
abstract path(includeHash?: boolean): string;
|
||||
abstract prepareExternalUrl(internal: string): string;
|
||||
abstract pushState(state: any, title: string, url: string, queryParams: string): void;
|
||||
abstract replaceState(state: any, title: string, url: string, queryParams: string): void;
|
||||
}
|
||||
|
||||
export declare class LowerCasePipe implements PipeTransform {
|
||||
transform(value: string): string;
|
||||
}
|
||||
|
||||
export declare class NgClass implements DoCheck {
|
||||
set klass(value: string);
|
||||
set ngClass(value: string | string[] | Set<string> | {
|
||||
[klass: string]: any;
|
||||
});
|
||||
constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
ngComponentOutlet: Type<any>;
|
||||
ngComponentOutletContent: any[][];
|
||||
ngComponentOutletInjector: Injector;
|
||||
ngComponentOutletNgModuleFactory: NgModuleFactory<any>;
|
||||
constructor(_viewContainerRef: ViewContainerRef);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
|
||||
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
|
||||
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
|
||||
set ngForTrackBy(fn: TrackByFunction<T>);
|
||||
get ngForTrackBy(): TrackByFunction<T>;
|
||||
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
|
||||
ngDoCheck(): void;
|
||||
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
|
||||
}
|
||||
|
||||
export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
$implicit: T;
|
||||
count: number;
|
||||
get even(): boolean;
|
||||
get first(): boolean;
|
||||
index: number;
|
||||
get last(): boolean;
|
||||
ngForOf: U;
|
||||
get odd(): boolean;
|
||||
constructor($implicit: T, ngForOf: U, index: number, count: number);
|
||||
}
|
||||
|
||||
export declare class NgIf<T = unknown> {
|
||||
set ngIf(condition: T);
|
||||
set ngIfElse(templateRef: TemplateRef<NgIfContext<T>> | null);
|
||||
set ngIfThen(templateRef: TemplateRef<NgIfContext<T>> | null);
|
||||
constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>);
|
||||
static ngTemplateGuard_ngIf: 'binding';
|
||||
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<NonNullable<T>>;
|
||||
}
|
||||
|
||||
export declare class NgIfContext<T = unknown> {
|
||||
$implicit: T;
|
||||
ngIf: T;
|
||||
}
|
||||
|
||||
export declare class NgLocaleLocalization extends NgLocalization {
|
||||
protected locale: string;
|
||||
constructor(locale: string);
|
||||
getPluralCategory(value: any, locale?: string): string;
|
||||
}
|
||||
|
||||
export declare abstract class NgLocalization {
|
||||
abstract getPluralCategory(value: any, locale?: string): string;
|
||||
}
|
||||
|
||||
export declare class NgPlural {
|
||||
set ngPlural(value: number);
|
||||
constructor(_localization: NgLocalization);
|
||||
addCase(value: string, switchView: SwitchView): void;
|
||||
}
|
||||
|
||||
export declare class NgPluralCase {
|
||||
value: string;
|
||||
constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
|
||||
}
|
||||
|
||||
export declare class NgStyle implements DoCheck {
|
||||
set ngStyle(values: {
|
||||
[klass: string]: any;
|
||||
} | null);
|
||||
constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
export declare class NgSwitch {
|
||||
set ngSwitch(newValue: any);
|
||||
}
|
||||
|
||||
export declare class NgSwitchCase implements DoCheck {
|
||||
ngSwitchCase: any;
|
||||
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
export declare class NgSwitchDefault {
|
||||
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
|
||||
}
|
||||
|
||||
export declare class NgTemplateOutlet implements OnChanges {
|
||||
ngTemplateOutlet: TemplateRef<any> | null;
|
||||
ngTemplateOutletContext: Object | null;
|
||||
constructor(_viewContainerRef: ViewContainerRef);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
}
|
||||
|
||||
export declare enum NumberFormatStyle {
|
||||
Decimal = 0,
|
||||
Percent = 1,
|
||||
Currency = 2,
|
||||
Scientific = 3
|
||||
}
|
||||
|
||||
export declare enum NumberSymbol {
|
||||
Decimal = 0,
|
||||
Group = 1,
|
||||
List = 2,
|
||||
PercentSign = 3,
|
||||
PlusSign = 4,
|
||||
MinusSign = 5,
|
||||
Exponential = 6,
|
||||
SuperscriptingExponent = 7,
|
||||
PerMille = 8,
|
||||
Infinity = 9,
|
||||
NaN = 10,
|
||||
TimeSeparator = 11,
|
||||
CurrencyDecimal = 12,
|
||||
CurrencyGroup = 13
|
||||
}
|
||||
|
||||
export declare class PathLocationStrategy extends LocationStrategy {
|
||||
constructor(_platformLocation: PlatformLocation, href?: string);
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getBaseHref(): string;
|
||||
onPopState(fn: LocationChangeListener): void;
|
||||
path(includeHash?: boolean): string;
|
||||
prepareExternalUrl(internal: string): string;
|
||||
pushState(state: any, title: string, url: string, queryParams: string): void;
|
||||
replaceState(state: any, title: string, url: string, queryParams: string): void;
|
||||
}
|
||||
|
||||
export declare class PercentPipe implements PipeTransform {
|
||||
constructor(_locale: string);
|
||||
transform(value: any, digitsInfo?: string, locale?: string): string | null;
|
||||
}
|
||||
|
||||
export declare abstract class PlatformLocation {
|
||||
abstract get hash(): string;
|
||||
abstract get hostname(): string;
|
||||
abstract get href(): string;
|
||||
abstract get pathname(): string;
|
||||
abstract get port(): string;
|
||||
abstract get protocol(): string;
|
||||
abstract get search(): string;
|
||||
abstract back(): void;
|
||||
abstract forward(): void;
|
||||
abstract getBaseHrefFromDOM(): string;
|
||||
abstract getState(): unknown;
|
||||
abstract onHashChange(fn: LocationChangeListener): void;
|
||||
abstract onPopState(fn: LocationChangeListener): void;
|
||||
abstract pushState(state: any, title: string, url: string): void;
|
||||
abstract replaceState(state: any, title: string, url: string): void;
|
||||
}
|
||||
|
||||
export declare enum Plural {
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Few = 3,
|
||||
Many = 4,
|
||||
Other = 5
|
||||
}
|
||||
|
||||
export declare interface PopStateEvent {
|
||||
pop?: boolean;
|
||||
state?: any;
|
||||
type?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export declare function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void;
|
||||
|
||||
export declare class SlicePipe implements PipeTransform {
|
||||
transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;
|
||||
transform(value: string, start: number, end?: number): string;
|
||||
transform(value: null, start: number, end?: number): null;
|
||||
transform(value: undefined, start: number, end?: number): undefined;
|
||||
}
|
||||
|
||||
export declare type Time = {
|
||||
hours: number;
|
||||
minutes: number;
|
||||
};
|
||||
|
||||
export declare class TitleCasePipe implements PipeTransform {
|
||||
transform(value: string): string;
|
||||
}
|
||||
|
||||
export declare enum TranslationWidth {
|
||||
Narrow = 0,
|
||||
Abbreviated = 1,
|
||||
Wide = 2,
|
||||
Short = 3
|
||||
}
|
||||
|
||||
export declare class UpperCasePipe implements PipeTransform {
|
||||
transform(value: string): string;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
||||
|
||||
export declare 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;
|
||||
static ɵprov: never;
|
||||
}
|
||||
|
||||
export declare enum WeekDay {
|
||||
Sunday = 0,
|
||||
Monday = 1,
|
||||
Tuesday = 2,
|
||||
Wednesday = 3,
|
||||
Thursday = 4,
|
||||
Friday = 5,
|
||||
Saturday = 6
|
||||
}
|
1733
goldens/public-api/common/http/http.d.ts
vendored
Normal file
1733
goldens/public-api/common/http/http.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
43
goldens/public-api/common/http/testing/testing.d.ts
vendored
Normal file
43
goldens/public-api/common/http/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
export declare class HttpClientTestingModule {
|
||||
}
|
||||
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
export declare interface RequestMatch {
|
||||
method?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export declare class TestRequest {
|
||||
get cancelled(): boolean;
|
||||
request: HttpRequest<any>;
|
||||
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
||||
error(error: ErrorEvent, opts?: {
|
||||
headers?: HttpHeaders | {
|
||||
[name: string]: string | string[];
|
||||
};
|
||||
status?: number;
|
||||
statusText?: string;
|
||||
}): void;
|
||||
event(event: HttpEvent<any>): void;
|
||||
flush(body: ArrayBuffer | Blob | string | number | Object | (string | number | Object | null)[] | null, opts?: {
|
||||
headers?: HttpHeaders | {
|
||||
[name: string]: string | string[];
|
||||
};
|
||||
status?: number;
|
||||
statusText?: string;
|
||||
}): void;
|
||||
}
|
64
goldens/public-api/common/testing/testing.d.ts
vendored
Normal file
64
goldens/public-api/common/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
export declare const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken<MockPlatformLocationConfig>;
|
||||
|
||||
export declare class MockLocationStrategy extends LocationStrategy {
|
||||
internalBaseHref: string;
|
||||
internalPath: string;
|
||||
internalTitle: string;
|
||||
urlChanges: string[];
|
||||
constructor();
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getBaseHref(): string;
|
||||
getState(): unknown;
|
||||
onPopState(fn: (value: any) => void): void;
|
||||
path(includeHash?: boolean): string;
|
||||
prepareExternalUrl(internal: string): string;
|
||||
pushState(ctx: any, title: string, path: string, query: string): void;
|
||||
replaceState(ctx: any, title: string, path: string, query: string): void;
|
||||
simulatePopState(url: string): void;
|
||||
}
|
||||
|
||||
export declare class MockPlatformLocation implements PlatformLocation {
|
||||
get hash(): string;
|
||||
get hostname(): string;
|
||||
get href(): string;
|
||||
get pathname(): string;
|
||||
get port(): string;
|
||||
get protocol(): string;
|
||||
get search(): string;
|
||||
get state(): unknown;
|
||||
get url(): string;
|
||||
constructor(config?: MockPlatformLocationConfig);
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getBaseHrefFromDOM(): string;
|
||||
getState(): unknown;
|
||||
onHashChange(fn: LocationChangeListener): void;
|
||||
onPopState(fn: LocationChangeListener): void;
|
||||
pushState(state: any, title: string, newUrl: string): void;
|
||||
replaceState(state: any, title: string, newUrl: string): void;
|
||||
}
|
||||
|
||||
export declare interface MockPlatformLocationConfig {
|
||||
appBaseHref?: string;
|
||||
startUrl?: string;
|
||||
}
|
||||
|
||||
export declare class SpyLocation implements Location {
|
||||
urlChanges: string[];
|
||||
back(): void;
|
||||
forward(): void;
|
||||
getState(): unknown;
|
||||
go(path: string, query?: string, state?: any): void;
|
||||
isCurrentPathEqualTo(path: string, query?: string): boolean;
|
||||
normalize(url: string): string;
|
||||
onUrlChange(fn: (url: string, state: unknown) => void): void;
|
||||
path(): string;
|
||||
prepareExternalUrl(url: string): string;
|
||||
replaceState(path: string, query?: string, state?: any): void;
|
||||
setBaseHref(url: string): void;
|
||||
setInitialPath(url: string): void;
|
||||
simulateHashChange(pathname: string): void;
|
||||
simulateUrlPop(pathname: string): void;
|
||||
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
|
||||
}
|
105
goldens/public-api/common/upgrade/upgrade.d.ts
vendored
Normal file
105
goldens/public-api/common/upgrade/upgrade.d.ts
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
export declare class $locationShim {
|
||||
constructor($injector: any, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy);
|
||||
$$parse(url: string): void;
|
||||
$$parseLinkUrl(url: string, relHref?: string | null): boolean;
|
||||
absUrl(): string;
|
||||
hash(): string;
|
||||
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;
|
||||
path(path: string | number | null): this;
|
||||
port(): number | null;
|
||||
protocol(): string;
|
||||
replace(): this;
|
||||
search(): {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
search(search: string | number | {
|
||||
[key: string]: unknown;
|
||||
}): this;
|
||||
search(search: string | number | {
|
||||
[key: string]: unknown;
|
||||
}, paramValue: null | undefined | string | number | boolean | string[]): this;
|
||||
state(): unknown;
|
||||
state(state: unknown): this;
|
||||
url(): string;
|
||||
url(url: string): this;
|
||||
}
|
||||
|
||||
export declare class $locationShimProvider {
|
||||
constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy);
|
||||
$get(): $locationShim;
|
||||
hashPrefix(prefix?: string): void;
|
||||
html5Mode(mode?: any): void;
|
||||
}
|
||||
|
||||
export declare class AngularJSUrlCodec implements UrlCodec {
|
||||
areEqual(valA: string, valB: string): boolean;
|
||||
decodeHash(hash: string): string;
|
||||
decodePath(path: string, html5Mode?: boolean): string;
|
||||
decodeSearch(search: string): {
|
||||
[k: string]: unknown;
|
||||
};
|
||||
encodeHash(hash: string): string;
|
||||
encodePath(path: string): string;
|
||||
encodeSearch(search: string | {
|
||||
[k: string]: unknown;
|
||||
}): string;
|
||||
normalize(href: string): string;
|
||||
normalize(path: string, search: {
|
||||
[k: string]: unknown;
|
||||
}, hash: string, baseUrl?: string): string;
|
||||
parse(url: string, base?: string): {
|
||||
href: string;
|
||||
protocol: string;
|
||||
host: string;
|
||||
search: string;
|
||||
hash: string;
|
||||
hostname: string;
|
||||
port: string;
|
||||
pathname: string;
|
||||
};
|
||||
}
|
||||
|
||||
export declare const LOCATION_UPGRADE_CONFIGURATION: InjectionToken<LocationUpgradeConfig>;
|
||||
|
||||
export declare interface LocationUpgradeConfig {
|
||||
appBaseHref?: string;
|
||||
hashPrefix?: string;
|
||||
serverBaseHref?: string;
|
||||
urlCodec?: typeof UrlCodec;
|
||||
useHash?: boolean;
|
||||
}
|
||||
|
||||
export declare class LocationUpgradeModule {
|
||||
static config(config?: LocationUpgradeConfig): ModuleWithProviders<LocationUpgradeModule>;
|
||||
}
|
||||
|
||||
export declare 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;
|
||||
};
|
||||
}
|
43
goldens/public-api/compiler-cli/compiler_options.d.ts
vendored
Normal file
43
goldens/public-api/compiler-cli/compiler_options.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
export interface BazelAndG3Options {
|
||||
annotateForClosureCompiler?: boolean;
|
||||
generateDeepReexports?: boolean;
|
||||
}
|
||||
|
||||
export interface I18nOptions {
|
||||
enableI18nLegacyMessageIdFormat?: boolean;
|
||||
i18nInLocale?: string;
|
||||
i18nUseExternalIds?: boolean;
|
||||
}
|
||||
|
||||
export interface LegacyNgcOptions {
|
||||
allowEmptyCodegenFiles?: boolean;
|
||||
flatModuleId?: string;
|
||||
flatModuleOutFile?: string;
|
||||
fullTemplateTypeCheck?: boolean;
|
||||
preserveWhitespaces?: boolean;
|
||||
strictInjectionParameters?: boolean;
|
||||
}
|
||||
|
||||
export interface MiscOptions {
|
||||
compileNonExportedClasses?: boolean;
|
||||
disableTypeScriptVersionCheck?: boolean;
|
||||
}
|
||||
|
||||
export interface NgcCompatibilityOptions {
|
||||
enableIvy?: boolean | 'ngtsc';
|
||||
generateNgFactoryShims?: boolean;
|
||||
generateNgSummaryShims?: boolean;
|
||||
}
|
||||
|
||||
export interface StrictTemplateOptions {
|
||||
strictAttributeTypes?: boolean;
|
||||
strictContextGenerics?: boolean;
|
||||
strictDomEventTypes?: boolean;
|
||||
strictDomLocalRefTypes?: boolean;
|
||||
strictInputTypes?: boolean;
|
||||
strictLiteralTypes?: boolean;
|
||||
strictNullInputTypes?: boolean;
|
||||
strictOutputEventTypes?: boolean;
|
||||
strictSafeNavigationTypes?: boolean;
|
||||
strictTemplates?: boolean;
|
||||
}
|
35
goldens/public-api/compiler-cli/error_code.d.ts
vendored
Normal file
35
goldens/public-api/compiler-cli/error_code.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
export declare enum ErrorCode {
|
||||
DECORATOR_ARG_NOT_LITERAL = 1001,
|
||||
DECORATOR_ARITY_WRONG = 1002,
|
||||
DECORATOR_NOT_CALLED = 1003,
|
||||
DECORATOR_ON_ANONYMOUS_CLASS = 1004,
|
||||
DECORATOR_UNEXPECTED = 1005,
|
||||
DECORATOR_COLLISION = 1006,
|
||||
VALUE_HAS_WRONG_TYPE = 1010,
|
||||
VALUE_NOT_LITERAL = 1011,
|
||||
COMPONENT_MISSING_TEMPLATE = 2001,
|
||||
PIPE_MISSING_NAME = 2002,
|
||||
PARAM_MISSING_TOKEN = 2003,
|
||||
DIRECTIVE_MISSING_SELECTOR = 2004,
|
||||
UNDECORATED_PROVIDER = 2005,
|
||||
DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
|
||||
SYMBOL_NOT_EXPORTED = 3001,
|
||||
SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
|
||||
CONFIG_FLAT_MODULE_NO_INDEX = 4001,
|
||||
CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
|
||||
HOST_BINDING_PARSE_ERROR = 5001,
|
||||
NGMODULE_INVALID_DECLARATION = 6001,
|
||||
NGMODULE_INVALID_IMPORT = 6002,
|
||||
NGMODULE_INVALID_EXPORT = 6003,
|
||||
NGMODULE_INVALID_REEXPORT = 6004,
|
||||
NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
|
||||
NGMODULE_REEXPORT_NAME_COLLISION = 6006,
|
||||
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
|
||||
SCHEMA_INVALID_ELEMENT = 8001,
|
||||
SCHEMA_INVALID_ATTRIBUTE = 8002,
|
||||
MISSING_REFERENCE_TARGET = 8003,
|
||||
MISSING_PIPE = 8004,
|
||||
WRITE_TO_READ_ONLY_VARIABLE = 8005,
|
||||
DUPLICATE_VARIABLE_DECLARATION = 8006,
|
||||
INJECTABLE_DUPLICATE_PROV = 9001
|
||||
}
|
1452
goldens/public-api/core/core.d.ts
vendored
Normal file
1452
goldens/public-api/core/core.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
25
goldens/public-api/core/global_utils.d.ts
vendored
Normal file
25
goldens/public-api/core/global_utils.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
export declare function applyChanges(component: {}): void;
|
||||
|
||||
export declare function getComponent<T>(element: Element): T | null;
|
||||
|
||||
export declare function getContext<T>(element: Element): T | null;
|
||||
|
||||
export declare function getDirectives(element: Element): {}[];
|
||||
|
||||
export declare function getHostElement(componentOrDirective: {}): Element;
|
||||
|
||||
export declare function getInjector(elementOrDir: Element | {}): Injector;
|
||||
|
||||
export declare function getListeners(element: Element): Listener[];
|
||||
|
||||
export declare function getOwningComponent<T>(elementOrDir: Element | {}): T | null;
|
||||
|
||||
export declare function getRootComponents(elementOrDir: Element | {}): {}[];
|
||||
|
||||
export interface Listener {
|
||||
callback: (value: any) => any;
|
||||
element: Element;
|
||||
name: string;
|
||||
type: 'dom' | 'output';
|
||||
useCapture: boolean;
|
||||
}
|
142
goldens/public-api/core/testing/testing.d.ts
vendored
Normal file
142
goldens/public-api/core/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
export declare function async(fn: Function): (done: any) => any;
|
||||
|
||||
export declare class ComponentFixture<T> {
|
||||
changeDetectorRef: ChangeDetectorRef;
|
||||
componentInstance: T;
|
||||
componentRef: ComponentRef<T>;
|
||||
debugElement: DebugElement;
|
||||
elementRef: ElementRef;
|
||||
nativeElement: any;
|
||||
ngZone: NgZone | null;
|
||||
constructor(componentRef: ComponentRef<T>, ngZone: NgZone | null, _autoDetect: boolean);
|
||||
autoDetectChanges(autoDetect?: boolean): void;
|
||||
checkNoChanges(): void;
|
||||
destroy(): void;
|
||||
detectChanges(checkNoChanges?: boolean): void;
|
||||
isStable(): boolean;
|
||||
whenRenderingDone(): Promise<any>;
|
||||
whenStable(): Promise<any>;
|
||||
}
|
||||
|
||||
export declare const ComponentFixtureAutoDetect: InjectionToken<boolean[]>;
|
||||
|
||||
export declare const ComponentFixtureNoNgZone: InjectionToken<boolean[]>;
|
||||
|
||||
export declare function discardPeriodicTasks(): void;
|
||||
|
||||
export declare function fakeAsync(fn: Function): (...args: any[]) => any;
|
||||
|
||||
export declare function flush(maxTurns?: number): number;
|
||||
|
||||
export declare function flushMicrotasks(): void;
|
||||
|
||||
export declare const getTestBed: () => TestBed;
|
||||
|
||||
export declare function inject(tokens: any[], fn: Function): () => any;
|
||||
|
||||
export declare class InjectSetupWrapper {
|
||||
constructor(_moduleDef: () => TestModuleMetadata);
|
||||
inject(tokens: any[], fn: Function): () => any;
|
||||
}
|
||||
|
||||
export declare type MetadataOverride<T> = {
|
||||
add?: Partial<T>;
|
||||
remove?: Partial<T>;
|
||||
set?: Partial<T>;
|
||||
};
|
||||
|
||||
export declare function resetFakeAsyncZone(): void;
|
||||
|
||||
export declare interface TestBed {
|
||||
ngModule: Type<any> | Type<any>[];
|
||||
platform: PlatformRef;
|
||||
compileComponents(): Promise<any>;
|
||||
configureCompiler(config: {
|
||||
providers?: any[];
|
||||
useJit?: boolean;
|
||||
}): void;
|
||||
configureTestingModule(moduleDef: TestModuleMetadata): void;
|
||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||
execute(tokens: any[], fn: Function, context?: any): any;
|
||||
/** @deprecated */ get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
/** @deprecated */ get(token: any, notFoundValue?: any): any;
|
||||
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
||||
overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
|
||||
overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;
|
||||
overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;
|
||||
overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;
|
||||
overrideProvider(token: any, provider: {
|
||||
useFactory: Function;
|
||||
deps: any[];
|
||||
}): void;
|
||||
overrideProvider(token: any, provider: {
|
||||
useValue: any;
|
||||
}): void;
|
||||
overrideProvider(token: any, provider: {
|
||||
useFactory?: Function;
|
||||
useValue?: any;
|
||||
deps?: any[];
|
||||
}): void;
|
||||
overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;
|
||||
resetTestEnvironment(): void;
|
||||
resetTestingModule(): void;
|
||||
}
|
||||
|
||||
export declare const TestBed: TestBedStatic;
|
||||
|
||||
export declare interface TestBedStatic {
|
||||
new (...args: any[]): TestBed;
|
||||
compileComponents(): Promise<any>;
|
||||
configureCompiler(config: {
|
||||
providers?: any[];
|
||||
useJit?: boolean;
|
||||
}): TestBedStatic;
|
||||
configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
|
||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||
/** @deprecated */ get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
/** @deprecated */ get(token: any, notFoundValue?: any): any;
|
||||
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
||||
overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;
|
||||
overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;
|
||||
overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;
|
||||
overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;
|
||||
overrideProvider(token: any, provider: {
|
||||
useFactory: Function;
|
||||
deps: any[];
|
||||
}): TestBedStatic;
|
||||
overrideProvider(token: any, provider: {
|
||||
useValue: any;
|
||||
}): TestBedStatic;
|
||||
overrideProvider(token: any, provider: {
|
||||
useFactory?: Function;
|
||||
useValue?: any;
|
||||
deps?: any[];
|
||||
}): TestBedStatic;
|
||||
overrideTemplate(component: Type<any>, template: string): TestBedStatic;
|
||||
overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
|
||||
resetTestEnvironment(): void;
|
||||
resetTestingModule(): TestBedStatic;
|
||||
}
|
||||
|
||||
export declare class TestComponentRenderer {
|
||||
insertRootElement(rootElementId: string): void;
|
||||
}
|
||||
|
||||
export declare type TestModuleMetadata = {
|
||||
providers?: any[];
|
||||
declarations?: any[];
|
||||
imports?: any[];
|
||||
schemas?: Array<SchemaMetadata | any[]>;
|
||||
aotSummaries?: () => any[];
|
||||
};
|
||||
|
||||
export declare function tick(millis?: number, tickOptions?: {
|
||||
processNewMacroTasksSynchronously: boolean;
|
||||
}): void;
|
||||
|
||||
export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;
|
||||
export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;
|
42
goldens/public-api/elements/elements.d.ts
vendored
Normal file
42
goldens/public-api/elements/elements.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export declare function createCustomElement<P>(component: Type<any>, config: NgElementConfig): NgElementConstructor<P>;
|
||||
|
||||
export declare abstract class NgElement extends HTMLElement {
|
||||
protected ngElementEventsSubscription: Subscription | null;
|
||||
protected ngElementStrategy: NgElementStrategy;
|
||||
abstract attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string, namespace?: string): void;
|
||||
abstract connectedCallback(): void;
|
||||
abstract disconnectedCallback(): void;
|
||||
}
|
||||
|
||||
export declare interface NgElementConfig {
|
||||
injector: Injector;
|
||||
strategyFactory?: NgElementStrategyFactory;
|
||||
}
|
||||
|
||||
export declare interface NgElementConstructor<P> {
|
||||
readonly observedAttributes: string[];
|
||||
new (injector?: Injector): NgElement & WithProperties<P>;
|
||||
}
|
||||
|
||||
export declare interface NgElementStrategy {
|
||||
events: Observable<NgElementStrategyEvent>;
|
||||
connect(element: HTMLElement): void;
|
||||
disconnect(): void;
|
||||
getInputValue(propName: string): any;
|
||||
setInputValue(propName: string, value: string): void;
|
||||
}
|
||||
|
||||
export declare interface NgElementStrategyEvent {
|
||||
name: string;
|
||||
value: any;
|
||||
}
|
||||
|
||||
export declare interface NgElementStrategyFactory {
|
||||
create(injector: Injector): NgElementStrategy;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
||||
|
||||
export declare type WithProperties<P> = {
|
||||
[property in keyof P]: P[property];
|
||||
};
|
541
goldens/public-api/forms/forms.d.ts
vendored
Normal file
541
goldens/public-api/forms/forms.d.ts
vendored
Normal file
@ -0,0 +1,541 @@
|
||||
export declare abstract class AbstractControl {
|
||||
asyncValidator: AsyncValidatorFn | null;
|
||||
get dirty(): boolean;
|
||||
get disabled(): boolean;
|
||||
get enabled(): boolean;
|
||||
readonly errors: ValidationErrors | null;
|
||||
get invalid(): boolean;
|
||||
get parent(): FormGroup | FormArray;
|
||||
get pending(): boolean;
|
||||
readonly pristine: boolean;
|
||||
get root(): AbstractControl;
|
||||
readonly status: string;
|
||||
readonly statusChanges: Observable<any>;
|
||||
readonly touched: boolean;
|
||||
get untouched(): boolean;
|
||||
get updateOn(): FormHooks;
|
||||
get valid(): boolean;
|
||||
validator: ValidatorFn | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any>;
|
||||
constructor(validator: ValidatorFn | null, asyncValidator: AsyncValidatorFn | null);
|
||||
clearAsyncValidators(): void;
|
||||
clearValidators(): void;
|
||||
disable(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
enable(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
get(path: Array<string | number> | string): AbstractControl | null;
|
||||
getError(errorCode: string, path?: Array<string | number> | string): any;
|
||||
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
|
||||
markAllAsTouched(): void;
|
||||
markAsDirty(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsPending(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
markAsPristine(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsTouched(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsUntouched(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
abstract patchValue(value: any, options?: Object): void;
|
||||
abstract reset(value?: any, options?: Object): void;
|
||||
setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[] | null): void;
|
||||
setErrors(errors: ValidationErrors | null, opts?: {
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
setParent(parent: FormGroup | FormArray): void;
|
||||
setValidators(newValidator: ValidatorFn | ValidatorFn[] | null): void;
|
||||
abstract setValue(value: any, options?: Object): void;
|
||||
updateValueAndValidity(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
}
|
||||
|
||||
export declare abstract class AbstractControlDirective {
|
||||
abstract get control(): AbstractControl | null;
|
||||
get dirty(): boolean | null;
|
||||
get disabled(): boolean | null;
|
||||
get enabled(): boolean | null;
|
||||
get errors(): ValidationErrors | null;
|
||||
get invalid(): boolean | null;
|
||||
get path(): string[] | null;
|
||||
get pending(): boolean | null;
|
||||
get pristine(): boolean | null;
|
||||
get status(): string | null;
|
||||
get statusChanges(): Observable<any> | null;
|
||||
get touched(): boolean | null;
|
||||
get untouched(): boolean | null;
|
||||
get valid(): boolean | null;
|
||||
get value(): any;
|
||||
get valueChanges(): Observable<any> | null;
|
||||
getError(errorCode: string, path?: Array<string | number> | string): any;
|
||||
hasError(errorCode: string, path?: Array<string | number> | string): boolean;
|
||||
reset(value?: any): void;
|
||||
}
|
||||
|
||||
export declare interface AbstractControlOptions {
|
||||
asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null;
|
||||
updateOn?: 'change' | 'blur' | 'submit';
|
||||
validators?: ValidatorFn | ValidatorFn[] | null;
|
||||
}
|
||||
|
||||
export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormGroup;
|
||||
get formDirective(): Form | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export declare interface AsyncValidator extends Validator {
|
||||
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
||||
}
|
||||
|
||||
export declare interface AsyncValidatorFn {
|
||||
(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
||||
}
|
||||
|
||||
export declare class CheckboxControlValueAccessor implements ControlValueAccessor {
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef);
|
||||
registerOnChange(fn: (_: any) => {}): void;
|
||||
registerOnTouched(fn: () => {}): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare class CheckboxRequiredValidator extends RequiredValidator {
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
|
||||
|
||||
export declare abstract class ControlContainer extends AbstractControlDirective {
|
||||
get formDirective(): Form | null;
|
||||
name: string | number | null;
|
||||
get path(): string[] | null;
|
||||
}
|
||||
|
||||
export declare interface ControlValueAccessor {
|
||||
registerOnChange(fn: any): void;
|
||||
registerOnTouched(fn: any): void;
|
||||
setDisabledState?(isDisabled: boolean): void;
|
||||
writeValue(obj: any): void;
|
||||
}
|
||||
|
||||
export declare class DefaultValueAccessor implements ControlValueAccessor {
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef, _compositionMode: boolean);
|
||||
registerOnChange(fn: (_: any) => void): void;
|
||||
registerOnTouched(fn: () => void): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare class EmailValidator implements Validator {
|
||||
set email(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
export declare class FormArray extends AbstractControl {
|
||||
controls: AbstractControl[];
|
||||
get length(): number;
|
||||
constructor(controls: AbstractControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
at(index: number): AbstractControl;
|
||||
clear(): void;
|
||||
getRawValue(): any[];
|
||||
insert(index: number, control: AbstractControl): void;
|
||||
patchValue(value: any[], options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
push(control: AbstractControl): void;
|
||||
removeAt(index: number): void;
|
||||
reset(value?: any, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
setControl(index: number, control: AbstractControl): void;
|
||||
setValue(value: any[], options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
}
|
||||
|
||||
export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy {
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormArray;
|
||||
get formDirective(): FormGroupDirective | null;
|
||||
name: string | number | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export declare class FormBuilder {
|
||||
array(controlsConfig: any[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormArray;
|
||||
control(formState: any, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl;
|
||||
group(controlsConfig: {
|
||||
[key: string]: any;
|
||||
}, options?: AbstractControlOptions | {
|
||||
[key: string]: any;
|
||||
} | null): FormGroup;
|
||||
}
|
||||
|
||||
export declare class FormControl extends AbstractControl {
|
||||
constructor(formState?: any, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
patchValue(value: any, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
emitModelToViewChange?: boolean;
|
||||
emitViewToModelChange?: boolean;
|
||||
}): void;
|
||||
registerOnChange(fn: Function): void;
|
||||
registerOnDisabledChange(fn: (isDisabled: boolean) => void): void;
|
||||
reset(formState?: any, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
setValue(value: any, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
emitModelToViewChange?: boolean;
|
||||
emitViewToModelChange?: boolean;
|
||||
}): void;
|
||||
}
|
||||
|
||||
export declare class FormControlDirective extends NgControl implements OnChanges {
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormControl;
|
||||
form: FormControl;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
|
||||
export declare class FormControlName extends NgControl implements OnChanges, OnDestroy {
|
||||
get asyncValidator(): AsyncValidatorFn;
|
||||
readonly control: FormControl;
|
||||
get formDirective(): any;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
name: string | number | null;
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
get validator(): ValidatorFn | null;
|
||||
constructor(parent: ControlContainer, validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
|
||||
export declare class FormGroup extends AbstractControl {
|
||||
controls: {
|
||||
[key: string]: AbstractControl;
|
||||
};
|
||||
constructor(controls: {
|
||||
[key: string]: AbstractControl;
|
||||
}, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
addControl(name: string, control: AbstractControl): void;
|
||||
contains(controlName: string): boolean;
|
||||
getRawValue(): any;
|
||||
patchValue(value: {
|
||||
[key: string]: any;
|
||||
}, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
registerControl(name: string, control: AbstractControl): AbstractControl;
|
||||
removeControl(name: string): void;
|
||||
reset(value?: any, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
setControl(name: string, control: AbstractControl): void;
|
||||
setValue(value: {
|
||||
[key: string]: any;
|
||||
}, options?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
}
|
||||
|
||||
export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges {
|
||||
get control(): FormGroup;
|
||||
directives: FormControlName[];
|
||||
form: FormGroup;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(_validators: any[], _asyncValidators: any[]);
|
||||
addControl(dir: FormControlName): FormControl;
|
||||
addFormArray(dir: FormArrayName): void;
|
||||
addFormGroup(dir: FormGroupName): void;
|
||||
getControl(dir: FormControlName): FormControl;
|
||||
getFormArray(dir: FormArrayName): FormArray;
|
||||
getFormGroup(dir: FormGroupName): FormGroup;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
onReset(): void;
|
||||
onSubmit($event: Event): boolean;
|
||||
removeControl(dir: FormControlName): void;
|
||||
removeFormArray(dir: FormArrayName): void;
|
||||
removeFormGroup(dir: FormGroupName): void;
|
||||
resetForm(value?: any): void;
|
||||
updateModel(dir: FormControlName, value: any): void;
|
||||
}
|
||||
|
||||
export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
|
||||
name: string | number | null;
|
||||
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
||||
}
|
||||
|
||||
export declare class FormsModule {
|
||||
}
|
||||
|
||||
export declare class MaxLengthValidator implements Validator, OnChanges {
|
||||
maxlength: string | number;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class MinLengthValidator implements Validator, OnChanges {
|
||||
minlength: string | number;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare const NG_ASYNC_VALIDATORS: InjectionToken<(Function | Validator)[]>;
|
||||
|
||||
export declare const NG_VALIDATORS: InjectionToken<(Function | Validator)[]>;
|
||||
|
||||
export declare const NG_VALUE_ACCESSOR: InjectionToken<ControlValueAccessor>;
|
||||
|
||||
export declare abstract class NgControl extends AbstractControlDirective {
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
name: string | number | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
valueAccessor: ControlValueAccessor | null;
|
||||
abstract viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
|
||||
export declare class NgControlStatus extends ɵangular_packages_forms_forms_g {
|
||||
constructor(cd: NgControl);
|
||||
}
|
||||
|
||||
export declare class NgControlStatusGroup extends ɵangular_packages_forms_forms_g {
|
||||
constructor(cd: ControlContainer);
|
||||
}
|
||||
|
||||
export declare class NgForm extends ControlContainer implements Form, AfterViewInit {
|
||||
get control(): FormGroup;
|
||||
get controls(): {
|
||||
[key: string]: AbstractControl;
|
||||
};
|
||||
form: FormGroup;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
options: {
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(validators: any[], asyncValidators: any[]);
|
||||
addControl(dir: NgModel): void;
|
||||
addFormGroup(dir: NgModelGroup): void;
|
||||
getControl(dir: NgModel): FormControl;
|
||||
getFormGroup(dir: NgModelGroup): FormGroup;
|
||||
ngAfterViewInit(): void;
|
||||
onReset(): void;
|
||||
onSubmit($event: Event): boolean;
|
||||
removeControl(dir: NgModel): void;
|
||||
removeFormGroup(dir: NgModelGroup): void;
|
||||
resetForm(value?: any): void;
|
||||
setValue(value: {
|
||||
[key: string]: any;
|
||||
}): void;
|
||||
updateModel(dir: NgControl, value: any): void;
|
||||
}
|
||||
|
||||
export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
readonly control: FormControl;
|
||||
get formDirective(): any;
|
||||
isDisabled: boolean;
|
||||
model: any;
|
||||
name: string;
|
||||
options: {
|
||||
name?: string;
|
||||
standalone?: boolean;
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
get path(): string[];
|
||||
update: EventEmitter<any>;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(parent: ControlContainer, validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[]);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
viewToModelUpdate(newValue: any): void;
|
||||
static ngAcceptInputType_isDisabled: boolean | string;
|
||||
}
|
||||
|
||||
export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {
|
||||
name: string;
|
||||
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
||||
}
|
||||
|
||||
export declare class NgSelectOption implements OnDestroy {
|
||||
id: string;
|
||||
set ngValue(value: any);
|
||||
set value(value: any);
|
||||
constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor);
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
export declare class NumberValueAccessor implements ControlValueAccessor {
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef);
|
||||
registerOnChange(fn: (_: number | null) => void): void;
|
||||
registerOnTouched(fn: () => void): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: number): void;
|
||||
}
|
||||
|
||||
export declare class PatternValidator implements Validator, OnChanges {
|
||||
pattern: string | RegExp;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class RadioControlValueAccessor implements ControlValueAccessor, OnDestroy, OnInit {
|
||||
formControlName: string;
|
||||
name: string;
|
||||
onChange: () => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef, _registry: ɵangular_packages_forms_forms_n, _injector: Injector);
|
||||
fireUncheck(value: any): void;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
registerOnChange(fn: (_: any) => {}): void;
|
||||
registerOnTouched(fn: () => {}): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare class RangeValueAccessor implements ControlValueAccessor {
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef);
|
||||
registerOnChange(fn: (_: number | null) => void): void;
|
||||
registerOnTouched(fn: () => void): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare class ReactiveFormsModule {
|
||||
static withConfig(opts: { warnOnNgModelWithFormControl: 'never' | 'once' | 'always';
|
||||
}): ModuleWithProviders<ReactiveFormsModule>;
|
||||
}
|
||||
|
||||
export declare class RequiredValidator implements Validator {
|
||||
get required(): boolean | string;
|
||||
set required(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class SelectControlValueAccessor implements ControlValueAccessor {
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef);
|
||||
registerOnChange(fn: (value: any) => any): void;
|
||||
registerOnTouched(fn: () => any): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor {
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
constructor(_renderer: Renderer2, _elementRef: ElementRef);
|
||||
registerOnChange(fn: (value: any) => any): void;
|
||||
registerOnTouched(fn: () => any): void;
|
||||
setDisabledState(isDisabled: boolean): void;
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
export declare type ValidationErrors = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export declare interface Validator {
|
||||
registerOnValidatorChange?(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare interface ValidatorFn {
|
||||
(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class Validators {
|
||||
static compose(validators: null): null;
|
||||
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;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
259
goldens/public-api/http/http.d.ts
vendored
Normal file
259
goldens/public-api/http/http.d.ts
vendored
Normal file
@ -0,0 +1,259 @@
|
||||
/** @deprecated */
|
||||
export declare class BaseRequestOptions extends RequestOptions {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class BaseResponseOptions extends ResponseOptions {
|
||||
constructor();
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class BrowserXhr {
|
||||
constructor();
|
||||
build(): any;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare abstract class Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
response: any;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare abstract class ConnectionBackend {
|
||||
abstract createConnection(request: any): Connection;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class CookieXSRFStrategy implements XSRFStrategy {
|
||||
constructor(_cookieName?: string, _headerName?: string);
|
||||
configureRequest(req: Request): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Headers {
|
||||
constructor(headers?: Headers | {
|
||||
[name: string]: any;
|
||||
} | null);
|
||||
append(name: string, value: string): void;
|
||||
delete(name: string): void;
|
||||
entries(): void;
|
||||
forEach(fn: (values: string[], name: string | undefined, headers: Map<string, string[]>) => void): void;
|
||||
get(name: string): string | null;
|
||||
getAll(name: string): string[] | null;
|
||||
has(name: string): boolean;
|
||||
keys(): string[];
|
||||
set(name: string, value: string | string[]): void;
|
||||
toJSON(): {
|
||||
[name: string]: any;
|
||||
};
|
||||
values(): string[][];
|
||||
static fromResponseHeaderString(headersString: string): Headers;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Http {
|
||||
protected _backend: ConnectionBackend;
|
||||
protected _defaultOptions: RequestOptions;
|
||||
constructor(_backend: ConnectionBackend, _defaultOptions: RequestOptions);
|
||||
delete(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
||||
get(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
||||
head(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
||||
options(url: string, options?: RequestOptionsArgs): Observable<Response>;
|
||||
patch(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
||||
post(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
||||
put(url: string, body: any, options?: RequestOptionsArgs): Observable<Response>;
|
||||
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class HttpModule {
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Jsonp extends Http {
|
||||
constructor(backend: ConnectionBackend, defaultOptions: RequestOptions);
|
||||
request(url: string | Request, options?: RequestOptionsArgs): Observable<Response>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class JSONPBackend extends ConnectionBackend {
|
||||
createConnection(request: Request): JSONPConnection;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class JSONPConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
response: Observable<Response>;
|
||||
finished(data?: any): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class JsonpModule {
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class QueryEncoder {
|
||||
encodeKey(key: string): string;
|
||||
encodeValue(value: string): string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare enum ReadyState {
|
||||
Unsent = 0,
|
||||
Open = 1,
|
||||
HeadersReceived = 2,
|
||||
Loading = 3,
|
||||
Done = 4,
|
||||
Cancelled = 5
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Request extends ɵangular_packages_http_http_f {
|
||||
headers: Headers;
|
||||
method: RequestMethod;
|
||||
responseType: ResponseContentType;
|
||||
url: string;
|
||||
withCredentials: boolean;
|
||||
constructor(requestOptions: ɵangular_packages_http_http_d);
|
||||
detectContentType(): ContentType;
|
||||
detectContentTypeFromBody(): ContentType;
|
||||
getBody(): any;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare enum RequestMethod {
|
||||
Get = 0,
|
||||
Post = 1,
|
||||
Put = 2,
|
||||
Delete = 3,
|
||||
Options = 4,
|
||||
Head = 5,
|
||||
Patch = 6
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class RequestOptions {
|
||||
body: any;
|
||||
headers: Headers | null;
|
||||
method: RequestMethod | string | null;
|
||||
params: URLSearchParams;
|
||||
responseType: ResponseContentType | null;
|
||||
/** @deprecated */ get search(): URLSearchParams;
|
||||
/** @deprecated */ set search(params: URLSearchParams);
|
||||
url: string | null;
|
||||
withCredentials: boolean | null;
|
||||
constructor(opts?: RequestOptionsArgs);
|
||||
merge(options?: RequestOptionsArgs): RequestOptions;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare interface RequestOptionsArgs {
|
||||
body?: any;
|
||||
headers?: Headers | null;
|
||||
method?: string | RequestMethod | null;
|
||||
params?: string | URLSearchParams | {
|
||||
[key: string]: any | any[];
|
||||
} | null;
|
||||
responseType?: ResponseContentType | null;
|
||||
/** @deprecated */ search?: string | URLSearchParams | {
|
||||
[key: string]: any | any[];
|
||||
} | null;
|
||||
url?: string | null;
|
||||
withCredentials?: boolean | null;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class Response extends ɵangular_packages_http_http_f {
|
||||
bytesLoaded: number;
|
||||
headers: Headers | null;
|
||||
ok: boolean;
|
||||
status: number;
|
||||
statusText: string | null;
|
||||
totalBytes: number;
|
||||
type: ResponseType;
|
||||
url: string;
|
||||
constructor(responseOptions: ResponseOptions);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare enum ResponseContentType {
|
||||
Text = 0,
|
||||
Json = 1,
|
||||
ArrayBuffer = 2,
|
||||
Blob = 3
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ResponseOptions {
|
||||
body: string | Object | ArrayBuffer | Blob | null;
|
||||
headers: Headers | null;
|
||||
status: number | null;
|
||||
url: string | null;
|
||||
constructor(opts?: ResponseOptionsArgs);
|
||||
merge(options?: ResponseOptionsArgs): ResponseOptions;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare interface ResponseOptionsArgs {
|
||||
body?: string | Object | FormData | ArrayBuffer | Blob | null;
|
||||
headers?: Headers | null;
|
||||
status?: number | null;
|
||||
statusText?: string | null;
|
||||
type?: ResponseType | null;
|
||||
url?: string | null;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare enum ResponseType {
|
||||
Basic = 0,
|
||||
Cors = 1,
|
||||
Default = 2,
|
||||
Error = 3,
|
||||
Opaque = 4
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class URLSearchParams {
|
||||
paramsMap: Map<string, string[]>;
|
||||
rawParams: string;
|
||||
constructor(rawParams?: string, queryEncoder?: QueryEncoder);
|
||||
append(param: string, val: string): void;
|
||||
appendAll(searchParams: URLSearchParams): void;
|
||||
clone(): URLSearchParams;
|
||||
delete(param: string): void;
|
||||
get(param: string): string | null;
|
||||
getAll(param: string): string[];
|
||||
has(param: string): boolean;
|
||||
replaceAll(searchParams: URLSearchParams): void;
|
||||
set(param: string, val: string): void;
|
||||
setAll(searchParams: URLSearchParams): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare const VERSION: Version;
|
||||
|
||||
/** @deprecated */
|
||||
export declare class XHRBackend implements ConnectionBackend {
|
||||
constructor(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions, _xsrfStrategy: XSRFStrategy);
|
||||
createConnection(request: Request): XHRConnection;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class XHRConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
response: Observable<Response>;
|
||||
constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions);
|
||||
setDetectedContentType(req: any /** TODO Request */, _xhr: any /** XMLHttpRequest */): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare abstract class XSRFStrategy {
|
||||
abstract configureRequest(req: Request): void;
|
||||
}
|
21
goldens/public-api/http/testing/testing.d.ts
vendored
Normal file
21
goldens/public-api/http/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/** @deprecated */
|
||||
export declare class MockBackend implements ConnectionBackend {
|
||||
connections: any;
|
||||
connectionsArray: MockConnection[];
|
||||
pendingConnections: any;
|
||||
constructor();
|
||||
createConnection(req: Request): MockConnection;
|
||||
resolveAllConnections(): void;
|
||||
verifyNoPendingRequests(): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class MockConnection implements Connection {
|
||||
readyState: ReadyState;
|
||||
request: Request;
|
||||
response: ReplaySubject<Response>;
|
||||
constructor(req: Request);
|
||||
mockDownload(res: Response): void;
|
||||
mockError(err?: Error): void;
|
||||
mockRespond(res: Response): void;
|
||||
}
|
3
goldens/public-api/localize/index.d.ts
vendored
Normal file
3
goldens/public-api/localize/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export declare function clearTranslations(): void;
|
||||
|
||||
export declare function loadTranslations(translations: Record<MessageId, TargetMessage>): void;
|
0
goldens/public-api/localize/init/index.d.ts
vendored
Normal file
0
goldens/public-api/localize/init/index.d.ts
vendored
Normal file
54
goldens/public-api/manage.js
Normal file
54
goldens/public-api/manage.js
Normal file
@ -0,0 +1,54 @@
|
||||
const {exec} = require('shelljs');
|
||||
const minimist = require('minimist');
|
||||
|
||||
// Remove all command line flags from the arguments.
|
||||
const argv = minimist(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;
|
||||
}
|
9
goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts
vendored
Normal file
9
goldens/public-api/platform-browser-dynamic/platform-browser-dynamic.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export declare class JitCompilerFactory implements CompilerFactory {
|
||||
createCompiler(options?: CompilerOptions[]): Compiler;
|
||||
}
|
||||
|
||||
export declare const platformBrowserDynamic: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare const RESOURCE_CACHE_PROVIDER: Provider[];
|
||||
|
||||
export declare const VERSION: Version;
|
4
goldens/public-api/platform-browser-dynamic/testing/testing.d.ts
vendored
Normal file
4
goldens/public-api/platform-browser-dynamic/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export declare class BrowserDynamicTestingModule {
|
||||
}
|
||||
|
||||
export declare const platformBrowserDynamicTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
7
goldens/public-api/platform-browser/animations/animations.d.ts
vendored
Normal file
7
goldens/public-api/platform-browser/animations/animations.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
|
||||
|
||||
export declare class BrowserAnimationsModule {
|
||||
}
|
||||
|
||||
export declare class NoopAnimationsModule {
|
||||
}
|
132
goldens/public-api/platform-browser/platform-browser.d.ts
vendored
Normal file
132
goldens/public-api/platform-browser/platform-browser.d.ts
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
export declare class BrowserModule {
|
||||
constructor(parentModule: BrowserModule | null);
|
||||
static withServerTransition(params: {
|
||||
appId: string;
|
||||
}): ModuleWithProviders<BrowserModule>;
|
||||
}
|
||||
|
||||
export declare class BrowserTransferStateModule {
|
||||
}
|
||||
|
||||
export declare class By {
|
||||
static all(): Predicate<DebugNode>;
|
||||
static css(selector: string): Predicate<DebugElement>;
|
||||
static directive(type: Type<any>): Predicate<DebugNode>;
|
||||
}
|
||||
|
||||
export declare function disableDebugTools(): void;
|
||||
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
export declare function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T>;
|
||||
|
||||
export declare const EVENT_MANAGER_PLUGINS: InjectionToken<ɵangular_packages_platform_browser_platform_browser_g[]>;
|
||||
|
||||
export declare class EventManager {
|
||||
constructor(plugins: ɵangular_packages_platform_browser_platform_browser_g[], _zone: NgZone);
|
||||
addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;
|
||||
addGlobalEventListener(target: string, eventName: string, handler: Function): Function;
|
||||
getZone(): NgZone;
|
||||
}
|
||||
|
||||
export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
|
||||
|
||||
export declare const HAMMER_LOADER: InjectionToken<HammerLoader>;
|
||||
|
||||
export declare class HammerGestureConfig {
|
||||
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;
|
||||
};
|
||||
buildHammer(element: HTMLElement): HammerInstance;
|
||||
}
|
||||
|
||||
export declare type HammerLoader = () => Promise<void>;
|
||||
|
||||
export declare class HammerModule {
|
||||
}
|
||||
|
||||
export declare function makeStateKey<T = void>(key: string): StateKey<T>;
|
||||
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
export declare type MetaDefinition = {
|
||||
charset?: string;
|
||||
content?: string;
|
||||
httpEquiv?: string;
|
||||
id?: string;
|
||||
itemprop?: string;
|
||||
name?: string;
|
||||
property?: string;
|
||||
scheme?: string;
|
||||
url?: string;
|
||||
} & {
|
||||
[prop: string]: string;
|
||||
};
|
||||
|
||||
export declare const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef;
|
||||
|
||||
export declare interface SafeHtml extends SafeValue {
|
||||
}
|
||||
|
||||
export declare interface SafeResourceUrl extends SafeValue {
|
||||
}
|
||||
|
||||
export declare interface SafeScript extends SafeValue {
|
||||
}
|
||||
|
||||
export declare interface SafeStyle extends SafeValue {
|
||||
}
|
||||
|
||||
export declare interface SafeUrl extends SafeValue {
|
||||
}
|
||||
|
||||
export declare interface SafeValue {
|
||||
}
|
||||
|
||||
export declare type StateKey<T> = string & {
|
||||
__not_a_string: never;
|
||||
};
|
||||
|
||||
export declare class Title {
|
||||
constructor(_doc: any);
|
||||
getTitle(): string;
|
||||
setTitle(newTitle: string): void;
|
||||
}
|
||||
|
||||
export declare class TransferState {
|
||||
get<T>(key: StateKey<T>, defaultValue: T): T;
|
||||
hasKey<T>(key: StateKey<T>): 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;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
4
goldens/public-api/platform-browser/testing/testing.d.ts
vendored
Normal file
4
goldens/public-api/platform-browser/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export declare class BrowserTestingModule {
|
||||
}
|
||||
|
||||
export declare const platformBrowserTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
38
goldens/public-api/platform-server/platform-server.d.ts
vendored
Normal file
38
goldens/public-api/platform-server/platform-server.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise<void>)[]>;
|
||||
|
||||
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
||||
|
||||
export declare interface PlatformConfig {
|
||||
document?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export declare const platformDynamicServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare class PlatformState {
|
||||
constructor(_doc: any);
|
||||
getDocument(): any;
|
||||
renderToString(): string;
|
||||
}
|
||||
|
||||
export declare function renderModule<T>(module: Type<T>, options: {
|
||||
document?: string;
|
||||
url?: string;
|
||||
extraProviders?: StaticProvider[];
|
||||
}): Promise<string>;
|
||||
|
||||
export declare function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: {
|
||||
document?: string;
|
||||
url?: string;
|
||||
extraProviders?: StaticProvider[];
|
||||
}): Promise<string>;
|
||||
|
||||
export declare class ServerModule {
|
||||
}
|
||||
|
||||
export declare class ServerTransferStateModule {
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
4
goldens/public-api/platform-server/testing/testing.d.ts
vendored
Normal file
4
goldens/public-api/platform-server/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export declare const platformServerTesting: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare class ServerTestingModule {
|
||||
}
|
5
goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts
vendored
Normal file
5
goldens/public-api/platform-webworker-dynamic/platform-webworker-dynamic.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/** @deprecated */
|
||||
export declare const platformWorkerAppDynamic: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
/** @deprecated */
|
||||
export declare const VERSION: Version;
|
92
goldens/public-api/platform-webworker/platform-webworker.d.ts
vendored
Normal file
92
goldens/public-api/platform-webworker/platform-webworker.d.ts
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
/** @deprecated */
|
||||
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: StaticProvider[]): Promise<PlatformRef>;
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ClientMessageBroker {
|
||||
runOnService(args: UiArguments, returnType: Type<any> | SerializerTypes | null): Promise<any> | null;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ClientMessageBrokerFactory {
|
||||
createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class FnArg {
|
||||
type: Type<any> | SerializerTypes;
|
||||
value: any;
|
||||
constructor(value: any, type?: Type<any> | SerializerTypes);
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare abstract class MessageBus implements MessageBusSource, MessageBusSink {
|
||||
abstract attachToZone(zone: NgZone): void;
|
||||
abstract from(channel: string): EventEmitter<any>;
|
||||
abstract initChannel(channel: string, runInZone?: boolean): void;
|
||||
abstract to(channel: string): EventEmitter<any>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare interface MessageBusSink {
|
||||
attachToZone(zone: NgZone): void;
|
||||
initChannel(channel: string, runInZone: boolean): void;
|
||||
to(channel: string): EventEmitter<any>;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare interface MessageBusSource {
|
||||
attachToZone(zone: NgZone): void;
|
||||
from(channel: string): EventEmitter<any>;
|
||||
initChannel(channel: string, runInZone: boolean): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare const platformWorkerApp: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
/** @deprecated */
|
||||
export declare const platformWorkerUi: (extraProviders?: StaticProvider[] | undefined) => import("@angular/core").PlatformRef;
|
||||
|
||||
/** @deprecated */
|
||||
export declare interface ReceivedMessage {
|
||||
args: any[];
|
||||
id: string;
|
||||
method: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare const enum SerializerTypes {
|
||||
RENDERER_TYPE_2 = 0,
|
||||
PRIMITIVE = 1,
|
||||
RENDER_STORE_OBJECT = 2
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ServiceMessageBroker {
|
||||
registerMethod(methodName: string, signature: Array<Type<any> | SerializerTypes> | null, method: (..._: any[]) => Promise<any> | void, returnType?: Type<any> | SerializerTypes): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ServiceMessageBrokerFactory {
|
||||
createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class UiArguments {
|
||||
args?: FnArg[] | undefined;
|
||||
method: string;
|
||||
constructor(method: string, args?: FnArg[] | undefined);
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare const VERSION: Version;
|
||||
|
||||
/** @deprecated */
|
||||
export declare const WORKER_APP_LOCATION_PROVIDERS: StaticProvider[];
|
||||
|
||||
/** @deprecated */
|
||||
export declare const WORKER_UI_LOCATION_PROVIDERS: StaticProvider[];
|
||||
|
||||
/** @deprecated */
|
||||
export declare class WorkerAppModule {
|
||||
}
|
555
goldens/public-api/router/router.d.ts
vendored
Normal file
555
goldens/public-api/router/router.d.ts
vendored
Normal file
@ -0,0 +1,555 @@
|
||||
export declare class ActivatedRoute {
|
||||
get children(): ActivatedRoute[];
|
||||
component: Type<any> | string | null;
|
||||
data: Observable<Data>;
|
||||
get firstChild(): ActivatedRoute | null;
|
||||
fragment: Observable<string>;
|
||||
outlet: string;
|
||||
get paramMap(): Observable<ParamMap>;
|
||||
params: Observable<Params>;
|
||||
get parent(): ActivatedRoute | null;
|
||||
get pathFromRoot(): ActivatedRoute[];
|
||||
get queryParamMap(): Observable<ParamMap>;
|
||||
queryParams: Observable<Params>;
|
||||
get root(): ActivatedRoute;
|
||||
get routeConfig(): Route | null;
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
url: Observable<UrlSegment[]>;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ActivatedRouteSnapshot {
|
||||
get children(): ActivatedRouteSnapshot[];
|
||||
component: Type<any> | string | null;
|
||||
data: Data;
|
||||
get firstChild(): ActivatedRouteSnapshot | null;
|
||||
fragment: string;
|
||||
outlet: string;
|
||||
get paramMap(): ParamMap;
|
||||
params: Params;
|
||||
get parent(): ActivatedRouteSnapshot | null;
|
||||
get pathFromRoot(): ActivatedRouteSnapshot[];
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
get root(): ActivatedRouteSnapshot;
|
||||
readonly routeConfig: Route | null;
|
||||
url: UrlSegment[];
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ActivationEnd {
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ActivationStart {
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare interface CanActivate {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export declare interface CanActivateChild {
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export declare interface CanDeactivate<T> {
|
||||
canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
||||
}
|
||||
|
||||
export declare interface CanLoad {
|
||||
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean;
|
||||
}
|
||||
|
||||
export declare class ChildActivationEnd {
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ChildActivationStart {
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ChildrenOutletContexts {
|
||||
getContext(childName: string): OutletContext | null;
|
||||
getOrCreateContext(childName: string): OutletContext;
|
||||
onChildOutletCreated(childName: string, outlet: RouterOutlet): void;
|
||||
onChildOutletDestroyed(childName: string): void;
|
||||
onOutletDeactivated(): Map<string, OutletContext>;
|
||||
onOutletReAttached(contexts: Map<string, OutletContext>): void;
|
||||
}
|
||||
|
||||
export declare function convertToParamMap(params: Params): ParamMap;
|
||||
|
||||
export declare type Data = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
export declare class DefaultUrlSerializer implements UrlSerializer {
|
||||
parse(url: string): UrlTree;
|
||||
serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare type DeprecatedLoadChildren = string;
|
||||
|
||||
export declare type DetachedRouteHandle = {};
|
||||
|
||||
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;
|
||||
|
||||
export declare interface ExtraOptions {
|
||||
anchorScrolling?: 'disabled' | 'enabled';
|
||||
enableTracing?: boolean;
|
||||
errorHandler?: ErrorHandler;
|
||||
initialNavigation?: InitialNavigation;
|
||||
malformedUriErrorHandler?: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
||||
onSameUrlNavigation?: 'reload' | 'ignore';
|
||||
paramsInheritanceStrategy?: 'emptyOnly' | 'always';
|
||||
preloadingStrategy?: any;
|
||||
relativeLinkResolution?: 'legacy' | 'corrected';
|
||||
scrollOffset?: [number, number] | (() => [number, number]);
|
||||
scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';
|
||||
urlUpdateStrategy?: 'deferred' | 'eager';
|
||||
useHash?: boolean;
|
||||
}
|
||||
|
||||
export declare class GuardsCheckEnd extends RouterEvent {
|
||||
shouldActivate: boolean;
|
||||
state: RouterStateSnapshot;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot,
|
||||
shouldActivate: boolean);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class GuardsCheckStart extends RouterEvent {
|
||||
state: RouterStateSnapshot;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare type InitialNavigation = true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';
|
||||
|
||||
export declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren;
|
||||
|
||||
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>;
|
||||
|
||||
export declare type Navigation = {
|
||||
id: number;
|
||||
initialUrl: string | UrlTree;
|
||||
extractedUrl: UrlTree;
|
||||
finalUrl?: UrlTree;
|
||||
trigger: 'imperative' | 'popstate' | 'hashchange';
|
||||
extras: NavigationExtras;
|
||||
previousNavigation: Navigation | null;
|
||||
};
|
||||
|
||||
export declare class NavigationCancel extends RouterEvent {
|
||||
reason: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
reason: string);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class NavigationEnd extends RouterEvent {
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class NavigationError extends RouterEvent {
|
||||
error: any;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
error: any);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare interface NavigationExtras {
|
||||
fragment?: string;
|
||||
preserveFragment?: boolean;
|
||||
/** @deprecated */ preserveQueryParams?: boolean;
|
||||
queryParams?: Params | null;
|
||||
queryParamsHandling?: QueryParamsHandling | null;
|
||||
relativeTo?: ActivatedRoute | null;
|
||||
replaceUrl?: boolean;
|
||||
skipLocationChange?: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
export declare class NavigationStart extends RouterEvent {
|
||||
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange';
|
||||
restoredState?: {
|
||||
[k: string]: any;
|
||||
navigationId: number;
|
||||
} | null;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
navigationTrigger?: 'imperative' | 'popstate' | 'hashchange',
|
||||
restoredState?: {
|
||||
[k: string]: any;
|
||||
navigationId: number;
|
||||
} | null);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class NoPreloading implements PreloadingStrategy {
|
||||
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
||||
}
|
||||
|
||||
export declare class OutletContext {
|
||||
attachRef: ComponentRef<any> | null;
|
||||
children: ChildrenOutletContexts;
|
||||
outlet: RouterOutlet | null;
|
||||
resolver: ComponentFactoryResolver | null;
|
||||
route: ActivatedRoute | null;
|
||||
}
|
||||
|
||||
export declare interface ParamMap {
|
||||
readonly keys: string[];
|
||||
get(name: string): string | null;
|
||||
getAll(name: string): string[];
|
||||
has(name: string): boolean;
|
||||
}
|
||||
|
||||
export declare type Params = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export declare class PreloadAllModules implements PreloadingStrategy {
|
||||
preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
||||
}
|
||||
|
||||
export declare abstract class PreloadingStrategy {
|
||||
abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;
|
||||
}
|
||||
|
||||
export declare const PRIMARY_OUTLET = "primary";
|
||||
|
||||
export declare function provideRoutes(routes: Routes): any;
|
||||
|
||||
export declare type QueryParamsHandling = 'merge' | 'preserve' | '';
|
||||
|
||||
export declare interface Resolve<T> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<T> | Promise<T> | T;
|
||||
}
|
||||
|
||||
export declare type ResolveData = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
export declare class ResolveEnd extends RouterEvent {
|
||||
state: RouterStateSnapshot;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ResolveStart extends RouterEvent {
|
||||
state: RouterStateSnapshot;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare interface Route {
|
||||
canActivate?: any[];
|
||||
canActivateChild?: any[];
|
||||
canDeactivate?: any[];
|
||||
canLoad?: any[];
|
||||
children?: Routes;
|
||||
component?: Type<any>;
|
||||
data?: Data;
|
||||
loadChildren?: LoadChildren;
|
||||
matcher?: UrlMatcher;
|
||||
outlet?: string;
|
||||
path?: string;
|
||||
pathMatch?: string;
|
||||
redirectTo?: string;
|
||||
resolve?: ResolveData;
|
||||
runGuardsAndResolvers?: RunGuardsAndResolvers;
|
||||
}
|
||||
|
||||
export declare class RouteConfigLoadEnd {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class RouteConfigLoadStart {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class Router {
|
||||
config: Routes;
|
||||
errorHandler: ErrorHandler;
|
||||
readonly events: Observable<Event>;
|
||||
malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
||||
navigated: boolean;
|
||||
onSameUrlNavigation: 'reload' | 'ignore';
|
||||
paramsInheritanceStrategy: 'emptyOnly' | 'always';
|
||||
relativeLinkResolution: 'legacy' | 'corrected';
|
||||
routeReuseStrategy: RouteReuseStrategy;
|
||||
readonly routerState: RouterState;
|
||||
get url(): string;
|
||||
urlHandlingStrategy: UrlHandlingStrategy;
|
||||
urlUpdateStrategy: 'deferred' | 'eager';
|
||||
constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);
|
||||
createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree;
|
||||
dispose(): void;
|
||||
getCurrentNavigation(): Navigation | null;
|
||||
initialNavigation(): void;
|
||||
isActive(url: string | UrlTree, exact: boolean): boolean;
|
||||
navigate(commands: any[], extras?: NavigationExtras): Promise<boolean>;
|
||||
navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
|
||||
ngOnDestroy(): void;
|
||||
parseUrl(url: string): UrlTree;
|
||||
resetConfig(config: Routes): void;
|
||||
serializeUrl(url: UrlTree): string;
|
||||
setUpLocationChangeListener(): void;
|
||||
}
|
||||
|
||||
export declare const ROUTER_CONFIGURATION: InjectionToken<ExtraOptions>;
|
||||
|
||||
export declare const ROUTER_INITIALIZER: InjectionToken<(compRef: ComponentRef<any>) => void>;
|
||||
|
||||
export declare abstract class RouteReuseStrategy {
|
||||
abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
|
||||
abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;
|
||||
abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;
|
||||
abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
|
||||
abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;
|
||||
}
|
||||
|
||||
export declare class RouterEvent {
|
||||
id: number;
|
||||
url: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string);
|
||||
}
|
||||
|
||||
export declare class RouterLink {
|
||||
fragment: string;
|
||||
preserveFragment: boolean;
|
||||
/** @deprecated */ set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);
|
||||
onClick(): boolean;
|
||||
}
|
||||
|
||||
export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {
|
||||
readonly isActive: boolean;
|
||||
links: QueryList<RouterLink>;
|
||||
linksWithHrefs: QueryList<RouterLinkWithHref>;
|
||||
set routerLinkActive(data: string[] | string);
|
||||
routerLinkActiveOptions: {
|
||||
exact: boolean;
|
||||
};
|
||||
constructor(router: Router, element: ElementRef, renderer: Renderer2, link?: RouterLink | undefined, linkWithHref?: RouterLinkWithHref | undefined);
|
||||
ngAfterContentInit(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
||||
fragment: string;
|
||||
href: string;
|
||||
preserveFragment: boolean;
|
||||
set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
target: string;
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);
|
||||
ngOnChanges(changes: {}): any;
|
||||
ngOnDestroy(): any;
|
||||
onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean;
|
||||
}
|
||||
|
||||
export declare class RouterModule {
|
||||
constructor(guard: any, router: Router);
|
||||
static forChild(routes: Routes): ModuleWithProviders<RouterModule>;
|
||||
static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule>;
|
||||
}
|
||||
|
||||
export declare class RouterOutlet implements OnDestroy, OnInit {
|
||||
activateEvents: EventEmitter<any>;
|
||||
get activatedRoute(): ActivatedRoute;
|
||||
get activatedRouteData(): Data;
|
||||
get component(): Object;
|
||||
deactivateEvents: EventEmitter<any>;
|
||||
get isActivated(): boolean;
|
||||
constructor(parentContexts: ChildrenOutletContexts, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string, changeDetector: ChangeDetectorRef);
|
||||
activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | null): void;
|
||||
attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void;
|
||||
deactivate(): void;
|
||||
detach(): ComponentRef<any>;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export declare class RouterPreloader implements OnDestroy {
|
||||
constructor(router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, preloadingStrategy: PreloadingStrategy);
|
||||
ngOnDestroy(): void;
|
||||
preload(): Observable<any>;
|
||||
setUpPreloading(): void;
|
||||
}
|
||||
|
||||
export declare class RouterState extends ɵangular_packages_router_router_m<ActivatedRoute> {
|
||||
snapshot: RouterStateSnapshot;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class RouterStateSnapshot extends ɵangular_packages_router_router_m<ActivatedRouteSnapshot> {
|
||||
url: string;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare type Routes = Route[];
|
||||
|
||||
export declare const ROUTES: InjectionToken<Route[][]>;
|
||||
|
||||
export declare class RoutesRecognized extends RouterEvent {
|
||||
state: RouterStateSnapshot;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);
|
||||
|
||||
export declare class Scroll {
|
||||
readonly anchor: string | null;
|
||||
readonly position: [number, number] | null;
|
||||
readonly routerEvent: NavigationEnd;
|
||||
constructor(
|
||||
routerEvent: NavigationEnd,
|
||||
position: [number, number] | null,
|
||||
anchor: string | null);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare abstract class UrlHandlingStrategy {
|
||||
abstract extract(url: UrlTree): UrlTree;
|
||||
abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;
|
||||
abstract shouldProcessUrl(url: UrlTree): boolean;
|
||||
}
|
||||
|
||||
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
|
||||
|
||||
export declare type UrlMatchResult = {
|
||||
consumed: UrlSegment[];
|
||||
posParams?: {
|
||||
[name: string]: UrlSegment;
|
||||
};
|
||||
};
|
||||
|
||||
export declare class UrlSegment {
|
||||
get parameterMap(): ParamMap;
|
||||
parameters: {
|
||||
[name: string]: string;
|
||||
};
|
||||
path: string;
|
||||
constructor(
|
||||
path: string,
|
||||
parameters: {
|
||||
[name: string]: string;
|
||||
});
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class UrlSegmentGroup {
|
||||
children: {
|
||||
[key: string]: UrlSegmentGroup;
|
||||
};
|
||||
get numberOfChildren(): number;
|
||||
parent: UrlSegmentGroup | null;
|
||||
segments: UrlSegment[];
|
||||
constructor(
|
||||
segments: UrlSegment[],
|
||||
children: {
|
||||
[key: string]: UrlSegmentGroup;
|
||||
});
|
||||
hasChildren(): boolean;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare abstract class UrlSerializer {
|
||||
abstract parse(url: string): UrlTree;
|
||||
abstract serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
export declare class UrlTree {
|
||||
fragment: string | null;
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
root: UrlSegmentGroup;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
17
goldens/public-api/router/testing/testing.d.ts
vendored
Normal file
17
goldens/public-api/router/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export declare class RouterTestingModule {
|
||||
static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
|
||||
}
|
||||
|
||||
export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;
|
||||
export declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router;
|
||||
|
||||
export declare class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {
|
||||
set stubbedModules(modules: {
|
||||
[path: string]: any;
|
||||
});
|
||||
get stubbedModules(): {
|
||||
[path: string]: any;
|
||||
};
|
||||
constructor(compiler: Compiler);
|
||||
load(path: string): Promise<NgModuleFactory<any>>;
|
||||
}
|
8
goldens/public-api/router/upgrade/upgrade.d.ts
vendored
Normal file
8
goldens/public-api/router/upgrade/upgrade.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export declare const RouterUpgradeInitializer: {
|
||||
provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
||||
multi: boolean;
|
||||
useFactory: (ngUpgrade: UpgradeModule) => () => void;
|
||||
deps: (typeof UpgradeModule)[];
|
||||
};
|
||||
|
||||
export declare function setUpLocationSync(ngUpgrade: UpgradeModule, urlType?: 'path' | 'hash'): void;
|
46
goldens/public-api/service-worker/config/config.d.ts
vendored
Normal file
46
goldens/public-api/service-worker/config/config.d.ts
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
export declare interface AssetGroup {
|
||||
installMode?: 'prefetch' | 'lazy';
|
||||
name: string;
|
||||
resources: {
|
||||
files?: Glob[];
|
||||
urls?: Glob[];
|
||||
};
|
||||
updateMode?: 'prefetch' | 'lazy';
|
||||
}
|
||||
|
||||
export declare interface Config {
|
||||
appData?: {};
|
||||
assetGroups?: AssetGroup[];
|
||||
dataGroups?: DataGroup[];
|
||||
index: string;
|
||||
navigationUrls?: string[];
|
||||
}
|
||||
|
||||
export declare interface DataGroup {
|
||||
cacheConfig: {
|
||||
maxSize: number;
|
||||
maxAge: Duration;
|
||||
timeout?: Duration;
|
||||
strategy?: 'freshness' | 'performance';
|
||||
};
|
||||
name: string;
|
||||
urls: Glob[];
|
||||
version?: number;
|
||||
}
|
||||
|
||||
export declare type Duration = string;
|
||||
|
||||
export declare interface Filesystem {
|
||||
hash(file: string): Promise<string>;
|
||||
list(dir: string): Promise<string[]>;
|
||||
read(file: string): Promise<string>;
|
||||
write(file: string, contents: string): Promise<void>;
|
||||
}
|
||||
|
||||
export declare class Generator {
|
||||
readonly fs: Filesystem;
|
||||
constructor(fs: Filesystem, baseHref: string);
|
||||
process(config: Config): Promise<Object>;
|
||||
}
|
||||
|
||||
export declare type Glob = string;
|
59
goldens/public-api/service-worker/service-worker.d.ts
vendored
Normal file
59
goldens/public-api/service-worker/service-worker.d.ts
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
export declare class ServiceWorkerModule {
|
||||
static register(script: string, opts?: SwRegistrationOptions): ModuleWithProviders<ServiceWorkerModule>;
|
||||
}
|
||||
|
||||
export declare class SwPush {
|
||||
get isEnabled(): boolean;
|
||||
readonly messages: Observable<object>;
|
||||
readonly notificationClicks: Observable<{
|
||||
action: string;
|
||||
notification: NotificationOptions & {
|
||||
title: string;
|
||||
};
|
||||
}>;
|
||||
readonly subscription: Observable<PushSubscription | null>;
|
||||
constructor(sw: ɵangular_packages_service_worker_service_worker_a);
|
||||
requestSubscription(options: {
|
||||
serverPublicKey: string;
|
||||
}): Promise<PushSubscription>;
|
||||
unsubscribe(): Promise<void>;
|
||||
}
|
||||
|
||||
export declare abstract class SwRegistrationOptions {
|
||||
enabled?: boolean;
|
||||
registrationStrategy?: string | (() => Observable<unknown>);
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
export declare class SwUpdate {
|
||||
readonly activated: Observable<UpdateActivatedEvent>;
|
||||
readonly available: Observable<UpdateAvailableEvent>;
|
||||
get isEnabled(): boolean;
|
||||
constructor(sw: ɵangular_packages_service_worker_service_worker_a);
|
||||
activateUpdate(): Promise<void>;
|
||||
checkForUpdate(): Promise<void>;
|
||||
}
|
||||
|
||||
export declare interface UpdateActivatedEvent {
|
||||
current: {
|
||||
hash: string;
|
||||
appData?: Object;
|
||||
};
|
||||
previous?: {
|
||||
hash: string;
|
||||
appData?: Object;
|
||||
};
|
||||
type: 'UPDATE_ACTIVATED';
|
||||
}
|
||||
|
||||
export declare interface UpdateAvailableEvent {
|
||||
available: {
|
||||
hash: string;
|
||||
appData?: Object;
|
||||
};
|
||||
current: {
|
||||
hash: string;
|
||||
appData?: Object;
|
||||
};
|
||||
type: 'UPDATE_AVAILABLE';
|
||||
}
|
42
goldens/public-api/upgrade/static/static.d.ts
vendored
Normal file
42
goldens/public-api/upgrade/static/static.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export declare function downgradeComponent(info: {
|
||||
component: Type<any>;
|
||||
downgradedModule?: string;
|
||||
propagateDigest?: boolean;
|
||||
/** @deprecated */ inputs?: string[];
|
||||
/** @deprecated */ outputs?: string[];
|
||||
/** @deprecated */ selectors?: string[];
|
||||
}): any;
|
||||
|
||||
export declare function downgradeInjectable(token: any, downgradedModule?: string): Function;
|
||||
|
||||
export declare function downgradeModule<T>(moduleFactoryOrBootstrapFn: NgModuleFactory<T> | ((extraProviders: StaticProvider[]) => Promise<NgModuleRef<T>>)): string;
|
||||
|
||||
export declare function getAngularJSGlobal(): any;
|
||||
|
||||
/** @deprecated */
|
||||
export declare function getAngularLib(): any;
|
||||
|
||||
export declare function setAngularJSGlobal(ng: any): void;
|
||||
|
||||
/** @deprecated */
|
||||
export declare function setAngularLib(ng: any): void;
|
||||
|
||||
export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
|
||||
constructor(name: string, elementRef: ElementRef, injector: Injector);
|
||||
ngDoCheck(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
export declare class UpgradeModule {
|
||||
$injector: any;
|
||||
injector: Injector;
|
||||
ngZone: NgZone;
|
||||
constructor(
|
||||
injector: Injector,
|
||||
ngZone: NgZone);
|
||||
bootstrap(element: Element, modules?: string[], config?: any): void;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
3
goldens/public-api/upgrade/static/testing/testing.d.ts
vendored
Normal file
3
goldens/public-api/upgrade/static/testing/testing.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export declare function createAngularJSTestingModule(angularModules: any[]): string;
|
||||
|
||||
export declare function createAngularTestingModule(angularJSModules: string[], strictDi?: boolean): Type<any>;
|
24
goldens/public-api/upgrade/upgrade.d.ts
vendored
Normal file
24
goldens/public-api/upgrade/upgrade.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/** @deprecated */
|
||||
export declare 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;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class UpgradeAdapterRef {
|
||||
ng1Injector: IInjectorService;
|
||||
ng1RootScope: IRootScopeService;
|
||||
ng2Injector: Injector;
|
||||
ng2ModuleRef: NgModuleRef<any>;
|
||||
dispose(): void;
|
||||
ready(fn: (upgradeAdapterRef: UpgradeAdapterRef) => void): void;
|
||||
}
|
||||
|
||||
export declare const VERSION: Version;
|
Reference in New Issue
Block a user