Created
March 10, 2018 13:17
-
-
Save nomanHasan/4684aa3487a358d25f598856ef5cd4ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Action { | |
constructor(public type) { | |
} | |
public request = this.type; | |
public success = this.type + '_SUCCESS'; | |
public failure = this.type + '_FAILURE'; | |
} | |
const CREATE_TODO = new Action('[Todo] CREATE_TODO'); | |
console.log(CREATE_TODO); | |
console.log(CREATE_TODO.success); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment