Skip to content

Commit 3a4ccee

Browse files
committed
Update function call signature
1 parent ec9a29a commit 3a4ccee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/JavaScriptKit/JSFunction.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ public enum _JSFunctionConstructorSymbol {
66

77
public class JSFunctionRef: JSObjectRef {
88
@discardableResult
9-
public func callAsFunction(this: JSObjectRef? = nil, _ arguments: [JSValueConvertible]) -> JSValue {
10-
let result = arguments.withRawJSValues { rawValues in
9+
func callAsFunction(this: JSObjectRef? = nil, args: [JSValueConvertible]) -> JSValue {
10+
let result = args.withRawJSValues { rawValues in
1111
rawValues.withUnsafeBufferPointer { bufferPointer -> RawJSValue in
1212
let argv = bufferPointer.baseAddress
1313
let argc = bufferPointer.count
@@ -29,8 +29,8 @@ public class JSFunctionRef: JSObjectRef {
2929
}
3030

3131
@discardableResult
32-
public func callAsFunction(this: JSObjectRef? = nil, _ arguments: JSValueConvertible...) -> JSValue {
33-
self(this: this, arguments)
32+
public func callAsFunction(this: JSObjectRef? = nil, _ args: JSValueConvertible...) -> JSValue {
33+
self(this: this, args: args)
3434
}
3535

3636
public func callAsFunction(new arguments: JSValueConvertible...) -> JSObjectRef {

0 commit comments

Comments
 (0)