@@ -139,28 +139,25 @@ extension JSValue {
139
139
}
140
140
141
141
142
- private func withRawJSValues< T> ( _ this: [ JSValueConvertible ] , _ body: ( [ RawJSValue ] ) -> T ) -> T {
143
- func _withRawJSValues< T> (
144
- _ values: [ JSValueConvertible ] , _ index: Int ,
145
- _ results: inout [ RawJSValue ] , _ body: ( [ RawJSValue ] ) -> T ) -> T {
146
- if index == values. count { return body ( results) }
147
- return values [ index] . jsValue ( ) . withRawJSValue { ( rawValue) -> T in
148
- results. append ( rawValue)
149
- return _withRawJSValues ( values, index + 1 , & results, body)
150
- }
151
- }
152
- var _results = [ RawJSValue] ( )
153
- return _withRawJSValues ( this, 0 , & _results, body)
154
- }
155
142
156
143
extension Array where Element == JSValueConvertible {
157
144
func withRawJSValues< T> ( _ body: ( [ RawJSValue ] ) -> T ) -> T {
158
- JavaScriptKit . withRawJSValues ( self , body)
145
+ func _withRawJSValues< T> (
146
+ _ values: [ JSValueConvertible ] , _ index: Int ,
147
+ _ results: inout [ RawJSValue ] , _ body: ( [ RawJSValue ] ) -> T ) -> T {
148
+ if index == values. count { return body ( results) }
149
+ return values [ index] . jsValue ( ) . withRawJSValue { ( rawValue) -> T in
150
+ results. append ( rawValue)
151
+ return _withRawJSValues ( values, index + 1 , & results, body)
152
+ }
153
+ }
154
+ var _results = [ RawJSValue] ( )
155
+ return _withRawJSValues ( self , 0 , & _results, body)
159
156
}
160
157
}
161
158
162
159
extension Array where Element: JSValueConvertible {
163
160
func withRawJSValues< T> ( _ body: ( [ RawJSValue ] ) -> T ) -> T {
164
- JavaScriptKit . withRawJSValues ( self , body)
161
+ Swift . Array < JSValueConvertible > . withRawJSValues ( self ) ( body)
165
162
}
166
163
}
0 commit comments