Skip to content

Commit 58e5b3c

Browse files
Remove unnecessary _JSFunctionProtocol
1 parent b78f3ca commit 58e5b3c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSFunction.swift

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import _CJavaScriptKit
1010
/// alert("Hello, world")
1111
/// ```
1212
///
13-
public class JSFunction: JSObject, _JSFunctionProtocol {
13+
public class JSFunction: JSObject {
1414
#if !hasFeature(Embedded)
1515
/// Call this function with given `arguments` and binding given `this` as context.
1616
/// - Parameters:
@@ -163,14 +163,9 @@ public class JSFunction: JSObject, _JSFunctionProtocol {
163163
}
164164
}
165165

166-
/// Internal protocol to support generic arguments for `JSFunction`.
167-
///
168-
/// In Swift Embedded, non-final classes cannot have generic methods.
169-
public protocol _JSFunctionProtocol: JSFunction {}
170-
171166
#if hasFeature(Embedded)
172167
// NOTE: once embedded supports variadic generics, we can remove these overloads
173-
public extension _JSFunctionProtocol {
168+
public extension JSFunction {
174169

175170
@discardableResult
176171
func callAsFunction(this: JSObject) -> JSValue {

0 commit comments

Comments
 (0)