@@ -7,7 +7,6 @@ export interface IAction {
77export type IActionCreator = ( ...args :any [ ] ) => IAction
88export type IActionConstructor = new ( ...args :any [ ] ) => IAction
99const isArrowFunction = ( action :IActionConstructor | IActionCreator ) :action isIActionCreator => ! action . prototype
10- const isES6Class = ( action :IActionConstructor | IActionCreator ) :boolean => action . toString ( ) . indexOf ( 'class' ) === 0
1110const typeGuardActionHasOwnType = ( action :IAction | IActionConstructor | IActionCreator ) :action isIAction =>
1211typeof ( action as IAction ) . type === 'string' // tslint:disable-line strict-type-predicates
1312const typeGuardActionIsString = ( action :IAction | IActionConstructor | IActionCreator | string ) :action isstring =>
@@ -20,11 +19,6 @@ const getActionType = (action: IAction | IActionConstructor | IActionCreator | s
2019if ( typeGuardActionHasOwnType ( action ) ) {
2120return action . type
2221}
23- // ES6 classes can not be invoked without `new` so we handle them separately
24- if ( isES6Class ( action ) ) {
25- const classInstance = new ( action as IActionConstructor ) ( )
26- return classInstance . type
27- }
2822try {
2923if ( isArrowFunction ( action ) ) {
3024const actionCreatorArrowFnRes = action ( )