Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c74e3d1

Browse files
j-f1MaxDesiatov
andauthored
Apply suggestions from code review
Co-authored-by: Max Desiatov <[email protected]>
1 parent ff1f4ac commit c74e3d1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Sources/JavaScriptKit/BasicObjects/JSArray.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ extension JSArray: RandomAccessCollection {
3636
}
3737

3838
public class Iterator: IteratorProtocol {
39-
let jsObject: JSObject
40-
var index = 0
39+
private let jsObject: JSObject
40+
private var index = 0
4141
init(jsObject: JSObject) {
4242
self.jsObject = jsObject
4343
}

Sources/JavaScriptKit/JSBridgedType.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public protocol JSBridgedClass: JSBridgedType {
2424
static var constructor: JSFunction { get }
2525

2626
/// The JavaScript object wrapped by this instance.
27-
/// You may assume that `jsObject instanceof Self.constructor`
27+
/// You may assume that `jsObject instanceof Self.constructor == true`
2828
var jsObject: JSObject { get }
2929

3030
/// Create an instannce wrapping the given JavaScript object.

Sources/JavaScriptKit/JSValueConvertible.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,6 @@ extension Array where Element == JSValueConvertible {
266266

267267
extension Array where Element: JSValueConvertible {
268268
func withRawJSValues<T>(_ body: ([RawJSValue]) -> T) -> T {
269-
Array<JSValueConvertible>.withRawJSValues(self)(body)
269+
[JSValueConvertible].withRawJSValues(self)(body)
270270
}
271271
}

0 commit comments

Comments
 (0)