build: typescript 3.7 support (#33717)
This PR updates TypeScript version to 3.7 while retaining compatibility with TS3.6. PR Close #33717
This commit is contained in:
49
tools/public_api_guard/common/common.d.ts
vendored
49
tools/public_api_guard/common/common.d.ts
vendored
@ -188,10 +188,10 @@ export declare class LowerCasePipe implements PipeTransform {
|
||||
}
|
||||
|
||||
export declare class NgClass extends NgClassBase implements DoCheck {
|
||||
klass: string;
|
||||
ngClass: string | string[] | Set<string> | {
|
||||
set klass(value: string);
|
||||
set ngClass(value: string | string[] | Set<string> | {
|
||||
[klass: string]: any;
|
||||
};
|
||||
});
|
||||
constructor(delegate: NgClassImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
@ -217,9 +217,10 @@ export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
|
||||
ngForOf: (U & NgIterable<T>) | undefined | null;
|
||||
ngForTemplate: TemplateRef<NgForOfContext<T, U>>;
|
||||
ngForTrackBy: TrackByFunction<T>;
|
||||
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
|
||||
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
|
||||
get ngForTrackBy(): TrackByFunction<T>;
|
||||
set ngForTrackBy(fn: 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>;
|
||||
@ -228,19 +229,19 @@ export declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> impleme
|
||||
export declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
|
||||
$implicit: T;
|
||||
count: number;
|
||||
readonly even: boolean;
|
||||
readonly first: boolean;
|
||||
get even(): boolean;
|
||||
get first(): boolean;
|
||||
index: number;
|
||||
readonly last: boolean;
|
||||
get last(): boolean;
|
||||
ngForOf: U;
|
||||
readonly odd: boolean;
|
||||
get odd(): boolean;
|
||||
constructor($implicit: T, ngForOf: U, index: number, count: number);
|
||||
}
|
||||
|
||||
export declare class NgIf<T = unknown> {
|
||||
ngIf: T;
|
||||
ngIfElse: TemplateRef<NgIfContext<T>> | null;
|
||||
ngIfThen: TemplateRef<NgIfContext<T>> | null;
|
||||
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<T>;
|
||||
@ -262,7 +263,7 @@ export declare abstract class NgLocalization {
|
||||
}
|
||||
|
||||
export declare class NgPlural {
|
||||
ngPlural: number;
|
||||
set ngPlural(value: number);
|
||||
constructor(_localization: NgLocalization);
|
||||
addCase(value: string, switchView: SwitchView): void;
|
||||
}
|
||||
@ -273,9 +274,9 @@ export declare class NgPluralCase {
|
||||
}
|
||||
|
||||
export declare class NgStyle extends NgStyleBase implements DoCheck {
|
||||
ngStyle: {
|
||||
set ngStyle(value: {
|
||||
[klass: string]: any;
|
||||
} | null;
|
||||
} | null);
|
||||
constructor(delegate: NgStyleImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
@ -291,7 +292,7 @@ export declare class NgStyleBase {
|
||||
}
|
||||
|
||||
export declare class NgSwitch {
|
||||
ngSwitch: any;
|
||||
set ngSwitch(newValue: any);
|
||||
}
|
||||
|
||||
export declare class NgSwitchCase implements DoCheck {
|
||||
@ -353,13 +354,13 @@ export declare class PercentPipe implements PipeTransform {
|
||||
}
|
||||
|
||||
export declare abstract class PlatformLocation {
|
||||
abstract readonly hash: string;
|
||||
abstract readonly hostname: string;
|
||||
abstract readonly href: string;
|
||||
abstract readonly pathname: string;
|
||||
abstract readonly port: string;
|
||||
abstract readonly protocol: string;
|
||||
abstract readonly search: string;
|
||||
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;
|
||||
|
@ -22,7 +22,7 @@ export interface RequestMatch {
|
||||
}
|
||||
|
||||
export declare class TestRequest {
|
||||
readonly cancelled: boolean;
|
||||
get cancelled(): boolean;
|
||||
request: HttpRequest<any>;
|
||||
constructor(request: HttpRequest<any>, observer: Observer<HttpEvent<any>>);
|
||||
error(error: ErrorEvent, opts?: {
|
||||
|
18
tools/public_api_guard/common/testing.d.ts
vendored
18
tools/public_api_guard/common/testing.d.ts
vendored
@ -19,15 +19,15 @@ export declare class MockLocationStrategy extends LocationStrategy {
|
||||
}
|
||||
|
||||
export declare class MockPlatformLocation implements PlatformLocation {
|
||||
readonly hash: string;
|
||||
readonly hostname: string;
|
||||
readonly href: string;
|
||||
readonly pathname: string;
|
||||
readonly port: string;
|
||||
readonly protocol: string;
|
||||
readonly search: string;
|
||||
readonly state: unknown;
|
||||
readonly url: string;
|
||||
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;
|
||||
|
62
tools/public_api_guard/core/core.d.ts
vendored
62
tools/public_api_guard/core/core.d.ts
vendored
@ -41,7 +41,7 @@ export declare class ApplicationRef {
|
||||
readonly componentTypes: Type<any>[];
|
||||
readonly components: ComponentRef<any>[];
|
||||
readonly isStable: Observable<boolean>;
|
||||
readonly viewCount: number;
|
||||
get viewCount(): number;
|
||||
attachView(viewRef: ViewRef): void;
|
||||
bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
||||
detachView(viewRef: ViewRef): void;
|
||||
@ -136,17 +136,17 @@ export interface ComponentDecorator {
|
||||
}
|
||||
|
||||
export declare abstract class ComponentFactory<C> {
|
||||
abstract readonly componentType: Type<any>;
|
||||
abstract readonly inputs: {
|
||||
abstract get componentType(): Type<any>;
|
||||
abstract get inputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract readonly ngContentSelectors: string[];
|
||||
abstract readonly outputs: {
|
||||
abstract get ngContentSelectors(): string[];
|
||||
abstract get outputs(): {
|
||||
propName: string;
|
||||
templateName: string;
|
||||
}[];
|
||||
abstract readonly selector: string;
|
||||
abstract get selector(): string;
|
||||
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
}
|
||||
|
||||
@ -156,12 +156,12 @@ export declare abstract class ComponentFactoryResolver {
|
||||
}
|
||||
|
||||
export declare abstract class ComponentRef<C> {
|
||||
abstract readonly changeDetectorRef: ChangeDetectorRef;
|
||||
abstract readonly componentType: Type<any>;
|
||||
abstract readonly hostView: ViewRef;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly instance: C;
|
||||
abstract readonly location: ElementRef;
|
||||
abstract get changeDetectorRef(): ChangeDetectorRef;
|
||||
abstract get componentType(): Type<any>;
|
||||
abstract get hostView(): ViewRef;
|
||||
abstract get injector(): Injector;
|
||||
abstract get instance(): C;
|
||||
abstract get location(): ElementRef;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
@ -262,7 +262,7 @@ export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
|
||||
/** @deprecated */
|
||||
export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
|
||||
readonly collection: V[] | Iterable<V> | null;
|
||||
readonly isDirty: boolean;
|
||||
get isDirty(): boolean;
|
||||
readonly length: number;
|
||||
constructor(trackByFn?: TrackByFunction<V>);
|
||||
check(collection: NgIterable<V>): boolean;
|
||||
@ -318,8 +318,8 @@ export declare class ElementRef<T extends any = any> {
|
||||
}
|
||||
|
||||
export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||
abstract readonly context: C;
|
||||
abstract readonly rootNodes: any[];
|
||||
abstract get context(): C;
|
||||
abstract get rootNodes(): any[];
|
||||
}
|
||||
|
||||
export declare function enableProdMode(): void;
|
||||
@ -601,7 +601,7 @@ export interface NgModuleDecorator {
|
||||
}
|
||||
|
||||
export declare abstract class NgModuleFactory<T> {
|
||||
abstract readonly moduleType: Type<T>;
|
||||
abstract get moduleType(): Type<T>;
|
||||
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
||||
}
|
||||
|
||||
@ -611,9 +611,9 @@ export declare abstract class NgModuleFactoryLoader {
|
||||
}
|
||||
|
||||
export declare abstract class NgModuleRef<T> {
|
||||
abstract readonly componentFactoryResolver: ComponentFactoryResolver;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly instance: T;
|
||||
abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
||||
abstract get injector(): Injector;
|
||||
abstract get instance(): T;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: () => void): void;
|
||||
}
|
||||
@ -780,7 +780,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
||||
|
||||
export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
|
||||
type: Type<T>;
|
||||
selectors?: (string | SelectorFlags)[][] | undefined;
|
||||
selectors?: CssSelectorList | undefined;
|
||||
inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
|
||||
outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
|
||||
features?: DirectiveDefFeature[] | undefined;
|
||||
@ -1114,8 +1114,8 @@ export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
|
||||
export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
||||
|
||||
export declare class PlatformRef {
|
||||
readonly destroyed: boolean;
|
||||
readonly injector: Injector;
|
||||
get destroyed(): boolean;
|
||||
get injector(): Injector;
|
||||
bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
|
||||
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
|
||||
destroy(): void;
|
||||
@ -1164,7 +1164,7 @@ export declare class QueryList<T> implements Iterable<T> {
|
||||
|
||||
/** @deprecated */
|
||||
export declare abstract class ReflectiveInjector implements Injector {
|
||||
abstract readonly parent: Injector | null;
|
||||
abstract get parent(): Injector | null;
|
||||
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
||||
abstract get(token: any, notFoundValue?: any): any;
|
||||
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
||||
@ -1181,12 +1181,12 @@ export declare class ReflectiveKey {
|
||||
id: number;
|
||||
token: Object;
|
||||
constructor(token: Object, id: number);
|
||||
static readonly numberOfKeys: number;
|
||||
static get numberOfKeys(): number;
|
||||
static get(token: Object): ReflectiveKey;
|
||||
}
|
||||
|
||||
export declare abstract class Renderer2 {
|
||||
abstract readonly data: {
|
||||
abstract get data(): {
|
||||
[key: string]: any;
|
||||
};
|
||||
destroyNode: ((node: any) => void) | null;
|
||||
@ -1325,7 +1325,7 @@ export declare abstract class SystemJsNgModuleLoaderConfig {
|
||||
}
|
||||
|
||||
export declare abstract class TemplateRef<C> {
|
||||
abstract readonly elementRef: ElementRef;
|
||||
abstract get elementRef(): ElementRef;
|
||||
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
||||
}
|
||||
|
||||
@ -1412,10 +1412,10 @@ export interface ViewChildrenDecorator {
|
||||
}
|
||||
|
||||
export declare abstract class ViewContainerRef {
|
||||
abstract readonly element: ElementRef;
|
||||
abstract readonly injector: Injector;
|
||||
abstract readonly length: number;
|
||||
/** @deprecated */ abstract readonly parentInjector: Injector;
|
||||
abstract get element(): ElementRef;
|
||||
abstract get injector(): Injector;
|
||||
abstract get length(): number;
|
||||
/** @deprecated */ abstract get parentInjector(): Injector;
|
||||
abstract clear(): void;
|
||||
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
||||
@ -1435,7 +1435,7 @@ export declare enum ViewEncapsulation {
|
||||
}
|
||||
|
||||
export declare abstract class ViewRef extends ChangeDetectorRef {
|
||||
abstract readonly destroyed: boolean;
|
||||
abstract get destroyed(): boolean;
|
||||
abstract destroy(): void;
|
||||
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
||||
}
|
||||
|
137
tools/public_api_guard/forms/forms.d.ts
vendored
137
tools/public_api_guard/forms/forms.d.ts
vendored
@ -1,20 +1,20 @@
|
||||
export declare abstract class AbstractControl {
|
||||
asyncValidator: AsyncValidatorFn | null;
|
||||
readonly dirty: boolean;
|
||||
readonly disabled: boolean;
|
||||
readonly enabled: boolean;
|
||||
get dirty(): boolean;
|
||||
get disabled(): boolean;
|
||||
get enabled(): boolean;
|
||||
readonly errors: ValidationErrors | null;
|
||||
readonly invalid: boolean;
|
||||
readonly parent: FormGroup | FormArray;
|
||||
readonly pending: boolean;
|
||||
get invalid(): boolean;
|
||||
get parent(): FormGroup | FormArray;
|
||||
get pending(): boolean;
|
||||
readonly pristine: boolean;
|
||||
readonly root: AbstractControl;
|
||||
get root(): AbstractControl;
|
||||
readonly status: string;
|
||||
readonly statusChanges: Observable<any>;
|
||||
readonly touched: boolean;
|
||||
readonly untouched: boolean;
|
||||
readonly updateOn: FormHooks;
|
||||
readonly valid: boolean;
|
||||
get untouched(): boolean;
|
||||
get updateOn(): FormHooks;
|
||||
get valid(): boolean;
|
||||
validator: ValidatorFn | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any>;
|
||||
@ -65,22 +65,22 @@ export declare abstract class AbstractControl {
|
||||
}
|
||||
|
||||
export declare abstract class AbstractControlDirective {
|
||||
abstract readonly control: AbstractControl | null;
|
||||
readonly dirty: boolean | null;
|
||||
readonly disabled: boolean | null;
|
||||
readonly enabled: boolean | null;
|
||||
readonly errors: ValidationErrors | null;
|
||||
readonly invalid: boolean | null;
|
||||
readonly path: string[] | null;
|
||||
readonly pending: boolean | null;
|
||||
readonly pristine: boolean | null;
|
||||
readonly status: string | null;
|
||||
readonly statusChanges: Observable<any> | null;
|
||||
readonly touched: boolean | null;
|
||||
readonly untouched: boolean | null;
|
||||
readonly valid: boolean | null;
|
||||
readonly value: any;
|
||||
readonly valueChanges: Observable<any> | null;
|
||||
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;
|
||||
@ -93,11 +93,11 @@ export interface AbstractControlOptions {
|
||||
}
|
||||
|
||||
export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormGroup;
|
||||
readonly formDirective: Form | null;
|
||||
readonly path: string[];
|
||||
readonly validator: ValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormGroup;
|
||||
get formDirective(): Form | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
@ -127,9 +127,9 @@ export declare class CheckboxRequiredValidator extends RequiredValidator {
|
||||
export declare const COMPOSITION_BUFFER_MODE: InjectionToken<boolean>;
|
||||
|
||||
export declare abstract class ControlContainer extends AbstractControlDirective {
|
||||
readonly formDirective: Form | null;
|
||||
get formDirective(): Form | null;
|
||||
name: string | number | null;
|
||||
readonly path: string[] | null;
|
||||
get path(): string[] | null;
|
||||
}
|
||||
|
||||
export interface ControlValueAccessor {
|
||||
@ -150,7 +150,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor {
|
||||
}
|
||||
|
||||
export declare class EmailValidator implements Validator {
|
||||
email: boolean | string;
|
||||
set email(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
@ -167,7 +167,7 @@ export interface Form {
|
||||
|
||||
export declare class FormArray extends AbstractControl {
|
||||
controls: AbstractControl[];
|
||||
readonly length: number;
|
||||
get length(): number;
|
||||
constructor(controls: AbstractControl[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
|
||||
at(index: number): AbstractControl;
|
||||
clear(): void;
|
||||
@ -191,12 +191,12 @@ export declare class FormArray extends AbstractControl {
|
||||
}
|
||||
|
||||
export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormArray;
|
||||
readonly formDirective: FormGroupDirective | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormArray;
|
||||
get formDirective(): FormGroupDirective | null;
|
||||
name: string | number | null;
|
||||
readonly path: string[];
|
||||
readonly validator: ValidatorFn | null;
|
||||
get path(): string[];
|
||||
get validator(): ValidatorFn | null;
|
||||
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
@ -235,14 +235,14 @@ export declare class FormControl extends AbstractControl {
|
||||
}
|
||||
|
||||
export declare class FormControlDirective extends NgControl implements OnChanges {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
readonly control: FormControl;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
get control(): FormControl;
|
||||
form: FormControl;
|
||||
isDisabled: boolean;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[], _ngModelWarningConfig: string | null);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
@ -250,15 +250,15 @@ export declare class FormControlDirective extends NgControl implements OnChanges
|
||||
}
|
||||
|
||||
export declare class FormControlName extends NgControl implements OnChanges, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn;
|
||||
get asyncValidator(): AsyncValidatorFn;
|
||||
readonly control: FormControl;
|
||||
readonly formDirective: any;
|
||||
isDisabled: boolean;
|
||||
get formDirective(): any;
|
||||
set isDisabled(isDisabled: boolean);
|
||||
/** @deprecated */ model: any;
|
||||
name: string | number | null;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
/** @deprecated */ update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
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;
|
||||
@ -297,12 +297,12 @@ export declare class FormGroup extends AbstractControl {
|
||||
}
|
||||
|
||||
export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges {
|
||||
readonly control: FormGroup;
|
||||
get control(): FormGroup;
|
||||
directives: FormControlName[];
|
||||
form: FormGroup;
|
||||
readonly formDirective: Form;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(_validators: any[], _asyncValidators: any[]);
|
||||
addControl(dir: FormControlName): FormControl;
|
||||
@ -350,9 +350,9 @@ export declare const NG_VALIDATORS: InjectionToken<(Function | Validator)[]>;
|
||||
export declare const NG_VALUE_ACCESSOR: InjectionToken<ControlValueAccessor>;
|
||||
|
||||
export declare abstract class NgControl extends AbstractControlDirective {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
name: string | number | null;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
valueAccessor: ControlValueAccessor | null;
|
||||
abstract viewToModelUpdate(newValue: any): void;
|
||||
}
|
||||
@ -366,17 +366,17 @@ export declare class NgControlStatusGroup extends AbstractControlStatus {
|
||||
}
|
||||
|
||||
export declare class NgForm extends ControlContainer implements Form, AfterViewInit {
|
||||
readonly control: FormGroup;
|
||||
readonly controls: {
|
||||
get control(): FormGroup;
|
||||
get controls(): {
|
||||
[key: string]: AbstractControl;
|
||||
};
|
||||
form: FormGroup;
|
||||
readonly formDirective: Form;
|
||||
get formDirective(): Form;
|
||||
ngSubmit: EventEmitter<any>;
|
||||
options: {
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
readonly submitted: boolean;
|
||||
constructor(validators: any[], asyncValidators: any[]);
|
||||
addControl(dir: NgModel): void;
|
||||
@ -396,9 +396,9 @@ export declare class NgForm extends ControlContainer implements Form, AfterViewI
|
||||
}
|
||||
|
||||
export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
get asyncValidator(): AsyncValidatorFn | null;
|
||||
readonly control: FormControl;
|
||||
readonly formDirective: any;
|
||||
get formDirective(): any;
|
||||
isDisabled: boolean;
|
||||
model: any;
|
||||
name: string;
|
||||
@ -407,9 +407,9 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
|
||||
standalone?: boolean;
|
||||
updateOn?: FormHooks;
|
||||
};
|
||||
readonly path: string[];
|
||||
get path(): string[];
|
||||
update: EventEmitter<any>;
|
||||
readonly validator: ValidatorFn | null;
|
||||
get validator(): ValidatorFn | null;
|
||||
viewModel: any;
|
||||
constructor(parent: ControlContainer, validators: Array<Validator | ValidatorFn>, asyncValidators: Array<AsyncValidator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[]);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
@ -425,8 +425,8 @@ export declare class NgModelGroup extends AbstractFormGroupDirective implements
|
||||
|
||||
export declare class NgSelectOption implements OnDestroy {
|
||||
id: string;
|
||||
ngValue: any;
|
||||
value: any;
|
||||
set ngValue(value: any);
|
||||
set value(value: any);
|
||||
constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectControlValueAccessor);
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
@ -480,13 +480,14 @@ export declare class ReactiveFormsModule {
|
||||
}
|
||||
|
||||
export declare class RequiredValidator implements Validator {
|
||||
required: boolean | string;
|
||||
get required(): boolean | string;
|
||||
set required(value: boolean | string);
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(control: AbstractControl): ValidationErrors | null;
|
||||
}
|
||||
|
||||
export declare class SelectControlValueAccessor implements ControlValueAccessor {
|
||||
compareWith: (o1: any, o2: any) => boolean;
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
@ -498,7 +499,7 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor
|
||||
}
|
||||
|
||||
export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor {
|
||||
compareWith: (o1: any, o2: any) => boolean;
|
||||
set compareWith(fn: (o1: any, o2: any) => boolean);
|
||||
onChange: (_: any) => void;
|
||||
onTouched: () => void;
|
||||
value: any;
|
||||
|
3
tools/public_api_guard/http/http.d.ts
vendored
3
tools/public_api_guard/http/http.d.ts
vendored
@ -142,7 +142,8 @@ export declare class RequestOptions {
|
||||
method: RequestMethod | string | null;
|
||||
params: URLSearchParams;
|
||||
responseType: ResponseContentType | null;
|
||||
/** @deprecated */ search: URLSearchParams;
|
||||
/** @deprecated */ set search(params: URLSearchParams);
|
||||
/** @deprecated */ get search(): URLSearchParams;
|
||||
url: string | null;
|
||||
withCredentials: boolean | null;
|
||||
constructor(opts?: RequestOptionsArgs);
|
||||
|
@ -1,4 +1,4 @@
|
||||
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void)[]>;
|
||||
export declare const BEFORE_APP_SERIALIZED: InjectionToken<(() => void | Promise<void>)[]>;
|
||||
|
||||
export declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
|
||||
|
||||
|
60
tools/public_api_guard/router/router.d.ts
vendored
60
tools/public_api_guard/router/router.d.ts
vendored
@ -1,37 +1,37 @@
|
||||
export declare class ActivatedRoute {
|
||||
readonly children: ActivatedRoute[];
|
||||
get children(): ActivatedRoute[];
|
||||
component: Type<any> | string | null;
|
||||
data: Observable<Data>;
|
||||
readonly firstChild: ActivatedRoute | null;
|
||||
get firstChild(): ActivatedRoute | null;
|
||||
fragment: Observable<string>;
|
||||
outlet: string;
|
||||
readonly paramMap: Observable<ParamMap>;
|
||||
get paramMap(): Observable<ParamMap>;
|
||||
params: Observable<Params>;
|
||||
readonly parent: ActivatedRoute | null;
|
||||
readonly pathFromRoot: ActivatedRoute[];
|
||||
readonly queryParamMap: Observable<ParamMap>;
|
||||
get parent(): ActivatedRoute | null;
|
||||
get pathFromRoot(): ActivatedRoute[];
|
||||
get queryParamMap(): Observable<ParamMap>;
|
||||
queryParams: Observable<Params>;
|
||||
readonly root: ActivatedRoute;
|
||||
readonly routeConfig: Route | null;
|
||||
get root(): ActivatedRoute;
|
||||
get routeConfig(): Route | null;
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
url: Observable<UrlSegment[]>;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export declare class ActivatedRouteSnapshot {
|
||||
readonly children: ActivatedRouteSnapshot[];
|
||||
get children(): ActivatedRouteSnapshot[];
|
||||
component: Type<any> | string | null;
|
||||
data: Data;
|
||||
readonly firstChild: ActivatedRouteSnapshot | null;
|
||||
get firstChild(): ActivatedRouteSnapshot | null;
|
||||
fragment: string;
|
||||
outlet: string;
|
||||
readonly paramMap: ParamMap;
|
||||
get paramMap(): ParamMap;
|
||||
params: Params;
|
||||
readonly parent: ActivatedRouteSnapshot | null;
|
||||
readonly pathFromRoot: ActivatedRouteSnapshot[];
|
||||
readonly queryParamMap: ParamMap;
|
||||
get parent(): ActivatedRouteSnapshot | null;
|
||||
get pathFromRoot(): ActivatedRouteSnapshot[];
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
readonly root: ActivatedRouteSnapshot;
|
||||
get root(): ActivatedRouteSnapshot;
|
||||
readonly routeConfig: Route | null;
|
||||
url: UrlSegment[];
|
||||
toString(): string;
|
||||
@ -333,7 +333,7 @@ export declare class Router {
|
||||
relativeLinkResolution: 'legacy' | 'corrected';
|
||||
routeReuseStrategy: RouteReuseStrategy;
|
||||
readonly routerState: RouterState;
|
||||
readonly url: string;
|
||||
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);
|
||||
@ -374,18 +374,18 @@ export declare class RouterEvent {
|
||||
export declare class RouterLink {
|
||||
fragment: string;
|
||||
preserveFragment: boolean;
|
||||
/** @deprecated */ preserveQueryParams: boolean;
|
||||
/** @deprecated */ set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
routerLink: any[] | string;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
readonly urlTree: UrlTree;
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer2, el: ElementRef);
|
||||
onClick(): boolean;
|
||||
}
|
||||
@ -394,7 +394,7 @@ export declare class RouterLinkActive implements OnChanges, OnDestroy, AfterCont
|
||||
readonly isActive: boolean;
|
||||
links: QueryList<RouterLink>;
|
||||
linksWithHrefs: QueryList<RouterLinkWithHref>;
|
||||
routerLinkActive: string[] | string;
|
||||
set routerLinkActive(data: string[] | string);
|
||||
routerLinkActiveOptions: {
|
||||
exact: boolean;
|
||||
};
|
||||
@ -408,19 +408,19 @@ export declare class RouterLinkWithHref implements OnChanges, OnDestroy {
|
||||
fragment: string;
|
||||
href: string;
|
||||
preserveFragment: boolean;
|
||||
preserveQueryParams: boolean;
|
||||
set preserveQueryParams(value: boolean);
|
||||
queryParams: {
|
||||
[k: string]: any;
|
||||
};
|
||||
queryParamsHandling: QueryParamsHandling;
|
||||
replaceUrl: boolean;
|
||||
routerLink: any[] | string;
|
||||
set routerLink(commands: any[] | string);
|
||||
skipLocationChange: boolean;
|
||||
state?: {
|
||||
[k: string]: any;
|
||||
};
|
||||
target: string;
|
||||
readonly urlTree: UrlTree;
|
||||
get urlTree(): UrlTree;
|
||||
constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy);
|
||||
ngOnChanges(changes: {}): any;
|
||||
ngOnDestroy(): any;
|
||||
@ -435,11 +435,11 @@ export declare class RouterModule {
|
||||
|
||||
export declare class RouterOutlet implements OnDestroy, OnInit {
|
||||
activateEvents: EventEmitter<any>;
|
||||
readonly activatedRoute: ActivatedRoute;
|
||||
readonly activatedRouteData: Data;
|
||||
readonly component: Object;
|
||||
get activatedRoute(): ActivatedRoute;
|
||||
get activatedRouteData(): Data;
|
||||
get component(): Object;
|
||||
deactivateEvents: EventEmitter<any>;
|
||||
readonly isActivated: boolean;
|
||||
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;
|
||||
@ -510,7 +510,7 @@ export declare type UrlMatchResult = {
|
||||
};
|
||||
|
||||
export declare class UrlSegment {
|
||||
readonly parameterMap: ParamMap;
|
||||
get parameterMap(): ParamMap;
|
||||
parameters: {
|
||||
[name: string]: string;
|
||||
};
|
||||
@ -527,7 +527,7 @@ export declare class UrlSegmentGroup {
|
||||
children: {
|
||||
[key: string]: UrlSegmentGroup;
|
||||
};
|
||||
readonly numberOfChildren: number;
|
||||
get numberOfChildren(): number;
|
||||
parent: UrlSegmentGroup | null;
|
||||
segments: UrlSegment[];
|
||||
constructor(
|
||||
@ -546,7 +546,7 @@ export declare abstract class UrlSerializer {
|
||||
|
||||
export declare class UrlTree {
|
||||
fragment: string | null;
|
||||
readonly queryParamMap: ParamMap;
|
||||
get queryParamMap(): ParamMap;
|
||||
queryParams: Params;
|
||||
root: UrlSegmentGroup;
|
||||
toString(): string;
|
||||
|
5
tools/public_api_guard/router/testing.d.ts
vendored
5
tools/public_api_guard/router/testing.d.ts
vendored
@ -6,7 +6,10 @@ export declare function setupTestingRouter(urlSerializer: UrlSerializer, context
|
||||
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 {
|
||||
stubbedModules: {
|
||||
set stubbedModules(modules: {
|
||||
[path: string]: any;
|
||||
});
|
||||
get stubbedModules(): {
|
||||
[path: string]: any;
|
||||
};
|
||||
constructor(compiler: Compiler);
|
||||
|
@ -3,7 +3,7 @@ export declare class ServiceWorkerModule {
|
||||
}
|
||||
|
||||
export declare class SwPush {
|
||||
readonly isEnabled: boolean;
|
||||
get isEnabled(): boolean;
|
||||
readonly messages: Observable<object>;
|
||||
readonly notificationClicks: Observable<{
|
||||
action: string;
|
||||
@ -28,7 +28,7 @@ export declare abstract class SwRegistrationOptions {
|
||||
export declare class SwUpdate {
|
||||
readonly activated: Observable<UpdateActivatedEvent>;
|
||||
readonly available: Observable<UpdateAvailableEvent>;
|
||||
readonly isEnabled: boolean;
|
||||
get isEnabled(): boolean;
|
||||
constructor(sw: NgswCommChannel);
|
||||
activateUpdate(): Promise<void>;
|
||||
checkForUpdate(): Promise<void>;
|
||||
|
Reference in New Issue
Block a user