fix: allow passing partial params to setParams (#177)

Since params get merged, no need to send them all I think :)
This commit is contained in:
Thibault Malbranche
2019-11-19 22:58:44 +01:00
committed by Satyajit Sahoo
parent cb426d06de
commit c3e9e4578e

View File

@@ -371,7 +371,7 @@ export type NavigationHelpers<
* @param params Params object for the current route.
*/
setParams<RouteName extends keyof ParamList>(
params: ParamList[RouteName]
params: Partial<ParamList[RouteName]>
): void;
};
@@ -409,7 +409,7 @@ export type NavigationProp<
*
* @param params Params object for the current route.
*/
setParams(params: ParamList[RouteName]): void;
setParams(params: Partial<ParamList[RouteName]>): void;
/**
* Update the options for the route.