From d27aefca8bf49d045d3e1aef9b22a9f2ac831630 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sun, 20 Sep 2020 17:18:24 +0800 Subject: [PATCH] fix(type): Add the missed parameter to useRouter `useRouter` supports pass an optional parameter to indicate whether the the router should be dynamic or not. But it was missed in the type definitions. See https://github.com/NervJS/taro/blob/93c6d6e18f29ab2c2844da8641746b55d6a7df18/packages/taro-runtime/src/dsl/hooks.ts#L81 --- packages/taro/types/taro.hooks.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taro/types/taro.hooks.d.ts b/packages/taro/types/taro.hooks.d.ts index 330f94984fe6..18af18d38b31 100644 --- a/packages/taro/types/taro.hooks.d.ts +++ b/packages/taro/types/taro.hooks.d.ts @@ -61,7 +61,7 @@ declare namespace Taro { /** * 获取当前路由参数。 */ - function useRouter> = Partial>>(): RouterInfo + function useRouter> = Partial>>(dynamic?: boolean): RouterInfo /** * 导航栏的标题被点击时的回调。