Skip to content

Commit 9f46135

Browse files
committed
fix availability annotations
1 parent 7fb7baa commit 9f46135

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Sources/JavaScriptKit/BasicObjects/JSPromise.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public final class JSPromise: JSBridgedClass {
7777

7878
#if compiler(>=5.5)
7979
/// Schedules the `success` closure to be invoked on successful completion of `self`.
80-
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
80+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
8181
@discardableResult
8282
public func then(success: @escaping (JSValue) async -> ConvertibleToJSValue) -> JSPromise {
8383
let closure = JSOneshotClosure.async {
@@ -102,7 +102,7 @@ public final class JSPromise: JSBridgedClass {
102102

103103
#if compiler(>=5.5)
104104
/// Schedules the `success` closure to be invoked on successful completion of `self`.
105-
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
105+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
106106
@discardableResult
107107
public func then(success: @escaping (JSValue) async -> ConvertibleToJSValue,
108108
failure: @escaping (JSValue) async -> ConvertibleToJSValue) -> JSPromise {
@@ -127,7 +127,7 @@ public final class JSPromise: JSBridgedClass {
127127

128128
#if compiler(>=5.5)
129129
/// Schedules the `failure` closure to be invoked on rejected completion of `self`.
130-
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
130+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
131131
@discardableResult
132132
public func `catch`(failure: @escaping (JSValue) async -> ConvertibleToJSValue) -> JSPromise {
133133
let closure = JSOneshotClosure.async {

Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class JSOneshotClosure: JSObject, JSClosureProtocol {
3131
}
3232

3333
#if compiler(>=5.5)
34+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
3435
static func async(_ body: @escaping ([JSValue]) async throws -> JSValue) -> JSOneshotClosure {
3536
JSOneshotClosure(makeAsyncClosure(body))
3637
}
@@ -91,7 +92,7 @@ public class JSClosure: JSObject, JSClosureProtocol {
9192
}
9293

9394
#if compiler(>=5.5)
94-
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
95+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
9596
static func async(_ body: @escaping ([JSValue]) async throws -> JSValue) -> JSClosure {
9697
JSClosure(makeAsyncClosure(body))
9798
}
@@ -107,7 +108,7 @@ public class JSClosure: JSObject, JSClosureProtocol {
107108
}
108109

109110
#if compiler(>=5.5)
110-
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
111+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
111112
private func makeAsyncClosure(_ body: @escaping ([JSValue]) async throws -> JSValue) -> (([JSValue]) -> JSValue) {
112113
{ arguments in
113114
JSPromise { resolver in

0 commit comments

Comments
 (0)