Skip to content

Commit 43607e5

Browse files
Remove unnecessary _JSObjectProtocol
The workaround is no longer needed for the latest toolchain.
1 parent b7a3ac6 commit 43607e5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSObject.swift

+3-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import _CJavaScriptKit
1515
/// The lifetime of this object is managed by the JavaScript and Swift runtime bridge library with
1616
/// reference counting system.
1717
@dynamicMemberLookup
18-
public class JSObject: _JSObjectProtocol, Equatable {
18+
public class JSObject: Equatable {
1919
@_spi(JSObject_id)
2020
public var id: JavaScriptObjectRef
2121
@_spi(JSObject_id)
@@ -231,15 +231,10 @@ public class JSThrowingObject {
231231
}
232232
#endif
233233

234-
/// Internal protocol to support generic arguments for `JSObject`.
235-
///
236-
/// In Swift Embedded, non-final classes cannot have generic methods.
237-
public protocol _JSObjectProtocol: JSObject {
238-
}
239234

240235
#if hasFeature(Embedded)
241236
// NOTE: once embedded supports variadic generics, we can remove these overloads
242-
public extension _JSObjectProtocol {
237+
public extension JSObject {
243238
@_disfavoredOverload
244239
subscript(dynamicMember name: String) -> (() -> JSValue)? {
245240
self[name].function.map { function in
@@ -261,4 +256,4 @@ public extension _JSObjectProtocol {
261256
}
262257
}
263258
}
264-
#endif
259+
#endif

0 commit comments

Comments
 (0)