UNPKG

redux-typed-kit

Version:

Powerful extensitions for building class-based Redux architecture powered by TypeScript.

15 lines (14 loc) 379 B
export declare type ActionType = string | number; export default class Action { public type: ActionType = this.constructor.name; toPlainObject() { const obj: any = {}; for (var x in this) { if (x === "toJSON" || x === "constructor") { continue; } obj[x] = this[x]; } return obj; } }