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:
Alex Rickabaugh
2017-06-12 10:59:29 -07:00
committed by Hans
parent 009651e14f
commit c59c390cdc
8 changed files with 91 additions and 97 deletions

View File

@ -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;
}