fix: argument destructuring sometimes breaks strictNullChecks
Destructuring of the form: function foo({a, b}: {a?, b?} = {}) breaks strictNullChecks, due to the TypeScript bug https://github.com/microsoft/typescript/issues/10078. This change eliminates usage of destructuring in function argument lists in cases where it would leak into the public API .d.ts.
This commit is contained in:
16
tools/public_api_guard/core/core.d.ts
vendored
16
tools/public_api_guard/core/core.d.ts
vendored
@ -262,10 +262,10 @@ export declare const ContentChild: ContentChildDecorator;
|
||||
|
||||
/** @stable */
|
||||
export interface ContentChildDecorator {
|
||||
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
|
||||
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, {read}?: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): ContentChild;
|
||||
}
|
||||
@ -275,11 +275,11 @@ export declare const ContentChildren: ContentChildrenDecorator;
|
||||
|
||||
/** @stable */
|
||||
export interface ContentChildrenDecorator {
|
||||
/** @stable */ (selector: Type<any> | Function | string, {descendants, read}?: {
|
||||
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
||||
descendants?: boolean;
|
||||
read?: any;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, {descendants, read}?: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
descendants?: boolean;
|
||||
read?: any;
|
||||
}): Query;
|
||||
@ -1058,10 +1058,10 @@ export declare const ViewChild: ViewChildDecorator;
|
||||
|
||||
/** @stable */
|
||||
export interface ViewChildDecorator {
|
||||
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
|
||||
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, {read}?: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): ViewChild;
|
||||
}
|
||||
@ -1071,10 +1071,10 @@ export declare const ViewChildren: ViewChildrenDecorator;
|
||||
|
||||
/** @stable */
|
||||
export interface ViewChildrenDecorator {
|
||||
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
|
||||
/** @stable */ (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, {read}?: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
}): ViewChildren;
|
||||
}
|
||||
|
18
tools/public_api_guard/forms/forms.d.ts
vendored
18
tools/public_api_guard/forms/forms.d.ts
vendored
@ -21,42 +21,42 @@ export declare abstract class AbstractControl {
|
||||
constructor(validator: ValidatorFn | null, asyncValidator: AsyncValidatorFn | null);
|
||||
clearAsyncValidators(): void;
|
||||
clearValidators(): void;
|
||||
disable({onlySelf, emitEvent}?: {
|
||||
disable(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
enable({onlySelf, emitEvent}?: {
|
||||
enable(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
get(path: Array<string | number> | string): AbstractControl | null;
|
||||
getError(errorCode: string, path?: string[]): any;
|
||||
hasError(errorCode: string, path?: string[]): boolean;
|
||||
markAsDirty({onlySelf}?: {
|
||||
markAsDirty(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsPending({onlySelf}?: {
|
||||
markAsPending(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsPristine({onlySelf}?: {
|
||||
markAsPristine(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsTouched({onlySelf}?: {
|
||||
markAsTouched(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
markAsUntouched({onlySelf}?: {
|
||||
markAsUntouched(opts?: {
|
||||
onlySelf?: boolean;
|
||||
}): void;
|
||||
abstract patchValue(value: any, options?: Object): void;
|
||||
abstract reset(value?: any, options?: Object): void;
|
||||
setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[]): void;
|
||||
setErrors(errors: ValidationErrors | null, {emitEvent}?: {
|
||||
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({onlySelf, emitEvent}?: {
|
||||
updateValueAndValidity(opts?: {
|
||||
onlySelf?: boolean;
|
||||
emitEvent?: boolean;
|
||||
}): void;
|
||||
|
2
tools/public_api_guard/router/router.d.ts
vendored
2
tools/public_api_guard/router/router.d.ts
vendored
@ -259,7 +259,7 @@ export declare class Router {
|
||||
readonly url: string;
|
||||
urlHandlingStrategy: UrlHandlingStrategy;
|
||||
constructor(rootComponentType: Type<any> | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes);
|
||||
createUrlTree(commands: any[], {relativeTo, queryParams, fragment, preserveQueryParams, queryParamsHandling, preserveFragment}?: NavigationExtras): UrlTree;
|
||||
createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree;
|
||||
dispose(): void;
|
||||
initialNavigation(): void;
|
||||
isActive(url: string | UrlTree, exact: boolean): boolean;
|
||||
|
Reference in New Issue
Block a user