Browse Source

Add copy() to DynamicAccess (#5863)

Kevin Leung 8 năm trước cách đây
mục cha
commit
2d9a21c723
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      std/haxe/DynamicAccess.hx

+ 5 - 0
std/haxe/DynamicAccess.hx

@@ -91,4 +91,9 @@ abstract DynamicAccess<T>(Dynamic<T>) from Dynamic<T> to Dynamic<T> {
 		Returns an array of `keys` in a structure.
 	**/
 	public inline function keys():Array<String> return Reflect.fields(this);
+	
+	/**
+		Returns a shallow copy of the structure
+	**/
+	public inline function copy():DynamicAccess<T> return Reflect.copy(this);
 }