use std::string::String;
use js_types::js_obj::JsObjStruct;
use js_types::js_str::JsStrStruct;
use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;

pub struct JsT {
    pub uuid: Uuid,
    pub t: JsType,
}

impl JsT {
    pub fn new(t: JsType) -> JsT {
        JsT {
            uuid: Uuid::new_v4(),
            t: t,
        }
    }
}

impl PartialEq for JsT {
    fn eq(&self, other: &Self) -> bool {
        self.uuid == other.uuid
    }

    fn ne(&self, other: &Self) -> bool {
        !self.eq(other)
    }
}

impl Eq for JsT {}

impl Hash for JsT {
    fn hash<H>(&self, state: &mut H) where H: Hasher {
        self.uuid.hash(state);
    }

    fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher {
        for ref d in data {
            d.uuid.hash(state);
        }
    }
}

pub enum JsType {
    JsUndef,
    JsNull,
    JsNum(f64),
    JsSym(String),
    JsStr(JsStrStruct),
    JsObj(JsObjStruct),
}

// `array`
pub type JsArr = Vec<JsType>;

use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;

pub trait JsTrait {}

pub struct JsT {
    uid: Uuid,
    t: Box<JsTrait>,
}

impl JsT {
    pub fn new(t: Box<JsTrait>) -> JsT {
        JsT {
            uid: Uuid::new_v4(),
            t: t,
        }
    }
}

impl PartialEq for JsT {
    fn eq(&self, other: &Self) -> bool {
        self.uid == other.uid
    }

    fn ne(&self, other: &Self) -> bool {
        !self.eq(other)
    }
}

impl Eq for JsT {}

impl Hash for JsT {
    fn hash<H>(&self, state: &mut H) where H: Hasher {
        self.uid.hash(state);
    }

    fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher {
        for ref d in data {
            d.uid.hash(state);
        }
    }
}


--- 
+++ 
@@ -1,19 +1,18 @@
-use std::string::String;
-use js_types::js_obj::JsObjStruct;
-use js_types::js_str::JsStrStruct;
 use std::cmp::Ordering;
 use std::hash::{Hash, Hasher};
 use uuid::Uuid;
 
+pub trait JsTrait {}
+
 pub struct JsT {
-    pub uuid: Uuid,
-    pub t: JsType,
+    uid: Uuid,
+    t: Box<JsTrait>,
 }
 
 impl JsT {
-    pub fn new(t: JsType) -> JsT {
+    pub fn new(t: Box<JsTrait>) -> JsT {
         JsT {
-            uuid: Uuid::new_v4(),
+            uid: Uuid::new_v4(),
             t: t,
         }
     }
@@ -21,7 +20,7 @@
 
 impl PartialEq for JsT {
     fn eq(&self, other: &Self) -> bool {
-        self.uuid == other.uuid
+        self.uid == other.uid
     }
 
     fn ne(&self, other: &Self) -> bool {
@@ -33,24 +32,13 @@
 
 impl Hash for JsT {
     fn hash<H>(&self, state: &mut H) where H: Hasher {
-        self.uuid.hash(state);
+        self.uid.hash(state);
     }
 
     fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher {
         for ref d in data {
-            d.uuid.hash(state);
+            d.uid.hash(state);
         }
     }
 }
 
-pub enum JsType {
-    JsUndef,
-    JsNull,
-    JsNum(f64),
-    JsSym(String),
-    JsStr(JsStrStruct),
-    JsObj(JsObjStruct),
-}
-
-// `array`
-pub type JsArr = Vec<JsType>;
Create new enum of all standard JS types
