@@ -139,28 +139,25 @@ extension JSValue {
139139}
140140
141141
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- }
155142
156143extension Array where Element == JSValueConvertible {
157144 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)
159156 }
160157}
161158
162159extension Array where Element: JSValueConvertible {
163160 func withRawJSValues< T> ( _ body: ( [ RawJSValue ] ) -> T ) -> T {
164- JavaScriptKit . withRawJSValues ( self , body)
161+ Swift . Array < JSValueConvertible > . withRawJSValues ( self ) ( body)
165162 }
166163}
0 commit comments