diff --git a/src/transition/transition.ts b/src/transition/transition.ts index ac7734d5..05b4ca83 100644 --- a/src/transition/transition.ts +++ b/src/transition/transition.ts @@ -259,7 +259,9 @@ export class Transition implements IHookRegistry { * * @returns transition parameter values for the desired path. */ - params(pathname: string = "to"): { [key: string]: any } { + params(pathname?: string): any; + params(pathname?: string): T; + params(pathname: string = "to") { return this._treeChanges[pathname].map(prop("paramValues")).reduce(mergeR, {}); }