import Foundation

extension DPerk
{
    var type:DPerkType
    {
        get
        {
            guard
            
                let type:DPerkType = DPerkType(
                    rawValue:rawType)
            
            else
            {
                return DPerkType.error
            }
            
            return type
        }
        
        set(newValue)
        {
            rawType = newValue.rawValue
        }
    }
}

import Foundation

extension DPerk
{
    
}

--- 
+++ 
@@ -2,5 +2,26 @@
 
 extension DPerk
 {
-    
+    var type:DPerkType
+    {
+        get
+        {
+            guard
+            
+                let type:DPerkType = DPerkType(
+                    rawValue:rawType)
+            
+            else
+            {
+                return DPerkType.error
+            }
+            
+            return type
+        }
+        
+        set(newValue)
+        {
+            rawType = newValue.rawValue
+        }
+    }
 }
Add computed property for perk type
