Last active
October 12, 2018 17:14
-
-
Save intoxopox/5115227e92c32f64cdc59f02a31d0086 to your computer and use it in GitHub Desktop.
ValueObj - Simple class for storing data values of any type
This file contains 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
//////////////////////////////////////////////////////////////////////////////// | |
// Copyright(C) 2018 David Hamiter | |
//////////////////////////////////////////////////////////////////////////////// | |
export default class ValueObj<T = any> | |
{ | |
//---------------------------------------------------------------------- | |
// | |
// Properties | |
// | |
//---------------------------------------------------------------------- | |
public label: string; | |
public data: T; | |
//---------------------------------------------------------------------- | |
// | |
// Constructor | |
// | |
//---------------------------------------------------------------------- | |
constructor(label?: string, data?: T) { | |
if (label) this.label = label; | |
if (data) this.data = data; | |
} | |
//---------------------------------------------------------------------- | |
// | |
// Event Handlers | |
// | |
//---------------------------------------------------------------------- | |
//---------------------------------------------------------------------- | |
// | |
// Methods | |
// | |
//---------------------------------------------------------------------- | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment