From e56d58af2f0b45fc220ef3c65395ad445c419344 Mon Sep 17 00:00:00 2001 From: Dmitriy Shekhovtsov Date: Thu, 6 Apr 2017 17:35:46 +0300 Subject: [PATCH] feat(models): make action a generic type This is not an actual PR, more like proposal for consideration Typesafe maniac like would be really greatful for strictly typed Action TS v2.2+ introduces defaults for generic types so `Action` means Action is generic, but it will be any if type not provided --- src/models.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models.ts b/src/models.ts index 221016c..8df3a8d 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,5 +1,6 @@ -export interface Action { +export interface Action { readonly type: string; + readonly payload?: T; } export interface ActionReducer {