Skip to content

Instantly share code, notes, and snippets.

@intoxopox
Last active October 12, 2018 17:14
Show Gist options
  • Save intoxopox/5115227e92c32f64cdc59f02a31d0086 to your computer and use it in GitHub Desktop.
Save intoxopox/5115227e92c32f64cdc59f02a31d0086 to your computer and use it in GitHub Desktop.
ValueObj - Simple class for storing data values of any type
////////////////////////////////////////////////////////////////////////////////
// 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