@@ -486,6 +486,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
486486 }
487487}
488488
489+ @inlinable public func _toJSValue< ReturnType> ( _ value: @escaping ( ) -> ReturnType ) -> JSValue
490+ where ReturnType: JSValueCompatible
491+ {
492+ JSClosure { _ in
493+ _toJSValue ( value ( ) )
494+ } . jsValue
495+ }
496+
489497@propertyWrapper public final class ClosureAttribute0Optional < ReturnType>
490498 where ReturnType: JSValueCompatible
491499{
@@ -521,6 +529,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
521529 }
522530}
523531
532+ @inlinable public func _toJSValue< ReturnType> ( _ value: ( ( ) -> ReturnType ) ? ) -> JSValue
533+ where ReturnType: JSValueCompatible
534+ {
535+ JSClosure { _ in
536+ _toJSValue ( value ? ( ) )
537+ } . jsValue
538+ }
539+
524540@propertyWrapper public final class ClosureAttribute0OptionalVoid {
525541 @usableFromInline let jsObject : JSObject
526542 @usableFromInline let name : JSString
@@ -555,6 +571,13 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
555571 }
556572}
557573
574+ @inlinable public func _toJSValue( _ value: ( ( ) -> Void ) ? ) -> JSValue {
575+ JSClosure { _ in
576+ value ? ( )
577+ return . undefined
578+ } . jsValue
579+ }
580+
558581@propertyWrapper public final class ClosureAttribute0Void {
559582 @usableFromInline let jsObject : JSObject
560583 @usableFromInline let name : JSString
@@ -583,6 +606,13 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
583606 }
584607}
585608
609+ @inlinable public func _toJSValue( _ value: @escaping ( ) -> Void ) -> JSValue {
610+ JSClosure { _ in
611+ value ( )
612+ return . undefined
613+ } . jsValue
614+ }
615+
586616@propertyWrapper public final class ClosureAttribute1 < A0, ReturnType>
587617 where A0: JSValueCompatible , ReturnType: JSValueCompatible
588618{
@@ -612,6 +642,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
612642 }
613643}
614644
645+ @inlinable public func _toJSValue< A0, ReturnType> ( _ value: @escaping ( A0 ) -> ReturnType ) -> JSValue
646+ where A0: JSValueCompatible , ReturnType: JSValueCompatible
647+ {
648+ JSClosure {
649+ _toJSValue ( value ( $0 [ 0 ] . fromJSValue ( ) !) )
650+ } . jsValue
651+ }
652+
615653@propertyWrapper public final class ClosureAttribute1Optional < A0, ReturnType>
616654 where A0: JSValueCompatible , ReturnType: JSValueCompatible
617655{
@@ -647,6 +685,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
647685 }
648686}
649687
688+ @inlinable public func _toJSValue< A0, ReturnType> ( _ value: ( ( A0 ) -> ReturnType ) ? ) -> JSValue
689+ where A0: JSValueCompatible , ReturnType: JSValueCompatible
690+ {
691+ JSClosure {
692+ _toJSValue ( value ? ( $0 [ 0 ] . fromJSValue ( ) !) )
693+ } . jsValue
694+ }
695+
650696@propertyWrapper public final class ClosureAttribute1OptionalVoid < A0>
651697 where A0: JSValueCompatible
652698{
@@ -683,6 +729,15 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
683729 }
684730}
685731
732+ @inlinable public func _toJSValue< A0> ( _ value: ( ( A0 ) -> Void ) ? ) -> JSValue
733+ where A0: JSValueCompatible
734+ {
735+ JSClosure {
736+ value ? ( $0 [ 0 ] . fromJSValue ( ) !)
737+ return . undefined
738+ } . jsValue
739+ }
740+
686741@propertyWrapper public final class ClosureAttribute1Void < A0>
687742 where A0: JSValueCompatible
688743{
@@ -713,6 +768,15 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
713768 }
714769}
715770
771+ @inlinable public func _toJSValue< A0> ( _ value: @escaping ( A0 ) -> Void ) -> JSValue
772+ where A0: JSValueCompatible
773+ {
774+ JSClosure {
775+ value ( $0 [ 0 ] . fromJSValue ( ) !)
776+ return . undefined
777+ } . jsValue
778+ }
779+
716780@propertyWrapper public final class ClosureAttribute2 < A0, A1, ReturnType>
717781 where A0: JSValueCompatible , A1: JSValueCompatible , ReturnType: JSValueCompatible
718782{
@@ -742,6 +806,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
742806 }
743807}
744808
809+ @inlinable public func _toJSValue< A0, A1, ReturnType> ( _ value: @escaping ( A0 , A1 ) -> ReturnType ) -> JSValue
810+ where A0: JSValueCompatible , A1: JSValueCompatible , ReturnType: JSValueCompatible
811+ {
812+ JSClosure {
813+ _toJSValue ( value ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !) )
814+ } . jsValue
815+ }
816+
745817@propertyWrapper public final class ClosureAttribute2Optional < A0, A1, ReturnType>
746818 where A0: JSValueCompatible , A1: JSValueCompatible , ReturnType: JSValueCompatible
747819{
@@ -777,6 +849,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
777849 }
778850}
779851
852+ @inlinable public func _toJSValue< A0, A1, ReturnType> ( _ value: ( ( A0 , A1 ) -> ReturnType ) ? ) -> JSValue
853+ where A0: JSValueCompatible , A1: JSValueCompatible , ReturnType: JSValueCompatible
854+ {
855+ JSClosure {
856+ _toJSValue ( value ? ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !) )
857+ } . jsValue
858+ }
859+
780860@propertyWrapper public final class ClosureAttribute2OptionalVoid < A0, A1>
781861 where A0: JSValueCompatible , A1: JSValueCompatible
782862{
@@ -813,6 +893,15 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
813893 }
814894}
815895
896+ @inlinable public func _toJSValue< A0, A1> ( _ value: ( ( A0 , A1 ) -> Void ) ? ) -> JSValue
897+ where A0: JSValueCompatible , A1: JSValueCompatible
898+ {
899+ JSClosure {
900+ value ? ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !)
901+ return . undefined
902+ } . jsValue
903+ }
904+
816905@propertyWrapper public final class ClosureAttribute2Void < A0, A1>
817906 where A0: JSValueCompatible , A1: JSValueCompatible
818907{
@@ -843,6 +932,15 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
843932 }
844933}
845934
935+ @inlinable public func _toJSValue< A0, A1> ( _ value: @escaping ( A0 , A1 ) -> Void ) -> JSValue
936+ where A0: JSValueCompatible , A1: JSValueCompatible
937+ {
938+ JSClosure {
939+ value ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !)
940+ return . undefined
941+ } . jsValue
942+ }
943+
846944@propertyWrapper public final class ClosureAttribute3 < A0, A1, A2, ReturnType>
847945 where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , ReturnType: JSValueCompatible
848946{
@@ -872,6 +970,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
872970 }
873971}
874972
973+ @inlinable public func _toJSValue< A0, A1, A2, ReturnType> ( _ value: @escaping ( A0 , A1 , A2 ) -> ReturnType ) -> JSValue
974+ where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , ReturnType: JSValueCompatible
975+ {
976+ JSClosure {
977+ _toJSValue ( value ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !, $0 [ 2 ] . fromJSValue ( ) !) )
978+ } . jsValue
979+ }
980+
875981@propertyWrapper public final class ClosureAttribute3Optional < A0, A1, A2, ReturnType>
876982 where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , ReturnType: JSValueCompatible
877983{
@@ -907,6 +1013,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
9071013 }
9081014}
9091015
1016+ @inlinable public func _toJSValue< A0, A1, A2, ReturnType> ( _ value: ( ( A0 , A1 , A2 ) -> ReturnType ) ? ) -> JSValue
1017+ where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , ReturnType: JSValueCompatible
1018+ {
1019+ JSClosure {
1020+ _toJSValue ( value ? ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !, $0 [ 2 ] . fromJSValue ( ) !) )
1021+ } . jsValue
1022+ }
1023+
9101024@propertyWrapper public final class ClosureAttribute5 < A0, A1, A2, A3, A4, ReturnType>
9111025 where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , A3: JSValueCompatible , A4: JSValueCompatible , ReturnType: JSValueCompatible
9121026{
@@ -936,6 +1050,14 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
9361050 }
9371051}
9381052
1053+ @inlinable public func _toJSValue< A0, A1, A2, A3, A4, ReturnType> ( _ value: @escaping ( A0 , A1 , A2 , A3 , A4 ) -> ReturnType ) -> JSValue
1054+ where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , A3: JSValueCompatible , A4: JSValueCompatible , ReturnType: JSValueCompatible
1055+ {
1056+ JSClosure {
1057+ _toJSValue ( value ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !, $0 [ 2 ] . fromJSValue ( ) !, $0 [ 3 ] . fromJSValue ( ) !, $0 [ 4 ] . fromJSValue ( ) !) )
1058+ } . jsValue
1059+ }
1060+
9391061@propertyWrapper public final class ClosureAttribute5Optional < A0, A1, A2, A3, A4, ReturnType>
9401062 where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , A3: JSValueCompatible , A4: JSValueCompatible , ReturnType: JSValueCompatible
9411063{
@@ -970,3 +1092,11 @@ public enum String_or_record_String_to_String_or_seq_of_seq_of_String: JSValueCo
9701092 }
9711093 }
9721094}
1095+
1096+ @inlinable public func _toJSValue< A0, A1, A2, A3, A4, ReturnType> ( _ value: ( ( A0 , A1 , A2 , A3 , A4 ) -> ReturnType ) ? ) -> JSValue
1097+ where A0: JSValueCompatible , A1: JSValueCompatible , A2: JSValueCompatible , A3: JSValueCompatible , A4: JSValueCompatible , ReturnType: JSValueCompatible
1098+ {
1099+ JSClosure {
1100+ _toJSValue ( value ? ( $0 [ 0 ] . fromJSValue ( ) !, $0 [ 1 ] . fromJSValue ( ) !, $0 [ 2 ] . fromJSValue ( ) !, $0 [ 3 ] . fromJSValue ( ) !, $0 [ 4 ] . fromJSValue ( ) !) )
1101+ } . jsValue
1102+ }
0 commit comments