Skip to content

Instantly share code, notes, and snippets.

@weblabtechnology
Last active December 6, 2017 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weblabtechnology/d91db0af8ca5ab1b26943a7909791a25 to your computer and use it in GitHub Desktop.
Save weblabtechnology/d91db0af8ca5ab1b26943a7909791a25 to your computer and use it in GitHub Desktop.
enum EventType {
TEST_EVENT,
GET_USER_INFO,
}
class Event {
private type: EventType;
private payload: any;
constructor(type: EventType, payload: any) {
this.type = type;
this.payload = payload;
}
public getType(): EventType { return this.type; }
public getPayload(): any { return this.payload; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment