diff --git a/NativeScript/runtime/SwiftInterop.h b/NativeScript/runtime/SwiftInterop.h index f321527c..38afa13d 100644 --- a/NativeScript/runtime/SwiftInterop.h +++ b/NativeScript/runtime/SwiftInterop.h @@ -40,7 +40,7 @@ // calls it by reporting the arguments as an array: callbackBegin, each // argument through the complete* entries, then completeArrayEnd. -#define NS_SWIFT_ABI_VERSION 11 +#define NS_SWIFT_ABI_VERSION 13 #ifdef __cplusplus extern "C" { @@ -120,6 +120,12 @@ enum { // refines. Its members are its requirements (NSSwiftMemberRequirement) // and extension members, called on boxed values of the protocol. NSSwiftTypeProtocol = 5, + // An Objective-C-visible class declared in Swift; `jsName` is its + // Objective-C class name. Its Swift-only members install on NativeScript's + // class for it (instance members on its prototype, `init` and static + // members on its constructor), called with NativeScript's wrapper of the + // object as the receiver (NSSwiftTagObjC). The type has no JS class here. + NSSwiftTypeObjCClass = 6, }; enum { @@ -166,8 +172,20 @@ enum { // B Data: bytes (NSSwiftTagString) <-> Uint8Array copy // [] array (NSSwiftTagArray) <-> JS array copy // {} [String: ] (NSSwiftTagMap) <-> plain JS object copy -// (,...) -// closure returning Void, of the listed parameters +// ! Error: its message (NSSwiftTagString) <- any JS value (an +// Error's message); returnErrorValue -> JS Error named +// "SwiftError" +// R(,) +// Result, as a tagged enum of two cases (NSSwiftTagCase): +// { case: "success", value } and { case: "failure", value }; +// success may be v (no value) +// S[] Set (NSSwiftTagArray, reported as an array) <-> JS Set copy +// (arrays accepted as input) +// *(,...) or *(