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:
@ -385,9 +385,9 @@ export class Router {
|
||||
* router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
|
||||
* ```
|
||||
*/
|
||||
createUrlTree(
|
||||
commands: any[], {relativeTo, queryParams, fragment, preserveQueryParams, queryParamsHandling,
|
||||
preserveFragment}: NavigationExtras = {}): UrlTree {
|
||||
createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {
|
||||
const {relativeTo, queryParams, fragment,
|
||||
preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;
|
||||
if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {
|
||||
console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user