From 76be4cb9528e4961eceef1f6fa376ccf230376ab Mon Sep 17 00:00:00 2001 From: Pau Marfany Date: Tue, 30 Apr 2019 11:27:11 +0200 Subject: [PATCH] TypeScript: Create and export types for routerActions so they can be imported and used in definitions (@afholderman in #189) --- index.d.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2c360a17..a5e1a804 100644 --- a/index.d.ts +++ b/index.d.ts @@ -43,12 +43,18 @@ declare module 'connected-react-router' { export function goBack(): CallHistoryMethodAction; export function goForward(): CallHistoryMethodAction; + export type Push = typeof push; + export type Replace = typeof replace; + export type Go = typeof go; + export type GoBack = typeof goBack; + export type GoForward = typeof goForward; + export const routerActions: { - push: typeof push; - replace: typeof replace; - go: typeof go; - goBack: typeof goBack; - goForward: typeof goForward; + push: Push; + replace: Replace; + go: Go; + goBack: GoBack; + goForward: GoForward; }; export interface LocationActionPayload {