UNPKG

@mikhail.shtanko/redux-oop

Version:

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

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