From c20437ce6044b11753a907e53e187abfe969e0d3 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Wed, 25 Feb 2026 19:07:49 +0900 Subject: [PATCH] BridgeJS: Move out default argument tests into a separate suite --- .../DefaultArgumentTests.swift | 131 + .../BridgeJSRuntimeTests/ExportAPITests.swift | 95 - .../Generated/BridgeJS.swift | 637 +- .../Generated/JavaScript/BridgeJS.json | 6113 +++++++++-------- .../JavaScript/DefaultArgumentTests.mjs | 97 + Tests/prelude.mjs | 91 +- 6 files changed, 3782 insertions(+), 3382 deletions(-) create mode 100644 Tests/BridgeJSRuntimeTests/DefaultArgumentTests.swift create mode 100644 Tests/BridgeJSRuntimeTests/JavaScript/DefaultArgumentTests.mjs diff --git a/Tests/BridgeJSRuntimeTests/DefaultArgumentTests.swift b/Tests/BridgeJSRuntimeTests/DefaultArgumentTests.swift new file mode 100644 index 00000000..061dc570 --- /dev/null +++ b/Tests/BridgeJSRuntimeTests/DefaultArgumentTests.swift @@ -0,0 +1,131 @@ +import XCTest +import JavaScriptKit + +@JSClass struct DefaultArgumentImports { + @JSFunction static func runJsDefaultArgumentTests() throws(JSException) +} + +final class DefaultArgumentTests: XCTestCase { + func testRunJsDefaultArgumentTests() throws { + try DefaultArgumentImports.runJsDefaultArgumentTests() + } +} + +// MARK: - Default Parameters + +@JS enum DefaultArgumentExports { + @JS static func testStringDefault(message: String = "Hello World") -> String { + return message + } + + @JS static func testIntDefault(count: Int = 42) -> Int { + return count + } + + @JS static func testBoolDefault(flag: Bool = true) -> Bool { + return flag + } + + @JS static func testOptionalDefault(name: String? = nil) -> String? { + return name + } + + @JS static func testMultipleDefaults( + title: String = "Default Title", + count: Int = -10, + enabled: Bool = false + ) -> String { + return "\(title): \(count) (\(enabled))" + } + + @JS static func testSimpleEnumDefault(status: Status = .success) -> Status { + return status + } + + @JS static func testDirectionDefault(direction: Direction = .north) -> Direction { + return direction + } + + @JS static func testRawStringEnumDefault(theme: Theme = .light) -> Theme { + return theme + } + + @JS static func testComplexInit(greeter: Greeter = Greeter(name: "DefaultGreeter")) -> String { + return greeter.greet() + } + + @JS static func testEmptyInit(_ object: StaticPropertyHolder = StaticPropertyHolder()) -> StaticPropertyHolder { + return object + } + + @JS static func createConstructorDefaults( + name: String = "Default", + count: Int = 42, + enabled: Bool = true, + status: Status = .success, + tag: String? = nil + ) -> DefaultArgumentConstructorDefaults { + return DefaultArgumentConstructorDefaults( + name: name, + count: count, + enabled: enabled, + status: status, + tag: tag + ) + } + + @JS static func describeConstructorDefaults( + _ value: DefaultArgumentConstructorDefaults + ) -> String { + return value.describe() + } + + @JS static func arrayWithDefault(_ values: [Int] = [1, 2, 3]) -> Int { + return values.reduce(0, +) + } + + @JS static func arrayWithOptionalDefault(_ values: [Int]? = nil) -> Int { + return values?.reduce(0, +) ?? -1 + } + + @JS static func arrayMixedDefaults( + prefix: String = "Sum", + values: [Int] = [10, 20], + suffix: String = "!" + ) -> String { + return "\(prefix): \(values.reduce(0, +))\(suffix)" + } +} + +@JS class DefaultArgumentConstructorDefaults { + @JS var name: String + @JS var count: Int + @JS var enabled: Bool + @JS var status: Status + @JS var tag: String? + + @JS init( + name: String = "Default", + count: Int = 42, + enabled: Bool = true, + status: Status = .success, + tag: String? = nil + ) { + self.name = name + self.count = count + self.enabled = enabled + self.status = status + self.tag = tag + } + + @JS func describe() -> String { + let tagStr = tag ?? "nil" + let statusStr: String + switch status { + case .loading: statusStr = "loading" + case .success: statusStr = "success" + case .error: statusStr = "error" + } + return "\(name):\(count):\(enabled):\(statusStr):\(tagStr)" + } +} diff --git a/Tests/BridgeJSRuntimeTests/ExportAPITests.swift b/Tests/BridgeJSRuntimeTests/ExportAPITests.swift index ead7e084..cfc1b47b 100644 --- a/Tests/BridgeJSRuntimeTests/ExportAPITests.swift +++ b/Tests/BridgeJSRuntimeTests/ExportAPITests.swift @@ -769,101 +769,6 @@ enum GraphOperations { } } -// MARK: - Default Parameters - -@JS func testStringDefault(message: String = "Hello World") -> String { - return message -} - -@JS func testIntDefault(count: Int = 42) -> Int { - return count -} - -@JS func testBoolDefault(flag: Bool = true) -> Bool { - return flag -} - -@JS func testOptionalDefault(name: String? = nil) -> String? { - return name -} - -@JS func testMultipleDefaults( - title: String = "Default Title", - count: Int = -10, - enabled: Bool = false -) -> String { - return "\(title): \(count) (\(enabled))" -} - -@JS func testSimpleEnumDefault(status: Status = .success) -> Status { - return status -} - -@JS func testDirectionDefault(direction: Direction = .north) -> Direction { - return direction -} - -@JS func testRawStringEnumDefault(theme: Theme = .light) -> Theme { - return theme -} - -@JS func testComplexInit(greeter: Greeter = Greeter(name: "DefaultGreeter")) -> String { - return greeter.greet() -} - -@JS func testEmptyInit(_ object: StaticPropertyHolder = StaticPropertyHolder()) -> StaticPropertyHolder { - return object -} - -@JS class ConstructorDefaults { - @JS var name: String - @JS var count: Int - @JS var enabled: Bool - @JS var status: Status - @JS var tag: String? - - @JS init( - name: String = "Default", - count: Int = 42, - enabled: Bool = true, - status: Status = .success, - tag: String? = nil - ) { - self.name = name - self.count = count - self.enabled = enabled - self.status = status - self.tag = tag - } - - @JS func describe() -> String { - let tagStr = tag ?? "nil" - let statusStr: String - switch status { - case .loading: statusStr = "loading" - case .success: statusStr = "success" - case .error: statusStr = "error" - } - return "\(name):\(count):\(enabled):\(statusStr):\(tagStr)" - } -} - -@JS func arrayWithDefault(_ values: [Int] = [1, 2, 3]) -> Int { - return values.reduce(0, +) -} - -@JS func arrayWithOptionalDefault(_ values: [Int]? = nil) -> Int { - return values?.reduce(0, +) ?? -1 -} - -@JS func arrayMixedDefaults( - prefix: String = "Sum", - values: [Int] = [10, 20], - suffix: String = "!" -) -> String { - return "\(prefix): \(values.reduce(0, +))\(suffix)" -} - // MARK: - Static Properties @JS class StaticPropertyHolder { diff --git a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift index 96731a28..34637a32 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift +++ b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift @@ -2687,6 +2687,171 @@ public func _bjs_ArraySupportExports_static_multiOptionalArraySecond() -> Void { #endif } +@_expose(wasm, "bjs_DefaultArgumentExports_static_testStringDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testStringDefault") +public func _bjs_DefaultArgumentExports_static_testStringDefault(_ messageBytes: Int32, _ messageLength: Int32) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.testStringDefault(message: String.bridgeJSLiftParameter(messageBytes, messageLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testIntDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testIntDefault") +public func _bjs_DefaultArgumentExports_static_testIntDefault(_ count: Int32) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.testIntDefault(count: Int.bridgeJSLiftParameter(count)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testBoolDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testBoolDefault") +public func _bjs_DefaultArgumentExports_static_testBoolDefault(_ flag: Int32) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.testBoolDefault(flag: Bool.bridgeJSLiftParameter(flag)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testOptionalDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testOptionalDefault") +public func _bjs_DefaultArgumentExports_static_testOptionalDefault(_ nameIsSome: Int32, _ nameBytes: Int32, _ nameLength: Int32) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.testOptionalDefault(name: Optional.bridgeJSLiftParameter(nameIsSome, nameBytes, nameLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testMultipleDefaults") +@_cdecl("bjs_DefaultArgumentExports_static_testMultipleDefaults") +public func _bjs_DefaultArgumentExports_static_testMultipleDefaults(_ titleBytes: Int32, _ titleLength: Int32, _ count: Int32, _ enabled: Int32) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.testMultipleDefaults(title: String.bridgeJSLiftParameter(titleBytes, titleLength), count: Int.bridgeJSLiftParameter(count), enabled: Bool.bridgeJSLiftParameter(enabled)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testSimpleEnumDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testSimpleEnumDefault") +public func _bjs_DefaultArgumentExports_static_testSimpleEnumDefault(_ status: Int32) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.testSimpleEnumDefault(status: Status.bridgeJSLiftParameter(status)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testDirectionDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testDirectionDefault") +public func _bjs_DefaultArgumentExports_static_testDirectionDefault(_ direction: Int32) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.testDirectionDefault(direction: Direction.bridgeJSLiftParameter(direction)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testRawStringEnumDefault") +@_cdecl("bjs_DefaultArgumentExports_static_testRawStringEnumDefault") +public func _bjs_DefaultArgumentExports_static_testRawStringEnumDefault(_ themeBytes: Int32, _ themeLength: Int32) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.testRawStringEnumDefault(theme: Theme.bridgeJSLiftParameter(themeBytes, themeLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testComplexInit") +@_cdecl("bjs_DefaultArgumentExports_static_testComplexInit") +public func _bjs_DefaultArgumentExports_static_testComplexInit(_ greeter: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.testComplexInit(greeter: Greeter.bridgeJSLiftParameter(greeter)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_testEmptyInit") +@_cdecl("bjs_DefaultArgumentExports_static_testEmptyInit") +public func _bjs_DefaultArgumentExports_static_testEmptyInit(_ object: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer { + #if arch(wasm32) + let ret = DefaultArgumentExports.testEmptyInit(_: StaticPropertyHolder.bridgeJSLiftParameter(object)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_createConstructorDefaults") +@_cdecl("bjs_DefaultArgumentExports_static_createConstructorDefaults") +public func _bjs_DefaultArgumentExports_static_createConstructorDefaults(_ nameBytes: Int32, _ nameLength: Int32, _ count: Int32, _ enabled: Int32, _ status: Int32, _ tagIsSome: Int32, _ tagBytes: Int32, _ tagLength: Int32) -> UnsafeMutableRawPointer { + #if arch(wasm32) + let ret = DefaultArgumentExports.createConstructorDefaults(name: String.bridgeJSLiftParameter(nameBytes, nameLength), count: Int.bridgeJSLiftParameter(count), enabled: Bool.bridgeJSLiftParameter(enabled), status: Status.bridgeJSLiftParameter(status), tag: Optional.bridgeJSLiftParameter(tagIsSome, tagBytes, tagLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_describeConstructorDefaults") +@_cdecl("bjs_DefaultArgumentExports_static_describeConstructorDefaults") +public func _bjs_DefaultArgumentExports_static_describeConstructorDefaults(_ value: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.describeConstructorDefaults(_: DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(value)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_arrayWithDefault") +@_cdecl("bjs_DefaultArgumentExports_static_arrayWithDefault") +public func _bjs_DefaultArgumentExports_static_arrayWithDefault() -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.arrayWithDefault(_: [Int].bridgeJSStackPop()) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_arrayWithOptionalDefault") +@_cdecl("bjs_DefaultArgumentExports_static_arrayWithOptionalDefault") +public func _bjs_DefaultArgumentExports_static_arrayWithOptionalDefault() -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentExports.arrayWithOptionalDefault(_: Optional<[Int]>.bridgeJSLiftParameter()) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentExports_static_arrayMixedDefaults") +@_cdecl("bjs_DefaultArgumentExports_static_arrayMixedDefaults") +public func _bjs_DefaultArgumentExports_static_arrayMixedDefaults(_ prefixBytes: Int32, _ prefixLength: Int32, _ suffixBytes: Int32, _ suffixLength: Int32) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentExports.arrayMixedDefaults(prefix: String.bridgeJSLiftParameter(prefixBytes, prefixLength), values: [Int].bridgeJSStackPop(), suffix: String.bridgeJSLiftParameter(suffixBytes, suffixLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + extension Direction: _BridgedSwiftCaseEnum { @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerParameter() -> Int32 { return bridgeJSRawValue @@ -5873,149 +6038,6 @@ public func _bjs_getObserverStats() -> Void { #endif } -@_expose(wasm, "bjs_testStringDefault") -@_cdecl("bjs_testStringDefault") -public func _bjs_testStringDefault(_ messageBytes: Int32, _ messageLength: Int32) -> Void { - #if arch(wasm32) - let ret = testStringDefault(message: String.bridgeJSLiftParameter(messageBytes, messageLength)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testIntDefault") -@_cdecl("bjs_testIntDefault") -public func _bjs_testIntDefault(_ count: Int32) -> Int32 { - #if arch(wasm32) - let ret = testIntDefault(count: Int.bridgeJSLiftParameter(count)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testBoolDefault") -@_cdecl("bjs_testBoolDefault") -public func _bjs_testBoolDefault(_ flag: Int32) -> Int32 { - #if arch(wasm32) - let ret = testBoolDefault(flag: Bool.bridgeJSLiftParameter(flag)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testOptionalDefault") -@_cdecl("bjs_testOptionalDefault") -public func _bjs_testOptionalDefault(_ nameIsSome: Int32, _ nameBytes: Int32, _ nameLength: Int32) -> Void { - #if arch(wasm32) - let ret = testOptionalDefault(name: Optional.bridgeJSLiftParameter(nameIsSome, nameBytes, nameLength)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testMultipleDefaults") -@_cdecl("bjs_testMultipleDefaults") -public func _bjs_testMultipleDefaults(_ titleBytes: Int32, _ titleLength: Int32, _ count: Int32, _ enabled: Int32) -> Void { - #if arch(wasm32) - let ret = testMultipleDefaults(title: String.bridgeJSLiftParameter(titleBytes, titleLength), count: Int.bridgeJSLiftParameter(count), enabled: Bool.bridgeJSLiftParameter(enabled)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testSimpleEnumDefault") -@_cdecl("bjs_testSimpleEnumDefault") -public func _bjs_testSimpleEnumDefault(_ status: Int32) -> Int32 { - #if arch(wasm32) - let ret = testSimpleEnumDefault(status: Status.bridgeJSLiftParameter(status)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testDirectionDefault") -@_cdecl("bjs_testDirectionDefault") -public func _bjs_testDirectionDefault(_ direction: Int32) -> Int32 { - #if arch(wasm32) - let ret = testDirectionDefault(direction: Direction.bridgeJSLiftParameter(direction)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testRawStringEnumDefault") -@_cdecl("bjs_testRawStringEnumDefault") -public func _bjs_testRawStringEnumDefault(_ themeBytes: Int32, _ themeLength: Int32) -> Void { - #if arch(wasm32) - let ret = testRawStringEnumDefault(theme: Theme.bridgeJSLiftParameter(themeBytes, themeLength)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testComplexInit") -@_cdecl("bjs_testComplexInit") -public func _bjs_testComplexInit(_ greeter: UnsafeMutableRawPointer) -> Void { - #if arch(wasm32) - let ret = testComplexInit(greeter: Greeter.bridgeJSLiftParameter(greeter)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_testEmptyInit") -@_cdecl("bjs_testEmptyInit") -public func _bjs_testEmptyInit(_ object: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer { - #if arch(wasm32) - let ret = testEmptyInit(_: StaticPropertyHolder.bridgeJSLiftParameter(object)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_arrayWithDefault") -@_cdecl("bjs_arrayWithDefault") -public func _bjs_arrayWithDefault() -> Int32 { - #if arch(wasm32) - let ret = arrayWithDefault(_: [Int].bridgeJSStackPop()) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_arrayWithOptionalDefault") -@_cdecl("bjs_arrayWithOptionalDefault") -public func _bjs_arrayWithOptionalDefault() -> Int32 { - #if arch(wasm32) - let ret = arrayWithOptionalDefault(_: Optional<[Int]>.bridgeJSLiftParameter()) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_arrayMixedDefaults") -@_cdecl("bjs_arrayMixedDefaults") -public func _bjs_arrayMixedDefaults(_ prefixBytes: Int32, _ prefixLength: Int32, _ suffixBytes: Int32, _ suffixLength: Int32) -> Void { - #if arch(wasm32) - let ret = arrayMixedDefaults(prefix: String.bridgeJSLiftParameter(prefixBytes, prefixLength), values: [Int].bridgeJSStackPop(), suffix: String.bridgeJSLiftParameter(suffixBytes, suffixLength)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - @_expose(wasm, "bjs_formatName") @_cdecl("bjs_formatName") public func _bjs_formatName(_ nameBytes: Int32, _ nameLength: Int32, _ transform: Int32) -> Void { @@ -6711,6 +6733,161 @@ fileprivate func _bjs_ClosureSupportExports_wrap_extern(_ pointer: UnsafeMutable return _bjs_ClosureSupportExports_wrap_extern(pointer) } +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_init") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_init") +public func _bjs_DefaultArgumentConstructorDefaults_init(_ nameBytes: Int32, _ nameLength: Int32, _ count: Int32, _ enabled: Int32, _ status: Int32, _ tagIsSome: Int32, _ tagBytes: Int32, _ tagLength: Int32) -> UnsafeMutableRawPointer { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults(name: String.bridgeJSLiftParameter(nameBytes, nameLength), count: Int.bridgeJSLiftParameter(count), enabled: Bool.bridgeJSLiftParameter(enabled), status: Status.bridgeJSLiftParameter(status), tag: Optional.bridgeJSLiftParameter(tagIsSome, tagBytes, tagLength)) + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_describe") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_describe") +public func _bjs_DefaultArgumentConstructorDefaults_describe(_ _self: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).describe() + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_name_get") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_name_get") +public func _bjs_DefaultArgumentConstructorDefaults_name_get(_ _self: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).name + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_name_set") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_name_set") +public func _bjs_DefaultArgumentConstructorDefaults_name_set(_ _self: UnsafeMutableRawPointer, _ valueBytes: Int32, _ valueLength: Int32) -> Void { + #if arch(wasm32) + DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).name = String.bridgeJSLiftParameter(valueBytes, valueLength) + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_count_get") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_count_get") +public func _bjs_DefaultArgumentConstructorDefaults_count_get(_ _self: UnsafeMutableRawPointer) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).count + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_count_set") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_count_set") +public func _bjs_DefaultArgumentConstructorDefaults_count_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { + #if arch(wasm32) + DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).count = Int.bridgeJSLiftParameter(value) + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_enabled_get") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_enabled_get") +public func _bjs_DefaultArgumentConstructorDefaults_enabled_get(_ _self: UnsafeMutableRawPointer) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).enabled + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_enabled_set") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_enabled_set") +public func _bjs_DefaultArgumentConstructorDefaults_enabled_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { + #if arch(wasm32) + DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).enabled = Bool.bridgeJSLiftParameter(value) + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_status_get") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_status_get") +public func _bjs_DefaultArgumentConstructorDefaults_status_get(_ _self: UnsafeMutableRawPointer) -> Int32 { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).status + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_status_set") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_status_set") +public func _bjs_DefaultArgumentConstructorDefaults_status_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { + #if arch(wasm32) + DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).status = Status.bridgeJSLiftParameter(value) + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_tag_get") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_tag_get") +public func _bjs_DefaultArgumentConstructorDefaults_tag_get(_ _self: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + let ret = DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).tag + return ret.bridgeJSLowerReturn() + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_tag_set") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_tag_set") +public func _bjs_DefaultArgumentConstructorDefaults_tag_set(_ _self: UnsafeMutableRawPointer, _ valueIsSome: Int32, _ valueBytes: Int32, _ valueLength: Int32) -> Void { + #if arch(wasm32) + DefaultArgumentConstructorDefaults.bridgeJSLiftParameter(_self).tag = Optional.bridgeJSLiftParameter(valueIsSome, valueBytes, valueLength) + #else + fatalError("Only available on WebAssembly") + #endif +} + +@_expose(wasm, "bjs_DefaultArgumentConstructorDefaults_deinit") +@_cdecl("bjs_DefaultArgumentConstructorDefaults_deinit") +public func _bjs_DefaultArgumentConstructorDefaults_deinit(_ pointer: UnsafeMutableRawPointer) -> Void { + #if arch(wasm32) + Unmanaged.fromOpaque(pointer).release() + #else + fatalError("Only available on WebAssembly") + #endif +} + +extension DefaultArgumentConstructorDefaults: ConvertibleToJSValue, _BridgedSwiftHeapObject { + var jsValue: JSValue { + return .object(JSObject(id: UInt32(bitPattern: _bjs_DefaultArgumentConstructorDefaults_wrap(Unmanaged.passRetained(self).toOpaque())))) + } +} + +#if arch(wasm32) +@_extern(wasm, module: "BridgeJSRuntimeTests", name: "bjs_DefaultArgumentConstructorDefaults_wrap") +fileprivate func _bjs_DefaultArgumentConstructorDefaults_wrap_extern(_ pointer: UnsafeMutableRawPointer) -> Int32 +#else +fileprivate func _bjs_DefaultArgumentConstructorDefaults_wrap_extern(_ pointer: UnsafeMutableRawPointer) -> Int32 { + fatalError("Only available on WebAssembly") +} +#endif +@inline(never) fileprivate func _bjs_DefaultArgumentConstructorDefaults_wrap(_ pointer: UnsafeMutableRawPointer) -> Int32 { + return _bjs_DefaultArgumentConstructorDefaults_wrap_extern(pointer) +} + @_expose(wasm, "bjs_Greeter_init") @_cdecl("bjs_Greeter_init") public func _bjs_Greeter_init(_ nameBytes: Int32, _ nameLength: Int32) -> UnsafeMutableRawPointer { @@ -7615,161 +7792,6 @@ fileprivate func _bjs_MathUtils_wrap_extern(_ pointer: UnsafeMutableRawPointer) return _bjs_MathUtils_wrap_extern(pointer) } -@_expose(wasm, "bjs_ConstructorDefaults_init") -@_cdecl("bjs_ConstructorDefaults_init") -public func _bjs_ConstructorDefaults_init(_ nameBytes: Int32, _ nameLength: Int32, _ count: Int32, _ enabled: Int32, _ status: Int32, _ tagIsSome: Int32, _ tagBytes: Int32, _ tagLength: Int32) -> UnsafeMutableRawPointer { - #if arch(wasm32) - let ret = ConstructorDefaults(name: String.bridgeJSLiftParameter(nameBytes, nameLength), count: Int.bridgeJSLiftParameter(count), enabled: Bool.bridgeJSLiftParameter(enabled), status: Status.bridgeJSLiftParameter(status), tag: Optional.bridgeJSLiftParameter(tagIsSome, tagBytes, tagLength)) - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_describe") -@_cdecl("bjs_ConstructorDefaults_describe") -public func _bjs_ConstructorDefaults_describe(_ _self: UnsafeMutableRawPointer) -> Void { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).describe() - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_name_get") -@_cdecl("bjs_ConstructorDefaults_name_get") -public func _bjs_ConstructorDefaults_name_get(_ _self: UnsafeMutableRawPointer) -> Void { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).name - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_name_set") -@_cdecl("bjs_ConstructorDefaults_name_set") -public func _bjs_ConstructorDefaults_name_set(_ _self: UnsafeMutableRawPointer, _ valueBytes: Int32, _ valueLength: Int32) -> Void { - #if arch(wasm32) - ConstructorDefaults.bridgeJSLiftParameter(_self).name = String.bridgeJSLiftParameter(valueBytes, valueLength) - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_count_get") -@_cdecl("bjs_ConstructorDefaults_count_get") -public func _bjs_ConstructorDefaults_count_get(_ _self: UnsafeMutableRawPointer) -> Int32 { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).count - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_count_set") -@_cdecl("bjs_ConstructorDefaults_count_set") -public func _bjs_ConstructorDefaults_count_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { - #if arch(wasm32) - ConstructorDefaults.bridgeJSLiftParameter(_self).count = Int.bridgeJSLiftParameter(value) - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_enabled_get") -@_cdecl("bjs_ConstructorDefaults_enabled_get") -public func _bjs_ConstructorDefaults_enabled_get(_ _self: UnsafeMutableRawPointer) -> Int32 { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).enabled - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_enabled_set") -@_cdecl("bjs_ConstructorDefaults_enabled_set") -public func _bjs_ConstructorDefaults_enabled_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { - #if arch(wasm32) - ConstructorDefaults.bridgeJSLiftParameter(_self).enabled = Bool.bridgeJSLiftParameter(value) - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_status_get") -@_cdecl("bjs_ConstructorDefaults_status_get") -public func _bjs_ConstructorDefaults_status_get(_ _self: UnsafeMutableRawPointer) -> Int32 { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).status - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_status_set") -@_cdecl("bjs_ConstructorDefaults_status_set") -public func _bjs_ConstructorDefaults_status_set(_ _self: UnsafeMutableRawPointer, _ value: Int32) -> Void { - #if arch(wasm32) - ConstructorDefaults.bridgeJSLiftParameter(_self).status = Status.bridgeJSLiftParameter(value) - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_tag_get") -@_cdecl("bjs_ConstructorDefaults_tag_get") -public func _bjs_ConstructorDefaults_tag_get(_ _self: UnsafeMutableRawPointer) -> Void { - #if arch(wasm32) - let ret = ConstructorDefaults.bridgeJSLiftParameter(_self).tag - return ret.bridgeJSLowerReturn() - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_tag_set") -@_cdecl("bjs_ConstructorDefaults_tag_set") -public func _bjs_ConstructorDefaults_tag_set(_ _self: UnsafeMutableRawPointer, _ valueIsSome: Int32, _ valueBytes: Int32, _ valueLength: Int32) -> Void { - #if arch(wasm32) - ConstructorDefaults.bridgeJSLiftParameter(_self).tag = Optional.bridgeJSLiftParameter(valueIsSome, valueBytes, valueLength) - #else - fatalError("Only available on WebAssembly") - #endif -} - -@_expose(wasm, "bjs_ConstructorDefaults_deinit") -@_cdecl("bjs_ConstructorDefaults_deinit") -public func _bjs_ConstructorDefaults_deinit(_ pointer: UnsafeMutableRawPointer) -> Void { - #if arch(wasm32) - Unmanaged.fromOpaque(pointer).release() - #else - fatalError("Only available on WebAssembly") - #endif -} - -extension ConstructorDefaults: ConvertibleToJSValue, _BridgedSwiftHeapObject { - var jsValue: JSValue { - return .object(JSObject(id: UInt32(bitPattern: _bjs_ConstructorDefaults_wrap(Unmanaged.passRetained(self).toOpaque())))) - } -} - -#if arch(wasm32) -@_extern(wasm, module: "BridgeJSRuntimeTests", name: "bjs_ConstructorDefaults_wrap") -fileprivate func _bjs_ConstructorDefaults_wrap_extern(_ pointer: UnsafeMutableRawPointer) -> Int32 -#else -fileprivate func _bjs_ConstructorDefaults_wrap_extern(_ pointer: UnsafeMutableRawPointer) -> Int32 { - fatalError("Only available on WebAssembly") -} -#endif -@inline(never) fileprivate func _bjs_ConstructorDefaults_wrap(_ pointer: UnsafeMutableRawPointer) -> Int32 { - return _bjs_ConstructorDefaults_wrap_extern(pointer) -} - @_expose(wasm, "bjs_StaticPropertyHolder_init") @_cdecl("bjs_StaticPropertyHolder_init") public func _bjs_StaticPropertyHolder_init() -> UnsafeMutableRawPointer { @@ -10005,6 +10027,25 @@ func _$ClosureSupportImports_runJsClosureSupportTests() throws(JSException) -> V } } +#if arch(wasm32) +@_extern(wasm, module: "BridgeJSRuntimeTests", name: "bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static") +fileprivate func bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static_extern() -> Void +#else +fileprivate func bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static_extern() -> Void { + fatalError("Only available on WebAssembly") +} +#endif +@inline(never) fileprivate func bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static() -> Void { + return bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static_extern() +} + +func _$DefaultArgumentImports_runJsDefaultArgumentTests() throws(JSException) -> Void { + bjs_DefaultArgumentImports_runJsDefaultArgumentTests_static() + if let error = _swift_js_take_exception() { + throw error + } +} + #if arch(wasm32) @_extern(wasm, module: "BridgeJSRuntimeTests", name: "bjs_jsRoundTripDictionary") fileprivate func bjs_jsRoundTripDictionary_extern() -> Void diff --git a/Tests/BridgeJSRuntimeTests/Generated/JavaScript/BridgeJS.json b/Tests/BridgeJSRuntimeTests/Generated/JavaScript/BridgeJS.json index 1a090993..74ecd9d5 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/JavaScript/BridgeJS.json +++ b/Tests/BridgeJSRuntimeTests/Generated/JavaScript/BridgeJS.json @@ -298,6 +298,172 @@ ], "swiftCallName" : "ClosureSupportExports" }, + { + "constructor" : { + "abiName" : "bjs_DefaultArgumentConstructorDefaults_init", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "parameters" : [ + { + "defaultValue" : { + "string" : { + "_0" : "Default" + } + }, + "label" : "name", + "name" : "name", + "type" : { + "string" : { + + } + } + }, + { + "defaultValue" : { + "int" : { + "_0" : 42 + } + }, + "label" : "count", + "name" : "count", + "type" : { + "int" : { + + } + } + }, + { + "defaultValue" : { + "bool" : { + "_0" : true + } + }, + "label" : "enabled", + "name" : "enabled", + "type" : { + "bool" : { + + } + } + }, + { + "defaultValue" : { + "enumCase" : { + "_0" : "Status", + "_1" : "success" + } + }, + "label" : "status", + "name" : "status", + "type" : { + "caseEnum" : { + "_0" : "Status" + } + } + }, + { + "defaultValue" : { + "null" : { + + } + }, + "label" : "tag", + "name" : "tag", + "type" : { + "nullable" : { + "_0" : { + "string" : { + + } + }, + "_1" : "null" + } + } + } + ] + }, + "methods" : [ + { + "abiName" : "bjs_DefaultArgumentConstructorDefaults_describe", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "name" : "describe", + "parameters" : [ + + ], + "returnType" : { + "string" : { + + } + } + } + ], + "name" : "DefaultArgumentConstructorDefaults", + "properties" : [ + { + "isReadonly" : false, + "isStatic" : false, + "name" : "name", + "type" : { + "string" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : false, + "name" : "count", + "type" : { + "int" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : false, + "name" : "enabled", + "type" : { + "bool" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : false, + "name" : "status", + "type" : { + "caseEnum" : { + "_0" : "Status" + } + } + }, + { + "isReadonly" : false, + "isStatic" : false, + "name" : "tag", + "type" : { + "nullable" : { + "_0" : { + "string" : { + + } + }, + "_1" : "null" + } + } + } + ], + "swiftCallName" : "DefaultArgumentConstructorDefaults" + }, { "constructor" : { "abiName" : "bjs_Greeter_init", @@ -1260,213 +1426,47 @@ }, { "constructor" : { - "abiName" : "bjs_ConstructorDefaults_init", + "abiName" : "bjs_StaticPropertyHolder_init", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, "parameters" : [ - { - "defaultValue" : { - "string" : { - "_0" : "Default" - } - }, - "label" : "name", - "name" : "name", - "type" : { - "string" : { - } - } - }, - { - "defaultValue" : { - "int" : { - "_0" : 42 - } - }, - "label" : "count", - "name" : "count", - "type" : { - "int" : { + ] + }, + "methods" : [ - } + ], + "name" : "StaticPropertyHolder", + "properties" : [ + { + "isReadonly" : true, + "isStatic" : true, + "name" : "staticConstant", + "staticContext" : { + "className" : { + "_0" : "StaticPropertyHolder" } }, - { - "defaultValue" : { - "bool" : { - "_0" : true - } - }, - "label" : "enabled", - "name" : "enabled", - "type" : { - "bool" : { + "type" : { + "string" : { - } } - }, - { - "defaultValue" : { - "enumCase" : { - "_0" : "Status", - "_1" : "success" - } - }, - "label" : "status", - "name" : "status", - "type" : { - "caseEnum" : { - "_0" : "Status" - } + } + }, + { + "isReadonly" : false, + "isStatic" : true, + "name" : "staticVariable", + "staticContext" : { + "className" : { + "_0" : "StaticPropertyHolder" } }, - { - "defaultValue" : { - "null" : { - - } - }, - "label" : "tag", - "name" : "tag", - "type" : { - "nullable" : { - "_0" : { - "string" : { - - } - }, - "_1" : "null" - } - } - } - ] - }, - "methods" : [ - { - "abiName" : "bjs_ConstructorDefaults_describe", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "describe", - "parameters" : [ - - ], - "returnType" : { - "string" : { - - } - } - } - ], - "name" : "ConstructorDefaults", - "properties" : [ - { - "isReadonly" : false, - "isStatic" : false, - "name" : "name", - "type" : { - "string" : { - - } - } - }, - { - "isReadonly" : false, - "isStatic" : false, - "name" : "count", - "type" : { - "int" : { - - } - } - }, - { - "isReadonly" : false, - "isStatic" : false, - "name" : "enabled", - "type" : { - "bool" : { - - } - } - }, - { - "isReadonly" : false, - "isStatic" : false, - "name" : "status", - "type" : { - "caseEnum" : { - "_0" : "Status" - } - } - }, - { - "isReadonly" : false, - "isStatic" : false, - "name" : "tag", - "type" : { - "nullable" : { - "_0" : { - "string" : { - - } - }, - "_1" : "null" - } - } - } - ], - "swiftCallName" : "ConstructorDefaults" - }, - { - "constructor" : { - "abiName" : "bjs_StaticPropertyHolder_init", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "parameters" : [ - - ] - }, - "methods" : [ - - ], - "name" : "StaticPropertyHolder", - "properties" : [ - { - "isReadonly" : true, - "isStatic" : true, - "name" : "staticConstant", - "staticContext" : { - "className" : { - "_0" : "StaticPropertyHolder" - } - }, - "type" : { - "string" : { - - } - } - }, - { - "isReadonly" : false, - "isStatic" : true, - "name" : "staticVariable", - "staticContext" : { - "className" : { - "_0" : "StaticPropertyHolder" - } - }, - "type" : { - "int" : { + "type" : { + "int" : { } } @@ -5575,780 +5575,742 @@ }, { "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "north" - }, - { - "associatedValues" : [ - - ], - "name" : "south" - }, - { - "associatedValues" : [ - ], - "name" : "east" - }, - { - "associatedValues" : [ - - ], - "name" : "west" - } ], "emitStyle" : "const", - "name" : "Direction", + "name" : "DefaultArgumentExports", "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Direction", - "tsFullPath" : "Direction" - }, - { - "cases" : [ { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testStringDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testStringDefault", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "loading" - }, - { - "associatedValues" : [ + "parameters" : [ + { + "defaultValue" : { + "string" : { + "_0" : "Hello World" + } + }, + "label" : "message", + "name" : "message", + "type" : { + "string" : { + } + } + } ], - "name" : "success" + "returnType" : { + "string" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testIntDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testIntDefault", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "error" - } - ], - "emitStyle" : "const", - "name" : "Status", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Status", - "tsFullPath" : "Status" - }, - { - "cases" : [ - { - "associatedValues" : [ + "parameters" : [ + { + "defaultValue" : { + "int" : { + "_0" : 42 + } + }, + "label" : "count", + "name" : "count", + "type" : { + "int" : { + } + } + } ], - "name" : "light", - "rawValue" : "light" - }, - { - "associatedValues" : [ + "returnType" : { + "int" : { - ], - "name" : "dark", - "rawValue" : "dark" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - - ], - "name" : "auto", - "rawValue" : "auto" - } - ], - "emitStyle" : "const", - "name" : "Theme", - "rawType" : "String", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Theme", - "tsFullPath" : "Theme" - }, - { - "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "ok", - "rawValue" : "200" - }, - { - "associatedValues" : [ - - ], - "name" : "notFound", - "rawValue" : "404" - }, - { - "associatedValues" : [ - - ], - "name" : "serverError", - "rawValue" : "500" - }, - { - "associatedValues" : [ - - ], - "name" : "unknown", - "rawValue" : "-1" - } - ], - "emitStyle" : "const", - "name" : "HttpStatus", - "rawType" : "Int", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "HttpStatus", - "tsFullPath" : "HttpStatus" - }, - { - "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "rough", - "rawValue" : "0.1" - }, - { - "associatedValues" : [ - - ], - "name" : "normal", - "rawValue" : "0.01" - }, - { - "associatedValues" : [ - - ], - "name" : "fine", - "rawValue" : "0.001" - } - ], - "emitStyle" : "const", - "name" : "Precision", - "rawType" : "Float", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Precision", - "tsFullPath" : "Precision" - }, - { - "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "quarter", - "rawValue" : "0.25" - }, - { - "associatedValues" : [ - - ], - "name" : "half", - "rawValue" : "0.5" - }, - { - "associatedValues" : [ - - ], - "name" : "golden", - "rawValue" : "1.618" - } - ], - "emitStyle" : "const", - "name" : "Ratio", - "rawType" : "Double", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Ratio", - "tsFullPath" : "Ratio" - }, - { - "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "north" - }, - { - "associatedValues" : [ - - ], - "name" : "south" - }, - { - "associatedValues" : [ - - ], - "name" : "east" - }, - { - "associatedValues" : [ - - ], - "name" : "west" - } - ], - "emitStyle" : "tsEnum", - "name" : "TSDirection", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "TSDirection", - "tsFullPath" : "TSDirection" - }, - { - "cases" : [ - { - "associatedValues" : [ - - ], - "name" : "light", - "rawValue" : "light" - }, - { - "associatedValues" : [ - - ], - "name" : "dark", - "rawValue" : "dark" - }, - { - "associatedValues" : [ - - ], - "name" : "auto", - "rawValue" : "auto" - } - ], - "emitStyle" : "tsEnum", - "name" : "TSTheme", - "rawType" : "String", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "TSTheme", - "tsFullPath" : "TSTheme" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "Utils", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Utils", - "tsFullPath" : "Utils" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "StringUtils", - "namespace" : [ - "Utils" - ], - "staticMethods" : [ - { - "abiName" : "bjs_Utils_StringUtils_static_uppercase", - "effects" : { - "isAsync" : false, - "isStatic" : true, - "isThrows" : false - }, - "name" : "uppercase", - "namespace" : [ - "Utils", - "StringUtils" + "abiName" : "bjs_DefaultArgumentExports_static_testBoolDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testBoolDefault", + "namespace" : [ + "DefaultArgumentExports" ], "parameters" : [ { - "label" : "_", - "name" : "text", + "defaultValue" : { + "bool" : { + "_0" : true + } + }, + "label" : "flag", + "name" : "flag", "type" : { - "string" : { + "bool" : { } } } ], "returnType" : { - "string" : { + "bool" : { } }, "staticContext" : { "namespaceEnum" : { - "_0" : "Utils.StringUtils" + "_0" : "DefaultArgumentExports" } } }, { - "abiName" : "bjs_Utils_StringUtils_static_lowercase", + "abiName" : "bjs_DefaultArgumentExports_static_testOptionalDefault", "effects" : { "isAsync" : false, "isStatic" : true, "isThrows" : false }, - "name" : "lowercase", + "name" : "testOptionalDefault", "namespace" : [ - "Utils", - "StringUtils" + "DefaultArgumentExports" ], "parameters" : [ { - "label" : "_", - "name" : "text", - "type" : { - "string" : { + "defaultValue" : { + "null" : { + + } + }, + "label" : "name", + "name" : "name", + "type" : { + "nullable" : { + "_0" : { + "string" : { + } + }, + "_1" : "null" } } } ], "returnType" : { - "string" : { + "nullable" : { + "_0" : { + "string" : { + } + }, + "_1" : "null" } }, "staticContext" : { "namespaceEnum" : { - "_0" : "Utils.StringUtils" + "_0" : "DefaultArgumentExports" } } - } - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Utils.StringUtils", - "tsFullPath" : "Utils.StringUtils" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "Networking", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Networking", - "tsFullPath" : "Networking" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "API", - "namespace" : [ - "Networking" - ], - "staticMethods" : [ + }, + { + "abiName" : "bjs_DefaultArgumentExports_static_testMultipleDefaults", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testMultipleDefaults", + "namespace" : [ + "DefaultArgumentExports" + ], + "parameters" : [ + { + "defaultValue" : { + "string" : { + "_0" : "Default Title" + } + }, + "label" : "title", + "name" : "title", + "type" : { + "string" : { - ], - "staticProperties" : [ + } + } + }, + { + "defaultValue" : { + "int" : { + "_0" : -10 + } + }, + "label" : "count", + "name" : "count", + "type" : { + "int" : { - ], - "swiftCallName" : "Networking.API", - "tsFullPath" : "Networking.API" - }, - { - "cases" : [ - { - "associatedValues" : [ + } + } + }, + { + "defaultValue" : { + "bool" : { + "_0" : false + } + }, + "label" : "enabled", + "name" : "enabled", + "type" : { + "bool" : { + } + } + } ], - "name" : "get" - }, - { - "associatedValues" : [ + "returnType" : { + "string" : { - ], - "name" : "post" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testSimpleEnumDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testSimpleEnumDefault", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "put" + "parameters" : [ + { + "defaultValue" : { + "enumCase" : { + "_0" : "Status", + "_1" : "success" + } + }, + "label" : "status", + "name" : "status", + "type" : { + "caseEnum" : { + "_0" : "Status" + } + } + } + ], + "returnType" : { + "caseEnum" : { + "_0" : "Status" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testDirectionDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testDirectionDefault", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "delete" - } - ], - "emitStyle" : "const", - "name" : "Method", - "namespace" : [ - "Networking", - "API" - ], - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Networking.API.Method", - "tsFullPath" : "Networking.API.Method" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "Configuration", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Configuration", - "tsFullPath" : "Configuration" - }, - { - "cases" : [ - { - "associatedValues" : [ - + "parameters" : [ + { + "defaultValue" : { + "enumCase" : { + "_0" : "Direction", + "_1" : "north" + } + }, + "label" : "direction", + "name" : "direction", + "type" : { + "caseEnum" : { + "_0" : "Direction" + } + } + } ], - "name" : "debug", - "rawValue" : "debug" + "returnType" : { + "caseEnum" : { + "_0" : "Direction" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testRawStringEnumDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testRawStringEnumDefault", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "info", - "rawValue" : "info" + "parameters" : [ + { + "defaultValue" : { + "enumCase" : { + "_0" : "Theme", + "_1" : "light" + } + }, + "label" : "theme", + "name" : "theme", + "type" : { + "rawValueEnum" : { + "_0" : "Theme", + "_1" : "String" + } + } + } + ], + "returnType" : { + "rawValueEnum" : { + "_0" : "Theme", + "_1" : "String" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - - ], - "name" : "warning", - "rawValue" : "warning" - }, - { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testComplexInit", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testComplexInit", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "error", - "rawValue" : "error" - } - ], - "emitStyle" : "const", - "name" : "LogLevel", - "namespace" : [ - "Configuration" - ], - "rawType" : "String", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Configuration.LogLevel", - "tsFullPath" : "Configuration.LogLevel" - }, - { - "cases" : [ - { - "associatedValues" : [ - + "parameters" : [ + { + "defaultValue" : { + "objectWithArguments" : { + "_0" : "Greeter", + "_1" : [ + { + "string" : { + "_0" : "DefaultGreeter" + } + } + ] + } + }, + "label" : "greeter", + "name" : "greeter", + "type" : { + "swiftHeapObject" : { + "_0" : "Greeter" + } + } + } ], - "name" : "http", - "rawValue" : "80" - }, - { - "associatedValues" : [ + "returnType" : { + "string" : { - ], - "name" : "https", - "rawValue" : "443" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_testEmptyInit", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "testEmptyInit", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "development", - "rawValue" : "3000" - } - ], - "emitStyle" : "const", - "name" : "Port", - "namespace" : [ - "Configuration" - ], - "rawType" : "Int", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Configuration.Port", - "tsFullPath" : "Configuration.Port" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "Internal", - "namespace" : [ - "Networking", - "APIV2" - ], - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Internal", - "tsFullPath" : "Networking.APIV2.Internal" - }, - { - "cases" : [ - { - "associatedValues" : [ - + "parameters" : [ + { + "defaultValue" : { + "object" : { + "_0" : "StaticPropertyHolder" + } + }, + "label" : "_", + "name" : "object", + "type" : { + "swiftHeapObject" : { + "_0" : "StaticPropertyHolder" + } + } + } ], - "name" : "get" + "returnType" : { + "swiftHeapObject" : { + "_0" : "StaticPropertyHolder" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_createConstructorDefaults", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "createConstructorDefaults", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "post" - } - ], - "emitStyle" : "const", - "name" : "SupportedMethod", - "namespace" : [ - "Networking", - "APIV2", - "Internal" - ], - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "Internal.SupportedMethod", - "tsFullPath" : "Networking.APIV2.Internal.SupportedMethod" - }, - { - "cases" : [ - { - "associatedValues" : [ + "parameters" : [ { + "defaultValue" : { + "string" : { + "_0" : "Default" + } + }, + "label" : "name", + "name" : "name", "type" : { "string" : { } } - } - ], - "name" : "success" - }, - { - "associatedValues" : [ + }, { + "defaultValue" : { + "int" : { + "_0" : 42 + } + }, + "label" : "count", + "name" : "count", "type" : { "int" : { } } - } - ], - "name" : "failure" - }, - { - "associatedValues" : [ + }, { + "defaultValue" : { + "bool" : { + "_0" : true + } + }, + "label" : "enabled", + "name" : "enabled", "type" : { "bool" : { } } - } - ], - "name" : "flag" - }, - { - "associatedValues" : [ + }, { + "defaultValue" : { + "enumCase" : { + "_0" : "Status", + "_1" : "success" + } + }, + "label" : "status", + "name" : "status", "type" : { - "float" : { - + "caseEnum" : { + "_0" : "Status" } } - } - ], - "name" : "rate" - }, - { - "associatedValues" : [ + }, { + "defaultValue" : { + "null" : { + + } + }, + "label" : "tag", + "name" : "tag", "type" : { - "double" : { + "nullable" : { + "_0" : { + "string" : { + } + }, + "_1" : "null" } } } ], - "name" : "precise" + "returnType" : { + "swiftHeapObject" : { + "_0" : "DefaultArgumentConstructorDefaults" + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - + "abiName" : "bjs_DefaultArgumentExports_static_describeConstructorDefaults", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "describeConstructorDefaults", + "namespace" : [ + "DefaultArgumentExports" ], - "name" : "info" - } - ], - "emitStyle" : "const", - "name" : "APIResult", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "APIResult", - "tsFullPath" : "APIResult" - }, - { - "cases" : [ - { - "associatedValues" : [ + "parameters" : [ { + "label" : "_", + "name" : "value", "type" : { - "string" : { - + "swiftHeapObject" : { + "_0" : "DefaultArgumentConstructorDefaults" } } } ], - "name" : "success" + "returnType" : { + "string" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ + "abiName" : "bjs_DefaultArgumentExports_static_arrayWithDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "arrayWithDefault", + "namespace" : [ + "DefaultArgumentExports" + ], + "parameters" : [ { - "type" : { - "string" : { - + "defaultValue" : { + "array" : { + "_0" : [ + { + "int" : { + "_0" : 1 + } + }, + { + "int" : { + "_0" : 2 + } + }, + { + "int" : { + "_0" : 3 + } + } + ] } - } - }, - { + }, + "label" : "_", + "name" : "values", "type" : { - "int" : { + "array" : { + "_0" : { + "int" : { + } + } } } } ], - "name" : "error" + "returnType" : { + "int" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ - { - "type" : { - "double" : { - - } - } - }, + "abiName" : "bjs_DefaultArgumentExports_static_arrayWithOptionalDefault", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "arrayWithOptionalDefault", + "namespace" : [ + "DefaultArgumentExports" + ], + "parameters" : [ { - "type" : { - "double" : { + "defaultValue" : { + "null" : { } - } - }, - { + }, + "label" : "_", + "name" : "values", "type" : { - "string" : { + "nullable" : { + "_0" : { + "array" : { + "_0" : { + "int" : { + } + } + } + }, + "_1" : "null" } } } ], - "name" : "location" + "returnType" : { + "int" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } }, { - "associatedValues" : [ + "abiName" : "bjs_DefaultArgumentExports_static_arrayMixedDefaults", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "arrayMixedDefaults", + "namespace" : [ + "DefaultArgumentExports" + ], + "parameters" : [ { + "defaultValue" : { + "string" : { + "_0" : "Sum" + } + }, + "label" : "prefix", + "name" : "prefix", "type" : { - "bool" : { + "string" : { } } }, { + "defaultValue" : { + "array" : { + "_0" : [ + { + "int" : { + "_0" : 10 + } + }, + { + "int" : { + "_0" : 20 + } + } + ] + } + }, + "label" : "values", + "name" : "values", "type" : { - "int" : { + "array" : { + "_0" : { + "int" : { + } + } } } }, { + "defaultValue" : { + "string" : { + "_0" : "!" + } + }, + "label" : "suffix", + "name" : "suffix", "type" : { "string" : { @@ -6356,544 +6318,360 @@ } } ], - "name" : "status" - }, + "returnType" : { + "string" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "DefaultArgumentExports" + } + } + } + ], + "staticProperties" : [ + + ], + "swiftCallName" : "DefaultArgumentExports", + "tsFullPath" : "DefaultArgumentExports" + }, + { + "cases" : [ { "associatedValues" : [ - { - "type" : { - "double" : { - } - } - }, - { - "type" : { - "double" : { + ], + "name" : "north" + }, + { + "associatedValues" : [ - } - } - }, - { - "type" : { - "double" : { + ], + "name" : "south" + }, + { + "associatedValues" : [ - } - } - } ], - "name" : "coordinates" + "name" : "east" }, { "associatedValues" : [ - { - "type" : { - "bool" : { - } - } - }, - { - "type" : { - "bool" : { + ], + "name" : "west" + } + ], + "emitStyle" : "const", + "name" : "Direction", + "staticMethods" : [ - } - } - }, - { - "type" : { - "int" : { + ], + "staticProperties" : [ - } - } - }, - { - "type" : { - "int" : { + ], + "swiftCallName" : "Direction", + "tsFullPath" : "Direction" + }, + { + "cases" : [ + { + "associatedValues" : [ - } - } - }, - { - "type" : { - "double" : { - - } - } - }, - { - "type" : { - "double" : { - - } - } - }, - { - "type" : { - "string" : { - - } - } - }, - { - "type" : { - "string" : { - - } - } - }, - { - "type" : { - "string" : { + ], + "name" : "loading" + }, + { + "associatedValues" : [ - } - } - } ], - "name" : "comprehensive" + "name" : "success" }, { "associatedValues" : [ ], - "name" : "info" + "name" : "error" } ], "emitStyle" : "const", - "name" : "ComplexResult", + "name" : "Status", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "ComplexResult", - "tsFullPath" : "ComplexResult" + "swiftCallName" : "Status", + "tsFullPath" : "Status" }, { "cases" : [ + { + "associatedValues" : [ + + ], + "name" : "light", + "rawValue" : "light" + }, + { + "associatedValues" : [ + + ], + "name" : "dark", + "rawValue" : "dark" + }, + { + "associatedValues" : [ + ], + "name" : "auto", + "rawValue" : "auto" + } ], "emitStyle" : "const", - "name" : "Utilities", + "name" : "Theme", + "rawType" : "String", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "Utilities", - "tsFullPath" : "Utilities" + "swiftCallName" : "Theme", + "tsFullPath" : "Theme" }, { "cases" : [ { "associatedValues" : [ - { - "type" : { - "string" : { - } - } - } ], - "name" : "success" + "name" : "ok", + "rawValue" : "200" }, { "associatedValues" : [ - { - "type" : { - "string" : { - - } - } - }, - { - "type" : { - "int" : { - } - } - } ], - "name" : "failure" + "name" : "notFound", + "rawValue" : "404" }, { "associatedValues" : [ - { - "type" : { - "bool" : { - - } - } - }, - { - "type" : { - "int" : { - } - } - }, - { - "type" : { - "string" : { + ], + "name" : "serverError", + "rawValue" : "500" + }, + { + "associatedValues" : [ - } - } - } ], - "name" : "status" + "name" : "unknown", + "rawValue" : "-1" } ], "emitStyle" : "const", - "name" : "Result", - "namespace" : [ - "Utilities" - ], + "name" : "HttpStatus", + "rawType" : "Int", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "Utilities.Result", - "tsFullPath" : "Utilities.Result" + "swiftCallName" : "HttpStatus", + "tsFullPath" : "HttpStatus" }, { "cases" : [ + { + "associatedValues" : [ + ], + "name" : "rough", + "rawValue" : "0.1" + }, + { + "associatedValues" : [ + + ], + "name" : "normal", + "rawValue" : "0.01" + }, + { + "associatedValues" : [ + + ], + "name" : "fine", + "rawValue" : "0.001" + } ], "emitStyle" : "const", - "name" : "API", + "name" : "Precision", + "rawType" : "Float", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "API", - "tsFullPath" : "API" + "swiftCallName" : "Precision", + "tsFullPath" : "Precision" }, { "cases" : [ { "associatedValues" : [ - { - "type" : { - "string" : { - } - } - } ], - "name" : "success" + "name" : "quarter", + "rawValue" : "0.25" }, { "associatedValues" : [ - { - "type" : { - "string" : { - } - } - }, - { - "type" : { - "int" : { + ], + "name" : "half", + "rawValue" : "0.5" + }, + { + "associatedValues" : [ - } - } - } ], - "name" : "failure" + "name" : "golden", + "rawValue" : "1.618" } ], "emitStyle" : "const", - "name" : "NetworkingResult", - "namespace" : [ - "API" - ], + "name" : "Ratio", + "rawType" : "Double", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "API.NetworkingResult", - "tsFullPath" : "API.NetworkingResult" + "swiftCallName" : "Ratio", + "tsFullPath" : "Ratio" }, { "cases" : [ { "associatedValues" : [ - { - "type" : { - "swiftStruct" : { - "_0" : "Address" - } - } - } - ], - "name" : "structPayload" - }, - { - "associatedValues" : [ - { - "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" - } - } - } + ], - "name" : "classPayload" + "name" : "north" }, { "associatedValues" : [ - { - "type" : { - "jsObject" : { - } - } - } ], - "name" : "jsObjectPayload" + "name" : "south" }, { "associatedValues" : [ - { - "type" : { - "associatedValueEnum" : { - "_0" : "APIResult" - } - } - } + ], - "name" : "nestedEnum" - }, - { - "associatedValues" : [ - { - "type" : { - "array" : { - "_0" : { - "int" : { - - } - } - } - } - } - ], - "name" : "arrayPayload" - }, - { - "associatedValues" : [ - { - "type" : { - "jsObject" : { - "_0" : "Foo" - } - } - } - ], - "name" : "jsClassPayload" + "name" : "east" }, { "associatedValues" : [ ], - "name" : "empty" + "name" : "west" } ], - "emitStyle" : "const", - "name" : "AllTypesResult", + "emitStyle" : "tsEnum", + "name" : "TSDirection", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "AllTypesResult", - "tsFullPath" : "AllTypesResult" + "swiftCallName" : "TSDirection", + "tsFullPath" : "TSDirection" }, { "cases" : [ - { - "associatedValues" : [ - { - "type" : { - "rawValueEnum" : { - "_0" : "Precision", - "_1" : "Float" - } - } - } - ], - "name" : "precision" - }, - { - "associatedValues" : [ - { - "type" : { - "caseEnum" : { - "_0" : "Direction" - } - } - } - ], - "name" : "direction" - }, - { - "associatedValues" : [ - { - "type" : { - "nullable" : { - "_0" : { - "rawValueEnum" : { - "_0" : "Precision", - "_1" : "Float" - } - }, - "_1" : "null" - } - } - } - ], - "name" : "optPrecision" - }, - { - "associatedValues" : [ - { - "type" : { - "nullable" : { - "_0" : { - "caseEnum" : { - "_0" : "Direction" - } - }, - "_1" : "null" - } - } - } - ], - "name" : "optDirection" - }, { "associatedValues" : [ ], - "name" : "empty" - } - ], - "emitStyle" : "const", - "name" : "TypedPayloadResult", - "staticMethods" : [ - - ], - "staticProperties" : [ - - ], - "swiftCallName" : "TypedPayloadResult", - "tsFullPath" : "TypedPayloadResult" - }, - { - "cases" : [ + "name" : "light", + "rawValue" : "light" + }, { "associatedValues" : [ ], - "name" : "scientific" + "name" : "dark", + "rawValue" : "dark" }, { "associatedValues" : [ ], - "name" : "basic" + "name" : "auto", + "rawValue" : "auto" } ], - "emitStyle" : "const", - "name" : "StaticCalculator", + "emitStyle" : "tsEnum", + "name" : "TSTheme", + "rawType" : "String", "staticMethods" : [ - { - "abiName" : "bjs_StaticCalculator_static_roundtrip", - "effects" : { - "isAsync" : false, - "isStatic" : true, - "isThrows" : false - }, - "name" : "roundtrip", - "parameters" : [ - { - "label" : "_", - "name" : "value", - "type" : { - "int" : { - - } - } - } - ], - "returnType" : { - "int" : { - } - }, - "staticContext" : { - "enumName" : { - "_0" : "StaticCalculator" - } - } - } ], "staticProperties" : [ ], - "swiftCallName" : "StaticCalculator", - "tsFullPath" : "StaticCalculator" + "swiftCallName" : "TSTheme", + "tsFullPath" : "TSTheme" }, { "cases" : [ ], "emitStyle" : "const", - "name" : "StaticUtils", + "name" : "Utils", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "StaticUtils", - "tsFullPath" : "StaticUtils" + "swiftCallName" : "Utils", + "tsFullPath" : "Utils" }, { "cases" : [ ], "emitStyle" : "const", - "name" : "Nested", + "name" : "StringUtils", "namespace" : [ - "StaticUtils" + "Utils" ], "staticMethods" : [ { - "abiName" : "bjs_StaticUtils_Nested_static_roundtrip", + "abiName" : "bjs_Utils_StringUtils_static_uppercase", "effects" : { "isAsync" : false, "isStatic" : true, "isThrows" : false }, - "name" : "roundtrip", + "name" : "uppercase", "namespace" : [ - "StaticUtils", - "Nested" + "Utils", + "StringUtils" ], "parameters" : [ { "label" : "_", - "name" : "value", + "name" : "text", "type" : { "string" : { @@ -6908,95 +6686,41 @@ }, "staticContext" : { "namespaceEnum" : { - "_0" : "StaticUtils.Nested" - } - } - } - ], - "staticProperties" : [ - - ], - "swiftCallName" : "StaticUtils.Nested", - "tsFullPath" : "StaticUtils.Nested" - }, - { - "cases" : [ - - ], - "emitStyle" : "const", - "name" : "GraphOperations", - "namespace" : [ - "Services", - "Graph" - ], - "staticMethods" : [ - { - "abiName" : "bjs_Services_Graph_GraphOperations_static_createGraph", - "effects" : { - "isAsync" : false, - "isStatic" : true, - "isThrows" : false - }, - "name" : "createGraph", - "namespace" : [ - "Services", - "Graph", - "GraphOperations" - ], - "parameters" : [ - { - "label" : "rootId", - "name" : "rootId", - "type" : { - "int" : { - - } - } - } - ], - "returnType" : { - "int" : { - - } - }, - "staticContext" : { - "namespaceEnum" : { - "_0" : "GraphOperations" + "_0" : "Utils.StringUtils" } } }, { - "abiName" : "bjs_Services_Graph_GraphOperations_static_nodeCount", + "abiName" : "bjs_Utils_StringUtils_static_lowercase", "effects" : { "isAsync" : false, "isStatic" : true, "isThrows" : false }, - "name" : "nodeCount", + "name" : "lowercase", "namespace" : [ - "Services", - "Graph", - "GraphOperations" + "Utils", + "StringUtils" ], "parameters" : [ { - "label" : "graphId", - "name" : "graphId", + "label" : "_", + "name" : "text", "type" : { - "int" : { + "string" : { } } } ], "returnType" : { - "int" : { + "string" : { } }, "staticContext" : { "namespaceEnum" : { - "_0" : "GraphOperations" + "_0" : "Utils.StringUtils" } } } @@ -7004,373 +6728,313 @@ "staticProperties" : [ ], - "swiftCallName" : "GraphOperations", - "tsFullPath" : "Services.Graph.GraphOperations" + "swiftCallName" : "Utils.StringUtils", + "tsFullPath" : "Utils.StringUtils" }, { "cases" : [ - { - "associatedValues" : [ - ], - "name" : "option1" - }, - { - "associatedValues" : [ - - ], - "name" : "option2" - } ], "emitStyle" : "const", - "name" : "StaticPropertyEnum", + "name" : "Networking", "staticMethods" : [ ], "staticProperties" : [ - { - "isReadonly" : false, - "isStatic" : true, - "name" : "enumProperty", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "string" : { - } - } - }, - { - "isReadonly" : true, - "isStatic" : true, - "name" : "enumConstant", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "int" : { + ], + "swiftCallName" : "Networking", + "tsFullPath" : "Networking" + }, + { + "cases" : [ - } - } - }, + ], + "emitStyle" : "const", + "name" : "API", + "namespace" : [ + "Networking" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Networking.API", + "tsFullPath" : "Networking.API" + }, + { + "cases" : [ { - "isReadonly" : false, - "isStatic" : true, - "name" : "enumBool", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "bool" : { + "associatedValues" : [ - } - } + ], + "name" : "get" }, { - "isReadonly" : false, - "isStatic" : true, - "name" : "enumVariable", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "int" : { + "associatedValues" : [ - } - } + ], + "name" : "post" }, { - "isReadonly" : true, - "isStatic" : true, - "name" : "computedReadonly", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "int" : { + "associatedValues" : [ - } - } + ], + "name" : "put" }, { - "isReadonly" : false, - "isStatic" : true, - "name" : "computedReadWrite", - "staticContext" : { - "enumName" : { - "_0" : "StaticPropertyEnum" - } - }, - "type" : { - "string" : { + "associatedValues" : [ - } - } + ], + "name" : "delete" } ], - "swiftCallName" : "StaticPropertyEnum", - "tsFullPath" : "StaticPropertyEnum" + "emitStyle" : "const", + "name" : "Method", + "namespace" : [ + "Networking", + "API" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Networking.API.Method", + "tsFullPath" : "Networking.API.Method" }, { "cases" : [ ], "emitStyle" : "const", - "name" : "StaticPropertyNamespace", + "name" : "Configuration", "staticMethods" : [ ], "staticProperties" : [ + + ], + "swiftCallName" : "Configuration", + "tsFullPath" : "Configuration" + }, + { + "cases" : [ { - "isReadonly" : false, - "isStatic" : true, - "name" : "namespaceProperty", - "namespace" : [ - "StaticPropertyNamespace" + "associatedValues" : [ + ], - "staticContext" : { - "namespaceEnum" : { - "_0" : "StaticPropertyNamespace" - } - }, - "type" : { - "string" : { + "name" : "debug", + "rawValue" : "debug" + }, + { + "associatedValues" : [ - } - } + ], + "name" : "info", + "rawValue" : "info" }, { - "isReadonly" : true, - "isStatic" : true, - "name" : "namespaceConstant", - "namespace" : [ - "StaticPropertyNamespace" + "associatedValues" : [ + ], - "staticContext" : { - "namespaceEnum" : { - "_0" : "StaticPropertyNamespace" - } - }, - "type" : { - "string" : { + "name" : "warning", + "rawValue" : "warning" + }, + { + "associatedValues" : [ - } - } + ], + "name" : "error", + "rawValue" : "error" } - ], - "swiftCallName" : "StaticPropertyNamespace", - "tsFullPath" : "StaticPropertyNamespace" - }, - { - "cases" : [ - ], "emitStyle" : "const", - "name" : "NestedProperties", + "name" : "LogLevel", "namespace" : [ - "StaticPropertyNamespace" + "Configuration" ], + "rawType" : "String", "staticMethods" : [ ], "staticProperties" : [ + + ], + "swiftCallName" : "Configuration.LogLevel", + "tsFullPath" : "Configuration.LogLevel" + }, + { + "cases" : [ { - "isReadonly" : false, - "isStatic" : true, - "name" : "nestedProperty", - "namespace" : [ - "StaticPropertyNamespace", - "NestedProperties" - ], - "staticContext" : { - "namespaceEnum" : { - "_0" : "StaticPropertyNamespace.NestedProperties" - } - }, - "type" : { - "int" : { + "associatedValues" : [ - } - } + ], + "name" : "http", + "rawValue" : "80" }, { - "isReadonly" : true, - "isStatic" : true, - "name" : "nestedConstant", - "namespace" : [ - "StaticPropertyNamespace", - "NestedProperties" - ], - "staticContext" : { - "namespaceEnum" : { - "_0" : "StaticPropertyNamespace.NestedProperties" - } - }, - "type" : { - "string" : { + "associatedValues" : [ - } - } + ], + "name" : "https", + "rawValue" : "443" }, { - "isReadonly" : false, - "isStatic" : true, - "name" : "nestedDouble", - "namespace" : [ - "StaticPropertyNamespace", - "NestedProperties" - ], - "staticContext" : { - "namespaceEnum" : { - "_0" : "StaticPropertyNamespace.NestedProperties" - } - }, - "type" : { - "double" : { + "associatedValues" : [ - } - } + ], + "name" : "development", + "rawValue" : "3000" } ], - "swiftCallName" : "StaticPropertyNamespace.NestedProperties", - "tsFullPath" : "StaticPropertyNamespace.NestedProperties" + "emitStyle" : "const", + "name" : "Port", + "namespace" : [ + "Configuration" + ], + "rawType" : "Int", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Configuration.Port", + "tsFullPath" : "Configuration.Port" + }, + { + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "Internal", + "namespace" : [ + "Networking", + "APIV2" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Internal", + "tsFullPath" : "Networking.APIV2.Internal" }, { "cases" : [ { "associatedValues" : [ - { - "type" : { - "nullable" : { - "_0" : { - "swiftStruct" : { - "_0" : "Address" - } - }, - "_1" : "null" - } - } - } + ], - "name" : "optStruct" + "name" : "get" }, + { + "associatedValues" : [ + + ], + "name" : "post" + } + ], + "emitStyle" : "const", + "name" : "SupportedMethod", + "namespace" : [ + "Networking", + "APIV2", + "Internal" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Internal.SupportedMethod", + "tsFullPath" : "Networking.APIV2.Internal.SupportedMethod" + }, + { + "cases" : [ { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "swiftHeapObject" : { - "_0" : "Greeter" - } - }, - "_1" : "null" + "string" : { + } } } ], - "name" : "optClass" + "name" : "success" }, { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "jsObject" : { + "int" : { - } - }, - "_1" : "null" } } } ], - "name" : "optJSObject" + "name" : "failure" }, { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "associatedValueEnum" : { - "_0" : "APIResult" - } - }, - "_1" : "null" + "bool" : { + } } } ], - "name" : "optNestedEnum" + "name" : "flag" }, { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "array" : { - "_0" : { - "int" : { + "float" : { - } - } - } - }, - "_1" : "null" } } } ], - "name" : "optArray" + "name" : "rate" }, { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "jsObject" : { - "_0" : "Foo" - } - }, - "_1" : "null" + "double" : { + } } } ], - "name" : "optJsClass" + "name" : "precise" }, { "associatedValues" : [ ], - "name" : "empty" + "name" : "info" } ], "emitStyle" : "const", - "name" : "OptionalAllTypesResult", + "name" : "APIResult", "staticMethods" : [ ], "staticProperties" : [ ], - "swiftCallName" : "OptionalAllTypesResult", - "tsFullPath" : "OptionalAllTypesResult" + "swiftCallName" : "APIResult", + "tsFullPath" : "APIResult" }, { "cases" : [ @@ -7378,13 +7042,8 @@ "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "string" : { + "string" : { - } - }, - "_1" : "null" } } } @@ -7395,644 +7054,1345 @@ "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "int" : { + "string" : { - } - }, - "_1" : "null" } } }, { "type" : { - "nullable" : { - "_0" : { - "bool" : { + "int" : { - } - }, - "_1" : "null" } } } ], - "name" : "failure" + "name" : "error" }, { "associatedValues" : [ { "type" : { - "nullable" : { - "_0" : { - "bool" : { + "double" : { - } - }, - "_1" : "null" } } }, { "type" : { - "nullable" : { - "_0" : { - "int" : { + "double" : { - } - }, - "_1" : "null" } } }, { "type" : { - "nullable" : { - "_0" : { - "string" : { + "string" : { - } - }, - "_1" : "null" } } } ], - "name" : "status" - } - ], - "emitStyle" : "const", - "name" : "APIOptionalResult", - "staticMethods" : [ + "name" : "location" + }, + { + "associatedValues" : [ + { + "type" : { + "bool" : { - ], - "staticProperties" : [ + } + } + }, + { + "type" : { + "int" : { - ], - "swiftCallName" : "APIOptionalResult", - "tsFullPath" : "APIOptionalResult" - } - ], - "exposeToGlobal" : false, - "functions" : [ - { - "abiName" : "bjs_roundTripVoid", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripVoid", - "parameters" : [ + } + } + }, + { + "type" : { + "string" : { - ], - "returnType" : { - "void" : { + } + } + } + ], + "name" : "status" + }, + { + "associatedValues" : [ + { + "type" : { + "double" : { - } - } + } + } + }, + { + "type" : { + "double" : { + + } + } + }, + { + "type" : { + "double" : { + + } + } + } + ], + "name" : "coordinates" + }, + { + "associatedValues" : [ + { + "type" : { + "bool" : { + + } + } + }, + { + "type" : { + "bool" : { + + } + } + }, + { + "type" : { + "int" : { + + } + } + }, + { + "type" : { + "int" : { + + } + } + }, + { + "type" : { + "double" : { + + } + } + }, + { + "type" : { + "double" : { + + } + } + }, + { + "type" : { + "string" : { + + } + } + }, + { + "type" : { + "string" : { + + } + } + }, + { + "type" : { + "string" : { + + } + } + } + ], + "name" : "comprehensive" + }, + { + "associatedValues" : [ + + ], + "name" : "info" + } + ], + "emitStyle" : "const", + "name" : "ComplexResult", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "ComplexResult", + "tsFullPath" : "ComplexResult" + }, + { + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "Utilities", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Utilities", + "tsFullPath" : "Utilities" + }, + { + "cases" : [ + { + "associatedValues" : [ + { + "type" : { + "string" : { + + } + } + } + ], + "name" : "success" + }, + { + "associatedValues" : [ + { + "type" : { + "string" : { + + } + } + }, + { + "type" : { + "int" : { + + } + } + } + ], + "name" : "failure" + }, + { + "associatedValues" : [ + { + "type" : { + "bool" : { + + } + } + }, + { + "type" : { + "int" : { + + } + } + }, + { + "type" : { + "string" : { + + } + } + } + ], + "name" : "status" + } + ], + "emitStyle" : "const", + "name" : "Result", + "namespace" : [ + "Utilities" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "Utilities.Result", + "tsFullPath" : "Utilities.Result" + }, + { + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "API", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "API", + "tsFullPath" : "API" + }, + { + "cases" : [ + { + "associatedValues" : [ + { + "type" : { + "string" : { + + } + } + } + ], + "name" : "success" + }, + { + "associatedValues" : [ + { + "type" : { + "string" : { + + } + } + }, + { + "type" : { + "int" : { + + } + } + } + ], + "name" : "failure" + } + ], + "emitStyle" : "const", + "name" : "NetworkingResult", + "namespace" : [ + "API" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "API.NetworkingResult", + "tsFullPath" : "API.NetworkingResult" + }, + { + "cases" : [ + { + "associatedValues" : [ + { + "type" : { + "swiftStruct" : { + "_0" : "Address" + } + } + } + ], + "name" : "structPayload" + }, + { + "associatedValues" : [ + { + "type" : { + "swiftHeapObject" : { + "_0" : "Greeter" + } + } + } + ], + "name" : "classPayload" + }, + { + "associatedValues" : [ + { + "type" : { + "jsObject" : { + + } + } + } + ], + "name" : "jsObjectPayload" + }, + { + "associatedValues" : [ + { + "type" : { + "associatedValueEnum" : { + "_0" : "APIResult" + } + } + } + ], + "name" : "nestedEnum" + }, + { + "associatedValues" : [ + { + "type" : { + "array" : { + "_0" : { + "int" : { + + } + } + } + } + } + ], + "name" : "arrayPayload" + }, + { + "associatedValues" : [ + { + "type" : { + "jsObject" : { + "_0" : "Foo" + } + } + } + ], + "name" : "jsClassPayload" + }, + { + "associatedValues" : [ + + ], + "name" : "empty" + } + ], + "emitStyle" : "const", + "name" : "AllTypesResult", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "AllTypesResult", + "tsFullPath" : "AllTypesResult" + }, + { + "cases" : [ + { + "associatedValues" : [ + { + "type" : { + "rawValueEnum" : { + "_0" : "Precision", + "_1" : "Float" + } + } + } + ], + "name" : "precision" + }, + { + "associatedValues" : [ + { + "type" : { + "caseEnum" : { + "_0" : "Direction" + } + } + } + ], + "name" : "direction" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "rawValueEnum" : { + "_0" : "Precision", + "_1" : "Float" + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optPrecision" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "caseEnum" : { + "_0" : "Direction" + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optDirection" + }, + { + "associatedValues" : [ + + ], + "name" : "empty" + } + ], + "emitStyle" : "const", + "name" : "TypedPayloadResult", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "TypedPayloadResult", + "tsFullPath" : "TypedPayloadResult" + }, + { + "cases" : [ + { + "associatedValues" : [ + + ], + "name" : "scientific" + }, + { + "associatedValues" : [ + + ], + "name" : "basic" + } + ], + "emitStyle" : "const", + "name" : "StaticCalculator", + "staticMethods" : [ + { + "abiName" : "bjs_StaticCalculator_static_roundtrip", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "roundtrip", + "parameters" : [ + { + "label" : "_", + "name" : "value", + "type" : { + "int" : { + + } + } + } + ], + "returnType" : { + "int" : { + + } + }, + "staticContext" : { + "enumName" : { + "_0" : "StaticCalculator" + } + } + } + ], + "staticProperties" : [ + + ], + "swiftCallName" : "StaticCalculator", + "tsFullPath" : "StaticCalculator" + }, + { + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "StaticUtils", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "StaticUtils", + "tsFullPath" : "StaticUtils" + }, + { + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "Nested", + "namespace" : [ + "StaticUtils" + ], + "staticMethods" : [ + { + "abiName" : "bjs_StaticUtils_Nested_static_roundtrip", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "roundtrip", + "namespace" : [ + "StaticUtils", + "Nested" + ], + "parameters" : [ + { + "label" : "_", + "name" : "value", + "type" : { + "string" : { + + } + } + } + ], + "returnType" : { + "string" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticUtils.Nested" + } + } + } + ], + "staticProperties" : [ + + ], + "swiftCallName" : "StaticUtils.Nested", + "tsFullPath" : "StaticUtils.Nested" }, { - "abiName" : "bjs_roundTripInt", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripInt", - "parameters" : [ + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "GraphOperations", + "namespace" : [ + "Services", + "Graph" + ], + "staticMethods" : [ { - "label" : "v", - "name" : "v", - "type" : { + "abiName" : "bjs_Services_Graph_GraphOperations_static_createGraph", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "createGraph", + "namespace" : [ + "Services", + "Graph", + "GraphOperations" + ], + "parameters" : [ + { + "label" : "rootId", + "name" : "rootId", + "type" : { + "int" : { + + } + } + } + ], + "returnType" : { + "int" : { + + } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "GraphOperations" + } + } + }, + { + "abiName" : "bjs_Services_Graph_GraphOperations_static_nodeCount", + "effects" : { + "isAsync" : false, + "isStatic" : true, + "isThrows" : false + }, + "name" : "nodeCount", + "namespace" : [ + "Services", + "Graph", + "GraphOperations" + ], + "parameters" : [ + { + "label" : "graphId", + "name" : "graphId", + "type" : { + "int" : { + + } + } + } + ], + "returnType" : { "int" : { } + }, + "staticContext" : { + "namespaceEnum" : { + "_0" : "GraphOperations" + } } } ], - "returnType" : { - "int" : { + "staticProperties" : [ - } - } + ], + "swiftCallName" : "GraphOperations", + "tsFullPath" : "Services.Graph.GraphOperations" }, { - "abiName" : "bjs_roundTripUInt", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripUInt", - "parameters" : [ + "cases" : [ { - "label" : "v", - "name" : "v", + "associatedValues" : [ + + ], + "name" : "option1" + }, + { + "associatedValues" : [ + + ], + "name" : "option2" + } + ], + "emitStyle" : "const", + "name" : "StaticPropertyEnum", + "staticMethods" : [ + + ], + "staticProperties" : [ + { + "isReadonly" : false, + "isStatic" : true, + "name" : "enumProperty", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, "type" : { - "uint" : { + "string" : { } } - } - ], - "returnType" : { - "uint" : { + }, + { + "isReadonly" : true, + "isStatic" : true, + "name" : "enumConstant", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, + "type" : { + "int" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : true, + "name" : "enumBool", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, + "type" : { + "bool" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : true, + "name" : "enumVariable", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, + "type" : { + "int" : { + + } + } + }, + { + "isReadonly" : true, + "isStatic" : true, + "name" : "computedReadonly", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, + "type" : { + "int" : { + + } + } + }, + { + "isReadonly" : false, + "isStatic" : true, + "name" : "computedReadWrite", + "staticContext" : { + "enumName" : { + "_0" : "StaticPropertyEnum" + } + }, + "type" : { + "string" : { + } + } } - } + ], + "swiftCallName" : "StaticPropertyEnum", + "tsFullPath" : "StaticPropertyEnum" }, { - "abiName" : "bjs_roundTripFloat", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripFloat", - "parameters" : [ + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "StaticPropertyNamespace", + "staticMethods" : [ + + ], + "staticProperties" : [ { - "label" : "v", - "name" : "v", + "isReadonly" : false, + "isStatic" : true, + "name" : "namespaceProperty", + "namespace" : [ + "StaticPropertyNamespace" + ], + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticPropertyNamespace" + } + }, "type" : { - "float" : { + "string" : { } } - } - ], - "returnType" : { - "float" : { - - } - } - }, - { - "abiName" : "bjs_roundTripDouble", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripDouble", - "parameters" : [ + }, { - "label" : "v", - "name" : "v", + "isReadonly" : true, + "isStatic" : true, + "name" : "namespaceConstant", + "namespace" : [ + "StaticPropertyNamespace" + ], + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticPropertyNamespace" + } + }, "type" : { - "double" : { + "string" : { } } } ], - "returnType" : { - "double" : { - - } - } + "swiftCallName" : "StaticPropertyNamespace", + "tsFullPath" : "StaticPropertyNamespace" }, { - "abiName" : "bjs_roundTripBool", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripBool", - "parameters" : [ + "cases" : [ + + ], + "emitStyle" : "const", + "name" : "NestedProperties", + "namespace" : [ + "StaticPropertyNamespace" + ], + "staticMethods" : [ + + ], + "staticProperties" : [ { - "label" : "v", - "name" : "v", + "isReadonly" : false, + "isStatic" : true, + "name" : "nestedProperty", + "namespace" : [ + "StaticPropertyNamespace", + "NestedProperties" + ], + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticPropertyNamespace.NestedProperties" + } + }, "type" : { - "bool" : { + "int" : { } } - } - ], - "returnType" : { - "bool" : { - - } - } - }, - { - "abiName" : "bjs_roundTripString", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripString", - "parameters" : [ + }, { - "label" : "v", - "name" : "v", + "isReadonly" : true, + "isStatic" : true, + "name" : "nestedConstant", + "namespace" : [ + "StaticPropertyNamespace", + "NestedProperties" + ], + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticPropertyNamespace.NestedProperties" + } + }, "type" : { "string" : { } } - } - ], - "returnType" : { - "string" : { - - } - } - }, - { - "abiName" : "bjs_roundTripSwiftHeapObject", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripSwiftHeapObject", - "parameters" : [ + }, { - "label" : "v", - "name" : "v", + "isReadonly" : false, + "isStatic" : true, + "name" : "nestedDouble", + "namespace" : [ + "StaticPropertyNamespace", + "NestedProperties" + ], + "staticContext" : { + "namespaceEnum" : { + "_0" : "StaticPropertyNamespace.NestedProperties" + } + }, "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" + "double" : { + } } } ], - "returnType" : { - "swiftHeapObject" : { - "_0" : "Greeter" - } - } + "swiftCallName" : "StaticPropertyNamespace.NestedProperties", + "tsFullPath" : "StaticPropertyNamespace.NestedProperties" }, { - "abiName" : "bjs_roundTripUnsafeRawPointer", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripUnsafeRawPointer", - "parameters" : [ + "cases" : [ { - "label" : "v", - "name" : "v", - "type" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeRawPointer" + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "swiftStruct" : { + "_0" : "Address" + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optStruct" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "swiftHeapObject" : { + "_0" : "Greeter" + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optClass" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "jsObject" : { + + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optJSObject" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "associatedValueEnum" : { + "_0" : "APIResult" + } + }, + "_1" : "null" + } + } + } + ], + "name" : "optNestedEnum" + }, + { + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "array" : { + "_0" : { + "int" : { + + } + } + } + }, + "_1" : "null" + } } } - } - } - ], - "returnType" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeRawPointer" - } - } - } - }, - { - "abiName" : "bjs_roundTripUnsafeMutableRawPointer", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripUnsafeMutableRawPointer", - "parameters" : [ + ], + "name" : "optArray" + }, { - "label" : "v", - "name" : "v", - "type" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeMutableRawPointer" + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "jsObject" : { + "_0" : "Foo" + } + }, + "_1" : "null" + } } } - } + ], + "name" : "optJsClass" + }, + { + "associatedValues" : [ + + ], + "name" : "empty" } ], - "returnType" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeMutableRawPointer" - } - } - } + "emitStyle" : "const", + "name" : "OptionalAllTypesResult", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "OptionalAllTypesResult", + "tsFullPath" : "OptionalAllTypesResult" }, { - "abiName" : "bjs_roundTripOpaquePointer", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripOpaquePointer", - "parameters" : [ + "cases" : [ { - "label" : "v", - "name" : "v", - "type" : { - "unsafePointer" : { - "_0" : { - "kind" : "opaquePointer" + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "string" : { + + } + }, + "_1" : "null" + } } } - } - } - ], - "returnType" : { - "unsafePointer" : { - "_0" : { - "kind" : "opaquePointer" - } - } - } - }, - { - "abiName" : "bjs_roundTripUnsafePointer", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripUnsafePointer", - "parameters" : [ + ], + "name" : "success" + }, { - "label" : "v", - "name" : "v", - "type" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafePointer", - "pointee" : "UInt8" + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "int" : { + + } + }, + "_1" : "null" + } + } + }, + { + "type" : { + "nullable" : { + "_0" : { + "bool" : { + + } + }, + "_1" : "null" + } } } - } - } - ], - "returnType" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafePointer", - "pointee" : "UInt8" - } - } - } - }, - { - "abiName" : "bjs_roundTripUnsafeMutablePointer", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundTripUnsafeMutablePointer", - "parameters" : [ + ], + "name" : "failure" + }, { - "label" : "v", - "name" : "v", - "type" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeMutablePointer", - "pointee" : "UInt8" + "associatedValues" : [ + { + "type" : { + "nullable" : { + "_0" : { + "bool" : { + + } + }, + "_1" : "null" + } + } + }, + { + "type" : { + "nullable" : { + "_0" : { + "int" : { + + } + }, + "_1" : "null" + } + } + }, + { + "type" : { + "nullable" : { + "_0" : { + "string" : { + + } + }, + "_1" : "null" + } } } - } + ], + "name" : "status" } ], - "returnType" : { - "unsafePointer" : { - "_0" : { - "kind" : "unsafeMutablePointer", - "pointee" : "UInt8" - } - } - } - }, + "emitStyle" : "const", + "name" : "APIOptionalResult", + "staticMethods" : [ + + ], + "staticProperties" : [ + + ], + "swiftCallName" : "APIOptionalResult", + "tsFullPath" : "APIOptionalResult" + } + ], + "exposeToGlobal" : false, + "functions" : [ { - "abiName" : "bjs_roundTripJSObject", + "abiName" : "bjs_roundTripVoid", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripJSObject", - "parameters" : [ - { - "label" : "v", - "name" : "v", - "type" : { - "jsObject" : { - - } - } - } + "name" : "roundTripVoid", + "parameters" : [ + ], "returnType" : { - "jsObject" : { + "void" : { } } }, { - "abiName" : "bjs_roundTripDictionaryExport", + "abiName" : "bjs_roundTripInt", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripDictionaryExport", + "name" : "roundTripInt", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "dictionary" : { - "_0" : { - "int" : { + "int" : { - } - } } } } ], "returnType" : { - "dictionary" : { - "_0" : { - "int" : { + "int" : { - } - } } } }, { - "abiName" : "bjs_roundTripOptionalDictionaryExport", + "abiName" : "bjs_roundTripUInt", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripOptionalDictionaryExport", + "name" : "roundTripUInt", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "nullable" : { - "_0" : { - "dictionary" : { - "_0" : { - "string" : { + "uint" : { - } - } - } - }, - "_1" : "null" } } } ], "returnType" : { - "nullable" : { - "_0" : { - "dictionary" : { - "_0" : { - "string" : { + "uint" : { - } - } - } - }, - "_1" : "null" } } }, { - "abiName" : "bjs_roundTripJSValue", + "abiName" : "bjs_roundTripFloat", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripJSValue", + "name" : "roundTripFloat", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "jsValue" : { + "float" : { } } } ], "returnType" : { - "jsValue" : { + "float" : { } } }, { - "abiName" : "bjs_roundTripOptionalJSValue", + "abiName" : "bjs_roundTripDouble", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripOptionalJSValue", + "name" : "roundTripDouble", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "nullable" : { - "_0" : { - "jsValue" : { + "double" : { - } - }, - "_1" : "null" } } } ], "returnType" : { - "nullable" : { - "_0" : { - "jsValue" : { + "double" : { - } - }, - "_1" : "null" } } }, { - "abiName" : "bjs_roundTripOptionalJSValueArray", + "abiName" : "bjs_roundTripBool", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripOptionalJSValueArray", + "name" : "roundTripBool", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "nullable" : { - "_0" : { - "array" : { - "_0" : { - "jsValue" : { + "bool" : { - } - } - } - }, - "_1" : "null" } } } ], "returnType" : { - "nullable" : { - "_0" : { - "array" : { - "_0" : { - "jsValue" : { + "bool" : { - } - } - } - }, - "_1" : "null" } } }, { - "abiName" : "bjs_makeImportedFoo", + "abiName" : "bjs_roundTripString", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "makeImportedFoo", + "name" : "roundTripString", "parameters" : [ { - "label" : "value", - "name" : "value", + "label" : "v", + "name" : "v", "type" : { "string" : { @@ -8041,493 +8401,551 @@ } ], "returnType" : { - "jsObject" : { - "_0" : "Foo" + "string" : { + } } }, { - "abiName" : "bjs_throwsSwiftError", + "abiName" : "bjs_roundTripSwiftHeapObject", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsSwiftError", + "name" : "roundTripSwiftHeapObject", "parameters" : [ { - "label" : "shouldThrow", - "name" : "shouldThrow", + "label" : "v", + "name" : "v", "type" : { - "bool" : { - + "swiftHeapObject" : { + "_0" : "Greeter" } } } ], "returnType" : { - "void" : { - + "swiftHeapObject" : { + "_0" : "Greeter" } } }, { - "abiName" : "bjs_throwsWithIntResult", + "abiName" : "bjs_roundTripUnsafeRawPointer", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsWithIntResult", + "name" : "roundTripUnsafeRawPointer", "parameters" : [ - - ], - "returnType" : { - "int" : { - + { + "label" : "v", + "name" : "v", + "type" : { + "unsafePointer" : { + "_0" : { + "kind" : "unsafeRawPointer" + } + } + } } - } - }, - { - "abiName" : "bjs_throwsWithStringResult", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : true - }, - "name" : "throwsWithStringResult", - "parameters" : [ - ], "returnType" : { - "string" : { - + "unsafePointer" : { + "_0" : { + "kind" : "unsafeRawPointer" + } } } }, { - "abiName" : "bjs_throwsWithBoolResult", + "abiName" : "bjs_roundTripUnsafeMutableRawPointer", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsWithBoolResult", + "name" : "roundTripUnsafeMutableRawPointer", "parameters" : [ - - ], - "returnType" : { - "bool" : { - + { + "label" : "v", + "name" : "v", + "type" : { + "unsafePointer" : { + "_0" : { + "kind" : "unsafeMutableRawPointer" + } + } + } } - } - }, - { - "abiName" : "bjs_throwsWithFloatResult", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : true - }, - "name" : "throwsWithFloatResult", - "parameters" : [ - ], "returnType" : { - "float" : { - + "unsafePointer" : { + "_0" : { + "kind" : "unsafeMutableRawPointer" + } } } }, { - "abiName" : "bjs_throwsWithDoubleResult", + "abiName" : "bjs_roundTripOpaquePointer", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsWithDoubleResult", + "name" : "roundTripOpaquePointer", "parameters" : [ - + { + "label" : "v", + "name" : "v", + "type" : { + "unsafePointer" : { + "_0" : { + "kind" : "opaquePointer" + } + } + } + } ], "returnType" : { - "double" : { - + "unsafePointer" : { + "_0" : { + "kind" : "opaquePointer" + } } } }, { - "abiName" : "bjs_throwsWithSwiftHeapObjectResult", + "abiName" : "bjs_roundTripUnsafePointer", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsWithSwiftHeapObjectResult", + "name" : "roundTripUnsafePointer", "parameters" : [ - + { + "label" : "v", + "name" : "v", + "type" : { + "unsafePointer" : { + "_0" : { + "kind" : "unsafePointer", + "pointee" : "UInt8" + } + } + } + } ], "returnType" : { - "swiftHeapObject" : { - "_0" : "Greeter" + "unsafePointer" : { + "_0" : { + "kind" : "unsafePointer", + "pointee" : "UInt8" + } } } }, { - "abiName" : "bjs_throwsWithJSObjectResult", + "abiName" : "bjs_roundTripUnsafeMutablePointer", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : true + "isThrows" : false }, - "name" : "throwsWithJSObjectResult", + "name" : "roundTripUnsafeMutablePointer", "parameters" : [ - + { + "label" : "v", + "name" : "v", + "type" : { + "unsafePointer" : { + "_0" : { + "kind" : "unsafeMutablePointer", + "pointee" : "UInt8" + } + } + } + } ], "returnType" : { - "jsObject" : { - + "unsafePointer" : { + "_0" : { + "kind" : "unsafeMutablePointer", + "pointee" : "UInt8" + } } } }, { - "abiName" : "bjs_asyncRoundTripVoid", + "abiName" : "bjs_roundTripJSObject", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripVoid", + "name" : "roundTripJSObject", "parameters" : [ + { + "label" : "v", + "name" : "v", + "type" : { + "jsObject" : { + } + } + } ], "returnType" : { - "void" : { + "jsObject" : { } } }, { - "abiName" : "bjs_asyncRoundTripInt", + "abiName" : "bjs_roundTripDictionaryExport", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripInt", + "name" : "roundTripDictionaryExport", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "int" : { + "dictionary" : { + "_0" : { + "int" : { + } + } } } } ], "returnType" : { - "int" : { + "dictionary" : { + "_0" : { + "int" : { + } + } } } }, { - "abiName" : "bjs_asyncRoundTripFloat", + "abiName" : "bjs_roundTripOptionalDictionaryExport", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripFloat", + "name" : "roundTripOptionalDictionaryExport", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "float" : { + "nullable" : { + "_0" : { + "dictionary" : { + "_0" : { + "string" : { + } + } + } + }, + "_1" : "null" } } } ], "returnType" : { - "float" : { + "nullable" : { + "_0" : { + "dictionary" : { + "_0" : { + "string" : { + } + } + } + }, + "_1" : "null" } } }, { - "abiName" : "bjs_asyncRoundTripDouble", + "abiName" : "bjs_roundTripJSValue", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripDouble", + "name" : "roundTripJSValue", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "double" : { + "jsValue" : { } } } ], "returnType" : { - "double" : { + "jsValue" : { } } }, { - "abiName" : "bjs_asyncRoundTripBool", + "abiName" : "bjs_roundTripOptionalJSValue", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripBool", + "name" : "roundTripOptionalJSValue", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "bool" : { + "nullable" : { + "_0" : { + "jsValue" : { + } + }, + "_1" : "null" } } } ], "returnType" : { - "bool" : { + "nullable" : { + "_0" : { + "jsValue" : { + } + }, + "_1" : "null" } } }, { - "abiName" : "bjs_asyncRoundTripString", + "abiName" : "bjs_roundTripOptionalJSValueArray", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "asyncRoundTripString", + "name" : "roundTripOptionalJSValueArray", "parameters" : [ { "label" : "v", "name" : "v", "type" : { - "string" : { + "nullable" : { + "_0" : { + "array" : { + "_0" : { + "jsValue" : { + } + } + } + }, + "_1" : "null" } } } ], "returnType" : { - "string" : { + "nullable" : { + "_0" : { + "array" : { + "_0" : { + "jsValue" : { + } + } + } + }, + "_1" : "null" } } }, { - "abiName" : "bjs_asyncRoundTripSwiftHeapObject", + "abiName" : "bjs_makeImportedFoo", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "asyncRoundTripSwiftHeapObject", + "name" : "makeImportedFoo", "parameters" : [ { - "label" : "v", - "name" : "v", + "label" : "value", + "name" : "value", "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" + "string" : { + } } } ], "returnType" : { - "swiftHeapObject" : { - "_0" : "Greeter" + "jsObject" : { + "_0" : "Foo" } } }, { - "abiName" : "bjs_asyncRoundTripJSObject", + "abiName" : "bjs_throwsSwiftError", "effects" : { - "isAsync" : true, + "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "asyncRoundTripJSObject", + "name" : "throwsSwiftError", "parameters" : [ { - "label" : "v", - "name" : "v", + "label" : "shouldThrow", + "name" : "shouldThrow", "type" : { - "jsObject" : { + "bool" : { } } } ], "returnType" : { - "jsObject" : { + "void" : { } } }, { - "abiName" : "bjs_takeGreeter", + "abiName" : "bjs_throwsWithIntResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "takeGreeter", + "name" : "throwsWithIntResult", "parameters" : [ - { - "label" : "g", - "name" : "g", - "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" - } - } - }, - { - "label" : "name", - "name" : "name", - "type" : { - "string" : { - } - } - } ], "returnType" : { - "void" : { + "int" : { } } }, { - "abiName" : "bjs_createCalculator", + "abiName" : "bjs_throwsWithStringResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "createCalculator", + "name" : "throwsWithStringResult", "parameters" : [ ], "returnType" : { - "swiftHeapObject" : { - "_0" : "Calculator" + "string" : { + } } }, { - "abiName" : "bjs_useCalculator", + "abiName" : "bjs_throwsWithBoolResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "useCalculator", + "name" : "throwsWithBoolResult", "parameters" : [ - { - "label" : "calc", - "name" : "calc", - "type" : { - "swiftHeapObject" : { - "_0" : "Calculator" - } - } - }, - { - "label" : "x", - "name" : "x", - "type" : { - "int" : { - } - } - }, - { - "label" : "y", - "name" : "y", - "type" : { - "int" : { + ], + "returnType" : { + "bool" : { + + } + } + }, + { + "abiName" : "bjs_throwsWithFloatResult", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : true + }, + "name" : "throwsWithFloatResult", + "parameters" : [ - } - } - } ], "returnType" : { - "int" : { + "float" : { } } }, { - "abiName" : "bjs_testGreeterToJSValue", + "abiName" : "bjs_throwsWithDoubleResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "testGreeterToJSValue", + "name" : "throwsWithDoubleResult", "parameters" : [ ], "returnType" : { - "jsObject" : { + "double" : { } } }, { - "abiName" : "bjs_testCalculatorToJSValue", + "abiName" : "bjs_throwsWithSwiftHeapObjectResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "testCalculatorToJSValue", + "name" : "throwsWithSwiftHeapObjectResult", "parameters" : [ ], "returnType" : { - "jsObject" : { - + "swiftHeapObject" : { + "_0" : "Greeter" } } }, { - "abiName" : "bjs_testSwiftClassAsJSValue", + "abiName" : "bjs_throwsWithJSObjectResult", "effects" : { "isAsync" : false, "isStatic" : false, - "isThrows" : false + "isThrows" : true }, - "name" : "testSwiftClassAsJSValue", + "name" : "throwsWithJSObjectResult", "parameters" : [ - { - "label" : "greeter", - "name" : "greeter", - "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" - } - } - } + ], "returnType" : { "jsObject" : { @@ -8536,521 +8954,522 @@ } }, { - "abiName" : "bjs_setDirection", + "abiName" : "bjs_asyncRoundTripVoid", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "setDirection", + "name" : "asyncRoundTripVoid", "parameters" : [ - { - "label" : "_", - "name" : "direction", - "type" : { - "caseEnum" : { - "_0" : "Direction" - } - } - } + ], "returnType" : { - "caseEnum" : { - "_0" : "Direction" + "void" : { + } } }, { - "abiName" : "bjs_getDirection", + "abiName" : "bjs_asyncRoundTripInt", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "getDirection", + "name" : "asyncRoundTripInt", "parameters" : [ + { + "label" : "v", + "name" : "v", + "type" : { + "int" : { + } + } + } ], "returnType" : { - "caseEnum" : { - "_0" : "Direction" + "int" : { + } } }, { - "abiName" : "bjs_processDirection", + "abiName" : "bjs_asyncRoundTripFloat", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "processDirection", + "name" : "asyncRoundTripFloat", "parameters" : [ { - "label" : "_", - "name" : "input", + "label" : "v", + "name" : "v", "type" : { - "caseEnum" : { - "_0" : "Direction" + "float" : { + } } } ], "returnType" : { - "caseEnum" : { - "_0" : "Status" + "float" : { + } } }, { - "abiName" : "bjs_setTheme", + "abiName" : "bjs_asyncRoundTripDouble", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "setTheme", + "name" : "asyncRoundTripDouble", "parameters" : [ { - "label" : "_", - "name" : "theme", + "label" : "v", + "name" : "v", "type" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "double" : { + } } } ], "returnType" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "double" : { + } } }, { - "abiName" : "bjs_getTheme", + "abiName" : "bjs_asyncRoundTripBool", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "getTheme", + "name" : "asyncRoundTripBool", "parameters" : [ + { + "label" : "v", + "name" : "v", + "type" : { + "bool" : { + } + } + } ], "returnType" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "bool" : { + } } }, { - "abiName" : "bjs_setHttpStatus", + "abiName" : "bjs_asyncRoundTripString", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "setHttpStatus", + "name" : "asyncRoundTripString", "parameters" : [ { - "label" : "_", - "name" : "status", + "label" : "v", + "name" : "v", "type" : { - "rawValueEnum" : { - "_0" : "HttpStatus", - "_1" : "Int" + "string" : { + } } } ], "returnType" : { - "rawValueEnum" : { - "_0" : "HttpStatus", - "_1" : "Int" + "string" : { + } } }, { - "abiName" : "bjs_getHttpStatus", + "abiName" : "bjs_asyncRoundTripSwiftHeapObject", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "getHttpStatus", + "name" : "asyncRoundTripSwiftHeapObject", "parameters" : [ - + { + "label" : "v", + "name" : "v", + "type" : { + "swiftHeapObject" : { + "_0" : "Greeter" + } + } + } ], "returnType" : { - "rawValueEnum" : { - "_0" : "HttpStatus", - "_1" : "Int" + "swiftHeapObject" : { + "_0" : "Greeter" } } }, { - "abiName" : "bjs_processTheme", + "abiName" : "bjs_asyncRoundTripJSObject", "effects" : { - "isAsync" : false, + "isAsync" : true, "isStatic" : false, "isThrows" : false }, - "name" : "processTheme", + "name" : "asyncRoundTripJSObject", "parameters" : [ { - "label" : "_", - "name" : "theme", + "label" : "v", + "name" : "v", "type" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "jsObject" : { + } } } ], "returnType" : { - "rawValueEnum" : { - "_0" : "HttpStatus", - "_1" : "Int" + "jsObject" : { + } } }, { - "abiName" : "bjs_setTSDirection", + "abiName" : "bjs_takeGreeter", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "setTSDirection", + "name" : "takeGreeter", "parameters" : [ { - "label" : "_", - "name" : "direction", + "label" : "g", + "name" : "g", "type" : { - "caseEnum" : { - "_0" : "TSDirection" + "swiftHeapObject" : { + "_0" : "Greeter" + } + } + }, + { + "label" : "name", + "name" : "name", + "type" : { + "string" : { + } } } ], "returnType" : { - "caseEnum" : { - "_0" : "TSDirection" + "void" : { + } } }, { - "abiName" : "bjs_getTSDirection", + "abiName" : "bjs_createCalculator", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "getTSDirection", + "name" : "createCalculator", "parameters" : [ ], "returnType" : { - "caseEnum" : { - "_0" : "TSDirection" + "swiftHeapObject" : { + "_0" : "Calculator" } } }, { - "abiName" : "bjs_setTSTheme", + "abiName" : "bjs_useCalculator", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "setTSTheme", + "name" : "useCalculator", "parameters" : [ { - "label" : "_", - "name" : "theme", + "label" : "calc", + "name" : "calc", + "type" : { + "swiftHeapObject" : { + "_0" : "Calculator" + } + } + }, + { + "label" : "x", + "name" : "x", + "type" : { + "int" : { + + } + } + }, + { + "label" : "y", + "name" : "y", "type" : { - "rawValueEnum" : { - "_0" : "TSTheme", - "_1" : "String" + "int" : { + } } } ], "returnType" : { - "rawValueEnum" : { - "_0" : "TSTheme", - "_1" : "String" + "int" : { + } } }, { - "abiName" : "bjs_getTSTheme", + "abiName" : "bjs_testGreeterToJSValue", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "getTSTheme", + "name" : "testGreeterToJSValue", "parameters" : [ ], "returnType" : { - "rawValueEnum" : { - "_0" : "TSTheme", - "_1" : "String" + "jsObject" : { + } } }, { - "abiName" : "bjs_createConverter", + "abiName" : "bjs_testCalculatorToJSValue", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "createConverter", + "name" : "testCalculatorToJSValue", "parameters" : [ ], "returnType" : { - "swiftHeapObject" : { - "_0" : "Utils.Converter" + "jsObject" : { + } } }, { - "abiName" : "bjs_useConverter", + "abiName" : "bjs_testSwiftClassAsJSValue", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "useConverter", + "name" : "testSwiftClassAsJSValue", "parameters" : [ { - "label" : "converter", - "name" : "converter", + "label" : "greeter", + "name" : "greeter", "type" : { "swiftHeapObject" : { - "_0" : "Utils.Converter" - } - } - }, - { - "label" : "value", - "name" : "value", - "type" : { - "int" : { - + "_0" : "Greeter" } } } ], "returnType" : { - "string" : { + "jsObject" : { } } }, { - "abiName" : "bjs_roundTripConverterArray", + "abiName" : "bjs_setDirection", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripConverterArray", + "name" : "setDirection", "parameters" : [ { "label" : "_", - "name" : "converters", + "name" : "direction", "type" : { - "array" : { - "_0" : { - "swiftHeapObject" : { - "_0" : "Utils.Converter" - } - } + "caseEnum" : { + "_0" : "Direction" } } } ], "returnType" : { - "array" : { - "_0" : { - "swiftHeapObject" : { - "_0" : "Utils.Converter" - } - } + "caseEnum" : { + "_0" : "Direction" } } }, { - "abiName" : "bjs_createHTTPServer", + "abiName" : "bjs_getDirection", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "createHTTPServer", + "name" : "getDirection", "parameters" : [ ], "returnType" : { - "swiftHeapObject" : { - "_0" : "Networking.API.HTTPServer" + "caseEnum" : { + "_0" : "Direction" } } }, { - "abiName" : "bjs_createUUID", + "abiName" : "bjs_processDirection", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "createUUID", + "name" : "processDirection", "parameters" : [ { - "label" : "value", - "name" : "value", + "label" : "_", + "name" : "input", "type" : { - "string" : { - + "caseEnum" : { + "_0" : "Direction" } } } ], "returnType" : { - "swiftHeapObject" : { - "_0" : "UUID" + "caseEnum" : { + "_0" : "Status" } } }, { - "abiName" : "bjs_roundTripUUID", + "abiName" : "bjs_setTheme", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripUUID", + "name" : "setTheme", "parameters" : [ { "label" : "_", - "name" : "uuid", + "name" : "theme", "type" : { - "swiftHeapObject" : { - "_0" : "UUID" + "rawValueEnum" : { + "_0" : "Theme", + "_1" : "String" } } } ], "returnType" : { - "swiftHeapObject" : { - "_0" : "UUID" + "rawValueEnum" : { + "_0" : "Theme", + "_1" : "String" } } }, { - "abiName" : "bjs_roundtripNetworkingAPIMethod", + "abiName" : "bjs_getTheme", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripNetworkingAPIMethod", + "name" : "getTheme", "parameters" : [ - { - "label" : "_", - "name" : "method", - "type" : { - "caseEnum" : { - "_0" : "Networking.API.Method" - } - } - } + ], "returnType" : { - "caseEnum" : { - "_0" : "Networking.API.Method" + "rawValueEnum" : { + "_0" : "Theme", + "_1" : "String" } } }, { - "abiName" : "bjs_roundtripConfigurationLogLevel", + "abiName" : "bjs_setHttpStatus", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripConfigurationLogLevel", + "name" : "setHttpStatus", "parameters" : [ { "label" : "_", - "name" : "level", + "name" : "status", "type" : { "rawValueEnum" : { - "_0" : "Configuration.LogLevel", - "_1" : "String" + "_0" : "HttpStatus", + "_1" : "Int" } } } ], "returnType" : { "rawValueEnum" : { - "_0" : "Configuration.LogLevel", - "_1" : "String" + "_0" : "HttpStatus", + "_1" : "Int" } } }, { - "abiName" : "bjs_roundtripConfigurationPort", + "abiName" : "bjs_getHttpStatus", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripConfigurationPort", + "name" : "getHttpStatus", "parameters" : [ - { - "label" : "_", - "name" : "port", - "type" : { - "rawValueEnum" : { - "_0" : "Configuration.Port", - "_1" : "Int" - } - } - } + ], "returnType" : { "rawValueEnum" : { - "_0" : "Configuration.Port", + "_0" : "HttpStatus", "_1" : "Int" } } }, { - "abiName" : "bjs_processConfigurationLogLevel", + "abiName" : "bjs_processTheme", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "processConfigurationLogLevel", + "name" : "processTheme", "parameters" : [ { "label" : "_", - "name" : "level", + "name" : "theme", "type" : { "rawValueEnum" : { - "_0" : "Configuration.LogLevel", + "_0" : "Theme", "_1" : "String" } } @@ -9058,502 +9477,444 @@ ], "returnType" : { "rawValueEnum" : { - "_0" : "Configuration.Port", + "_0" : "HttpStatus", "_1" : "Int" } } }, { - "abiName" : "bjs_roundtripInternalSupportedMethod", + "abiName" : "bjs_setTSDirection", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripInternalSupportedMethod", + "name" : "setTSDirection", "parameters" : [ { "label" : "_", - "name" : "method", + "name" : "direction", "type" : { "caseEnum" : { - "_0" : "Internal.SupportedMethod" + "_0" : "TSDirection" } } } ], "returnType" : { "caseEnum" : { - "_0" : "Internal.SupportedMethod" + "_0" : "TSDirection" } } }, { - "abiName" : "bjs_roundtripAPIResult", + "abiName" : "bjs_getTSDirection", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripAPIResult", + "name" : "getTSDirection", "parameters" : [ - { - "label" : "result", - "name" : "result", - "type" : { - "associatedValueEnum" : { - "_0" : "APIResult" - } - } - } + ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "caseEnum" : { + "_0" : "TSDirection" } } }, { - "abiName" : "bjs_makeAPIResultSuccess", + "abiName" : "bjs_setTSTheme", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultSuccess", + "name" : "setTSTheme", "parameters" : [ { "label" : "_", - "name" : "value", + "name" : "theme", "type" : { - "string" : { - + "rawValueEnum" : { + "_0" : "TSTheme", + "_1" : "String" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "rawValueEnum" : { + "_0" : "TSTheme", + "_1" : "String" } } }, { - "abiName" : "bjs_makeAPIResultFailure", + "abiName" : "bjs_getTSTheme", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultFailure", + "name" : "getTSTheme", "parameters" : [ - { - "label" : "_", - "name" : "value", - "type" : { - "int" : { - } - } - } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "rawValueEnum" : { + "_0" : "TSTheme", + "_1" : "String" } } }, { - "abiName" : "bjs_makeAPIResultInfo", + "abiName" : "bjs_createConverter", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultInfo", + "name" : "createConverter", "parameters" : [ ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "swiftHeapObject" : { + "_0" : "Utils.Converter" } } }, { - "abiName" : "bjs_makeAPIResultFlag", + "abiName" : "bjs_useConverter", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultFlag", + "name" : "useConverter", "parameters" : [ { - "label" : "_", + "label" : "converter", + "name" : "converter", + "type" : { + "swiftHeapObject" : { + "_0" : "Utils.Converter" + } + } + }, + { + "label" : "value", "name" : "value", "type" : { - "bool" : { + "int" : { } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "string" : { + } } }, { - "abiName" : "bjs_makeAPIResultRate", + "abiName" : "bjs_roundTripConverterArray", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultRate", + "name" : "roundTripConverterArray", "parameters" : [ { "label" : "_", - "name" : "value", + "name" : "converters", "type" : { - "float" : { - + "array" : { + "_0" : { + "swiftHeapObject" : { + "_0" : "Utils.Converter" + } + } } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "array" : { + "_0" : { + "swiftHeapObject" : { + "_0" : "Utils.Converter" + } + } } } }, { - "abiName" : "bjs_makeAPIResultPrecise", + "abiName" : "bjs_createHTTPServer", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPIResultPrecise", + "name" : "createHTTPServer", "parameters" : [ - { - "label" : "_", - "name" : "value", - "type" : { - "double" : { - } - } - } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "APIResult" + "swiftHeapObject" : { + "_0" : "Networking.API.HTTPServer" } } }, { - "abiName" : "bjs_roundtripComplexResult", + "abiName" : "bjs_createUUID", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripComplexResult", + "name" : "createUUID", "parameters" : [ { - "label" : "_", - "name" : "result", + "label" : "value", + "name" : "value", "type" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "string" : { + } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "swiftHeapObject" : { + "_0" : "UUID" } } }, { - "abiName" : "bjs_makeComplexResultSuccess", + "abiName" : "bjs_roundTripUUID", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultSuccess", + "name" : "roundTripUUID", "parameters" : [ { "label" : "_", - "name" : "value", + "name" : "uuid", "type" : { - "string" : { - + "swiftHeapObject" : { + "_0" : "UUID" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "swiftHeapObject" : { + "_0" : "UUID" } } }, { - "abiName" : "bjs_makeComplexResultError", + "abiName" : "bjs_roundtripNetworkingAPIMethod", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultError", + "name" : "roundtripNetworkingAPIMethod", "parameters" : [ { "label" : "_", - "name" : "message", - "type" : { - "string" : { - - } - } - }, - { - "label" : "_", - "name" : "code", + "name" : "method", "type" : { - "int" : { - + "caseEnum" : { + "_0" : "Networking.API.Method" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "caseEnum" : { + "_0" : "Networking.API.Method" } } }, { - "abiName" : "bjs_makeComplexResultLocation", + "abiName" : "bjs_roundtripConfigurationLogLevel", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultLocation", + "name" : "roundtripConfigurationLogLevel", "parameters" : [ { "label" : "_", - "name" : "lat", - "type" : { - "double" : { - - } - } - }, - { - "label" : "_", - "name" : "lng", - "type" : { - "double" : { - - } - } - }, - { - "label" : "_", - "name" : "name", + "name" : "level", "type" : { - "string" : { - + "rawValueEnum" : { + "_0" : "Configuration.LogLevel", + "_1" : "String" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "rawValueEnum" : { + "_0" : "Configuration.LogLevel", + "_1" : "String" } } }, { - "abiName" : "bjs_makeComplexResultStatus", + "abiName" : "bjs_roundtripConfigurationPort", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultStatus", + "name" : "roundtripConfigurationPort", "parameters" : [ { "label" : "_", - "name" : "active", - "type" : { - "bool" : { - - } - } - }, - { - "label" : "_", - "name" : "code", - "type" : { - "int" : { - - } - } - }, - { - "label" : "_", - "name" : "message", + "name" : "port", "type" : { - "string" : { - + "rawValueEnum" : { + "_0" : "Configuration.Port", + "_1" : "Int" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "rawValueEnum" : { + "_0" : "Configuration.Port", + "_1" : "Int" } } }, { - "abiName" : "bjs_makeComplexResultCoordinates", + "abiName" : "bjs_processConfigurationLogLevel", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultCoordinates", + "name" : "processConfigurationLogLevel", "parameters" : [ { "label" : "_", - "name" : "x", - "type" : { - "double" : { - - } - } - }, - { - "label" : "_", - "name" : "y", - "type" : { - "double" : { - - } - } - }, - { - "label" : "_", - "name" : "z", + "name" : "level", "type" : { - "double" : { - + "rawValueEnum" : { + "_0" : "Configuration.LogLevel", + "_1" : "String" } } } ], "returnType" : { - "associatedValueEnum" : { - "_0" : "ComplexResult" + "rawValueEnum" : { + "_0" : "Configuration.Port", + "_1" : "Int" } } }, { - "abiName" : "bjs_makeComplexResultComprehensive", + "abiName" : "bjs_roundtripInternalSupportedMethod", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultComprehensive", + "name" : "roundtripInternalSupportedMethod", "parameters" : [ { "label" : "_", - "name" : "flag1", - "type" : { - "bool" : { - - } - } - }, - { - "label" : "_", - "name" : "flag2", - "type" : { - "bool" : { - - } - } - }, - { - "label" : "_", - "name" : "count1", - "type" : { - "int" : { - - } - } - }, - { - "label" : "_", - "name" : "count2", - "type" : { - "int" : { - - } - } - }, - { - "label" : "_", - "name" : "value1", - "type" : { - "double" : { - - } - } - }, - { - "label" : "_", - "name" : "value2", - "type" : { - "double" : { - + "name" : "method", + "type" : { + "caseEnum" : { + "_0" : "Internal.SupportedMethod" } } - }, + } + ], + "returnType" : { + "caseEnum" : { + "_0" : "Internal.SupportedMethod" + } + } + }, + { + "abiName" : "bjs_roundtripAPIResult", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "name" : "roundtripAPIResult", + "parameters" : [ { - "label" : "_", - "name" : "text1", + "label" : "result", + "name" : "result", "type" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "APIResult" } } - }, + } + ], + "returnType" : { + "associatedValueEnum" : { + "_0" : "APIResult" + } + } + }, + { + "abiName" : "bjs_makeAPIResultSuccess", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "name" : "makeAPIResultSuccess", + "parameters" : [ { "label" : "_", - "name" : "text2", + "name" : "value", "type" : { "string" : { } } - }, + } + ], + "returnType" : { + "associatedValueEnum" : { + "_0" : "APIResult" + } + } + }, + { + "abiName" : "bjs_makeAPIResultFailure", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "name" : "makeAPIResultFailure", + "parameters" : [ { "label" : "_", - "name" : "text3", + "name" : "value", "type" : { - "string" : { + "int" : { } } @@ -9561,41 +9922,41 @@ ], "returnType" : { "associatedValueEnum" : { - "_0" : "ComplexResult" + "_0" : "APIResult" } } }, { - "abiName" : "bjs_makeComplexResultInfo", + "abiName" : "bjs_makeAPIResultInfo", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeComplexResultInfo", + "name" : "makeAPIResultInfo", "parameters" : [ ], "returnType" : { "associatedValueEnum" : { - "_0" : "ComplexResult" + "_0" : "APIResult" } } }, { - "abiName" : "bjs_makeUtilitiesResultSuccess", + "abiName" : "bjs_makeAPIResultFlag", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeUtilitiesResultSuccess", + "name" : "makeAPIResultFlag", "parameters" : [ { "label" : "_", - "name" : "message", + "name" : "value", "type" : { - "string" : { + "bool" : { } } @@ -9603,33 +9964,24 @@ ], "returnType" : { "associatedValueEnum" : { - "_0" : "Utilities.Result" + "_0" : "APIResult" } } }, { - "abiName" : "bjs_makeUtilitiesResultFailure", + "abiName" : "bjs_makeAPIResultRate", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeUtilitiesResultFailure", + "name" : "makeAPIResultRate", "parameters" : [ { "label" : "_", - "name" : "error", - "type" : { - "string" : { - - } - } - }, - { - "label" : "_", - "name" : "code", + "name" : "value", "type" : { - "int" : { + "float" : { } } @@ -9637,65 +9989,72 @@ ], "returnType" : { "associatedValueEnum" : { - "_0" : "Utilities.Result" + "_0" : "APIResult" } } }, { - "abiName" : "bjs_makeUtilitiesResultStatus", + "abiName" : "bjs_makeAPIResultPrecise", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeUtilitiesResultStatus", + "name" : "makeAPIResultPrecise", "parameters" : [ { "label" : "_", - "name" : "active", - "type" : { - "bool" : { - - } - } - }, - { - "label" : "_", - "name" : "code", + "name" : "value", "type" : { - "int" : { + "double" : { } } - }, + } + ], + "returnType" : { + "associatedValueEnum" : { + "_0" : "APIResult" + } + } + }, + { + "abiName" : "bjs_roundtripComplexResult", + "effects" : { + "isAsync" : false, + "isStatic" : false, + "isThrows" : false + }, + "name" : "roundtripComplexResult", + "parameters" : [ { "label" : "_", - "name" : "message", + "name" : "result", "type" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "ComplexResult" } } } ], "returnType" : { "associatedValueEnum" : { - "_0" : "Utilities.Result" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_makeAPINetworkingResultSuccess", + "abiName" : "bjs_makeComplexResultSuccess", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPINetworkingResultSuccess", + "name" : "makeComplexResultSuccess", "parameters" : [ { "label" : "_", - "name" : "message", + "name" : "value", "type" : { "string" : { @@ -9705,22 +10064,22 @@ ], "returnType" : { "associatedValueEnum" : { - "_0" : "API.NetworkingResult" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_makeAPINetworkingResultFailure", + "abiName" : "bjs_makeComplexResultError", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "makeAPINetworkingResultFailure", + "name" : "makeComplexResultError", "parameters" : [ { "label" : "_", - "name" : "error", + "name" : "message", "type" : { "string" : { @@ -9739,122 +10098,169 @@ ], "returnType" : { "associatedValueEnum" : { - "_0" : "API.NetworkingResult" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_roundtripUtilitiesResult", + "abiName" : "bjs_makeComplexResultLocation", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundtripUtilitiesResult", + "name" : "makeComplexResultLocation", "parameters" : [ { "label" : "_", - "name" : "result", + "name" : "lat", "type" : { - "associatedValueEnum" : { - "_0" : "Utilities.Result" + "double" : { + } } - } - ], - "returnType" : { - "associatedValueEnum" : { - "_0" : "Utilities.Result" - } - } - }, - { - "abiName" : "bjs_roundtripAPINetworkingResult", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "roundtripAPINetworkingResult", - "parameters" : [ + }, { "label" : "_", - "name" : "result", + "name" : "lng", "type" : { - "associatedValueEnum" : { - "_0" : "API.NetworkingResult" + "double" : { + + } + } + }, + { + "label" : "_", + "name" : "name", + "type" : { + "string" : { + } } } ], "returnType" : { "associatedValueEnum" : { - "_0" : "API.NetworkingResult" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_roundTripAllTypesResult", + "abiName" : "bjs_makeComplexResultStatus", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripAllTypesResult", + "name" : "makeComplexResultStatus", "parameters" : [ { "label" : "_", - "name" : "result", + "name" : "active", "type" : { - "associatedValueEnum" : { - "_0" : "AllTypesResult" + "bool" : { + + } + } + }, + { + "label" : "_", + "name" : "code", + "type" : { + "int" : { + + } + } + }, + { + "label" : "_", + "name" : "message", + "type" : { + "string" : { + } } } ], "returnType" : { "associatedValueEnum" : { - "_0" : "AllTypesResult" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_roundTripTypedPayloadResult", + "abiName" : "bjs_makeComplexResultCoordinates", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "roundTripTypedPayloadResult", + "name" : "makeComplexResultCoordinates", "parameters" : [ { "label" : "_", - "name" : "result", + "name" : "x", + "type" : { + "double" : { + + } + } + }, + { + "label" : "_", + "name" : "y", + "type" : { + "double" : { + + } + } + }, + { + "label" : "_", + "name" : "z", "type" : { - "associatedValueEnum" : { - "_0" : "TypedPayloadResult" + "double" : { + } } } ], "returnType" : { "associatedValueEnum" : { - "_0" : "TypedPayloadResult" + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_createPropertyHolder", + "abiName" : "bjs_makeComplexResultComprehensive", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "createPropertyHolder", + "name" : "makeComplexResultComprehensive", "parameters" : [ { - "label" : "intValue", - "name" : "intValue", + "label" : "_", + "name" : "flag1", + "type" : { + "bool" : { + + } + } + }, + { + "label" : "_", + "name" : "flag2", + "type" : { + "bool" : { + + } + } + }, + { + "label" : "_", + "name" : "count1", "type" : { "int" : { @@ -9862,17 +10268,17 @@ } }, { - "label" : "floatValue", - "name" : "floatValue", + "label" : "_", + "name" : "count2", "type" : { - "float" : { + "int" : { } } }, { - "label" : "doubleValue", - "name" : "doubleValue", + "label" : "_", + "name" : "value1", "type" : { "double" : { @@ -9880,17 +10286,17 @@ } }, { - "label" : "boolValue", - "name" : "boolValue", + "label" : "_", + "name" : "value2", "type" : { - "bool" : { + "double" : { } } }, { - "label" : "stringValue", - "name" : "stringValue", + "label" : "_", + "name" : "text1", "type" : { "string" : { @@ -9898,96 +10304,58 @@ } }, { - "label" : "jsObject", - "name" : "jsObject", + "label" : "_", + "name" : "text2", "type" : { - "jsObject" : { + "string" : { } } - } - ], - "returnType" : { - "swiftHeapObject" : { - "_0" : "PropertyHolder" - } - } - }, - { - "abiName" : "bjs_testPropertyHolder", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "testPropertyHolder", - "parameters" : [ + }, { - "label" : "holder", - "name" : "holder", + "label" : "_", + "name" : "text3", "type" : { - "swiftHeapObject" : { - "_0" : "PropertyHolder" + "string" : { + } } } ], "returnType" : { - "string" : { - - } - } - }, - { - "abiName" : "bjs_resetObserverCounts", - "effects" : { - "isAsync" : false, - "isStatic" : false, - "isThrows" : false - }, - "name" : "resetObserverCounts", - "parameters" : [ - - ], - "returnType" : { - "void" : { - + "associatedValueEnum" : { + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_getObserverStats", + "abiName" : "bjs_makeComplexResultInfo", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "getObserverStats", + "name" : "makeComplexResultInfo", "parameters" : [ ], "returnType" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "ComplexResult" } } }, { - "abiName" : "bjs_testStringDefault", + "abiName" : "bjs_makeUtilitiesResultSuccess", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testStringDefault", + "name" : "makeUtilitiesResultSuccess", "parameters" : [ { - "defaultValue" : { - "string" : { - "_0" : "Hello World" - } - }, - "label" : "message", + "label" : "_", "name" : "message", "type" : { "string" : { @@ -9997,28 +10365,32 @@ } ], "returnType" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "Utilities.Result" } } }, { - "abiName" : "bjs_testIntDefault", + "abiName" : "bjs_makeUtilitiesResultFailure", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testIntDefault", + "name" : "makeUtilitiesResultFailure", "parameters" : [ { - "defaultValue" : { - "int" : { - "_0" : 42 + "label" : "_", + "name" : "error", + "type" : { + "string" : { + } - }, - "label" : "count", - "name" : "count", + } + }, + { + "label" : "_", + "name" : "code", "type" : { "int" : { @@ -10027,98 +10399,91 @@ } ], "returnType" : { - "int" : { - + "associatedValueEnum" : { + "_0" : "Utilities.Result" } } }, { - "abiName" : "bjs_testBoolDefault", + "abiName" : "bjs_makeUtilitiesResultStatus", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testBoolDefault", + "name" : "makeUtilitiesResultStatus", "parameters" : [ { - "defaultValue" : { + "label" : "_", + "name" : "active", + "type" : { "bool" : { - "_0" : true + } - }, - "label" : "flag", - "name" : "flag", + } + }, + { + "label" : "_", + "name" : "code", "type" : { - "bool" : { + "int" : { + + } + } + }, + { + "label" : "_", + "name" : "message", + "type" : { + "string" : { } } } ], "returnType" : { - "bool" : { - + "associatedValueEnum" : { + "_0" : "Utilities.Result" } } }, { - "abiName" : "bjs_testOptionalDefault", + "abiName" : "bjs_makeAPINetworkingResultSuccess", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testOptionalDefault", + "name" : "makeAPINetworkingResultSuccess", "parameters" : [ { - "defaultValue" : { - "null" : { - - } - }, - "label" : "name", - "name" : "name", + "label" : "_", + "name" : "message", "type" : { - "nullable" : { - "_0" : { - "string" : { + "string" : { - } - }, - "_1" : "null" } } } ], "returnType" : { - "nullable" : { - "_0" : { - "string" : { - - } - }, - "_1" : "null" + "associatedValueEnum" : { + "_0" : "API.NetworkingResult" } } }, { - "abiName" : "bjs_testMultipleDefaults", + "abiName" : "bjs_makeAPINetworkingResultFailure", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testMultipleDefaults", + "name" : "makeAPINetworkingResultFailure", "parameters" : [ { - "defaultValue" : { - "string" : { - "_0" : "Default Title" - } - }, - "label" : "title", - "name" : "title", + "label" : "_", + "name" : "error", "type" : { "string" : { @@ -10126,357 +10491,243 @@ } }, { - "defaultValue" : { - "int" : { - "_0" : -10 - } - }, - "label" : "count", - "name" : "count", + "label" : "_", + "name" : "code", "type" : { "int" : { - } - } - }, - { - "defaultValue" : { - "bool" : { - "_0" : false - } - }, - "label" : "enabled", - "name" : "enabled", - "type" : { - "bool" : { - } } } ], "returnType" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "API.NetworkingResult" } } }, { - "abiName" : "bjs_testSimpleEnumDefault", + "abiName" : "bjs_roundtripUtilitiesResult", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testSimpleEnumDefault", + "name" : "roundtripUtilitiesResult", "parameters" : [ { - "defaultValue" : { - "enumCase" : { - "_0" : "Status", - "_1" : "success" - } - }, - "label" : "status", - "name" : "status", + "label" : "_", + "name" : "result", "type" : { - "caseEnum" : { - "_0" : "Status" + "associatedValueEnum" : { + "_0" : "Utilities.Result" } } } ], "returnType" : { - "caseEnum" : { - "_0" : "Status" + "associatedValueEnum" : { + "_0" : "Utilities.Result" } } }, { - "abiName" : "bjs_testDirectionDefault", + "abiName" : "bjs_roundtripAPINetworkingResult", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testDirectionDefault", + "name" : "roundtripAPINetworkingResult", "parameters" : [ { - "defaultValue" : { - "enumCase" : { - "_0" : "Direction", - "_1" : "north" - } - }, - "label" : "direction", - "name" : "direction", + "label" : "_", + "name" : "result", "type" : { - "caseEnum" : { - "_0" : "Direction" + "associatedValueEnum" : { + "_0" : "API.NetworkingResult" } } } ], "returnType" : { - "caseEnum" : { - "_0" : "Direction" + "associatedValueEnum" : { + "_0" : "API.NetworkingResult" } } }, { - "abiName" : "bjs_testRawStringEnumDefault", + "abiName" : "bjs_roundTripAllTypesResult", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testRawStringEnumDefault", + "name" : "roundTripAllTypesResult", "parameters" : [ { - "defaultValue" : { - "enumCase" : { - "_0" : "Theme", - "_1" : "light" - } - }, - "label" : "theme", - "name" : "theme", + "label" : "_", + "name" : "result", "type" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "associatedValueEnum" : { + "_0" : "AllTypesResult" } } } ], "returnType" : { - "rawValueEnum" : { - "_0" : "Theme", - "_1" : "String" + "associatedValueEnum" : { + "_0" : "AllTypesResult" } } }, { - "abiName" : "bjs_testComplexInit", + "abiName" : "bjs_roundTripTypedPayloadResult", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testComplexInit", + "name" : "roundTripTypedPayloadResult", "parameters" : [ { - "defaultValue" : { - "objectWithArguments" : { - "_0" : "Greeter", - "_1" : [ - { - "string" : { - "_0" : "DefaultGreeter" - } - } - ] - } - }, - "label" : "greeter", - "name" : "greeter", + "label" : "_", + "name" : "result", "type" : { - "swiftHeapObject" : { - "_0" : "Greeter" + "associatedValueEnum" : { + "_0" : "TypedPayloadResult" } } } ], "returnType" : { - "string" : { - + "associatedValueEnum" : { + "_0" : "TypedPayloadResult" } } }, { - "abiName" : "bjs_testEmptyInit", + "abiName" : "bjs_createPropertyHolder", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "testEmptyInit", + "name" : "createPropertyHolder", "parameters" : [ { - "defaultValue" : { - "object" : { - "_0" : "StaticPropertyHolder" + "label" : "intValue", + "name" : "intValue", + "type" : { + "int" : { + } - }, - "label" : "_", - "name" : "object", + } + }, + { + "label" : "floatValue", + "name" : "floatValue", "type" : { - "swiftHeapObject" : { - "_0" : "StaticPropertyHolder" + "float" : { + + } + } + }, + { + "label" : "doubleValue", + "name" : "doubleValue", + "type" : { + "double" : { + + } + } + }, + { + "label" : "boolValue", + "name" : "boolValue", + "type" : { + "bool" : { + + } + } + }, + { + "label" : "stringValue", + "name" : "stringValue", + "type" : { + "string" : { + + } + } + }, + { + "label" : "jsObject", + "name" : "jsObject", + "type" : { + "jsObject" : { + } } } ], "returnType" : { "swiftHeapObject" : { - "_0" : "StaticPropertyHolder" + "_0" : "PropertyHolder" } } }, { - "abiName" : "bjs_arrayWithDefault", + "abiName" : "bjs_testPropertyHolder", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "arrayWithDefault", + "name" : "testPropertyHolder", "parameters" : [ { - "defaultValue" : { - "array" : { - "_0" : [ - { - "int" : { - "_0" : 1 - } - }, - { - "int" : { - "_0" : 2 - } - }, - { - "int" : { - "_0" : 3 - } - } - ] - } - }, - "label" : "_", - "name" : "values", + "label" : "holder", + "name" : "holder", "type" : { - "array" : { - "_0" : { - "int" : { - - } - } + "swiftHeapObject" : { + "_0" : "PropertyHolder" } } } ], "returnType" : { - "int" : { + "string" : { } } }, { - "abiName" : "bjs_arrayWithOptionalDefault", + "abiName" : "bjs_resetObserverCounts", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "arrayWithOptionalDefault", + "name" : "resetObserverCounts", "parameters" : [ - { - "defaultValue" : { - "null" : { - - } - }, - "label" : "_", - "name" : "values", - "type" : { - "nullable" : { - "_0" : { - "array" : { - "_0" : { - "int" : { - } - } - } - }, - "_1" : "null" - } - } - } ], "returnType" : { - "int" : { + "void" : { } } }, { - "abiName" : "bjs_arrayMixedDefaults", + "abiName" : "bjs_getObserverStats", "effects" : { "isAsync" : false, "isStatic" : false, "isThrows" : false }, - "name" : "arrayMixedDefaults", + "name" : "getObserverStats", "parameters" : [ - { - "defaultValue" : { - "string" : { - "_0" : "Sum" - } - }, - "label" : "prefix", - "name" : "prefix", - "type" : { - "string" : { - - } - } - }, - { - "defaultValue" : { - "array" : { - "_0" : [ - { - "int" : { - "_0" : 10 - } - }, - { - "int" : { - "_0" : 20 - } - } - ] - } - }, - "label" : "values", - "name" : "values", - "type" : { - "array" : { - "_0" : { - "int" : { - - } - } - } - } - }, - { - "defaultValue" : { - "string" : { - "_0" : "!" - } - }, - "label" : "suffix", - "name" : "suffix", - "type" : { - "string" : { - } - } - } ], "returnType" : { "string" : { @@ -15354,6 +15605,38 @@ } ] }, + { + "functions" : [ + + ], + "types" : [ + { + "getters" : [ + + ], + "methods" : [ + + ], + "name" : "DefaultArgumentImports", + "setters" : [ + + ], + "staticMethods" : [ + { + "name" : "runJsDefaultArgumentTests", + "parameters" : [ + + ], + "returnType" : { + "void" : { + + } + } + } + ] + } + ] + }, { "functions" : [ { diff --git a/Tests/BridgeJSRuntimeTests/JavaScript/DefaultArgumentTests.mjs b/Tests/BridgeJSRuntimeTests/JavaScript/DefaultArgumentTests.mjs new file mode 100644 index 00000000..2a4f3773 --- /dev/null +++ b/Tests/BridgeJSRuntimeTests/JavaScript/DefaultArgumentTests.mjs @@ -0,0 +1,97 @@ +// @ts-check + +import assert from 'node:assert'; + +/** + * @returns {import('../../../.build/plugins/PackageToJS/outputs/PackageTests/bridge-js.d.ts').Imports["DefaultArgumentImports"]} + */ +export function getImports(importsContext) { + return { + runJsDefaultArgumentTests: () => { + const exports = importsContext.getExports(); + if (!exports) { throw new Error("No exports!?"); } + runJsDefaultArgumentTests(exports); + }, + }; +} + +/** + * Default argument bridging coverage for BridgeJS runtime tests. + * @param {import('../../../.build/plugins/PackageToJS/outputs/PackageTests/bridge-js.d.ts').Exports} rootExports + */ +export function runJsDefaultArgumentTests(rootExports) { + const exports = rootExports.DefaultArgumentExports; + const { Status, Direction, Theme } = rootExports; + + assert.equal(exports.testStringDefault(), "Hello World"); + assert.equal(exports.testStringDefault("Custom Message"), "Custom Message"); + + assert.equal(exports.testIntDefault(), 42); + assert.equal(exports.testIntDefault(100), 100); + + assert.equal(exports.testBoolDefault(), true); + assert.equal(exports.testBoolDefault(false), false); + + assert.equal(exports.testOptionalDefault(), null); + assert.equal(exports.testOptionalDefault("Test"), "Test"); + + assert.equal(exports.testMultipleDefaults(), "Default Title: -10 (false)"); + assert.equal(exports.testMultipleDefaults("Custom"), "Custom: -10 (false)"); + assert.equal(exports.testMultipleDefaults("Custom", 5), "Custom: 5 (false)"); + assert.equal(exports.testMultipleDefaults("Custom", undefined, true), "Custom: -10 (true)"); + assert.equal(exports.testMultipleDefaults("Custom", 5, true), "Custom: 5 (true)"); + + assert.equal(exports.testSimpleEnumDefault(), Status.Success); + assert.equal(exports.testSimpleEnumDefault(Status.Loading), Status.Loading); + + assert.equal(exports.testDirectionDefault(), Direction.North); + assert.equal(exports.testDirectionDefault(Direction.South), Direction.South); + + assert.equal(exports.testRawStringEnumDefault(), Theme.Light); + assert.equal(exports.testRawStringEnumDefault(Theme.Dark), Theme.Dark); + + const holder = exports.testEmptyInit(); + assert.notEqual(holder, null); + holder.release(); + + const customHolder = new rootExports.StaticPropertyHolder(); + assert.deepEqual(exports.testEmptyInit(customHolder), customHolder); + customHolder.release(); + + assert.equal(exports.testComplexInit(), "Hello, DefaultGreeter!"); + const customGreeter = new rootExports.Greeter("CustomName"); + assert.equal(exports.testComplexInit(customGreeter), "Hello, CustomName!"); + customGreeter.release(); + + const cd1 = exports.createConstructorDefaults(); + assert.equal(exports.describeConstructorDefaults(cd1), "Default:42:true:success:nil"); + cd1.release(); + + const cd2 = exports.createConstructorDefaults("Custom"); + assert.equal(exports.describeConstructorDefaults(cd2), "Custom:42:true:success:nil"); + cd2.release(); + + const cd3 = exports.createConstructorDefaults("Custom", 100); + assert.equal(exports.describeConstructorDefaults(cd3), "Custom:100:true:success:nil"); + cd3.release(); + + const cd4 = exports.createConstructorDefaults("Custom", undefined, false); + assert.equal(exports.describeConstructorDefaults(cd4), "Custom:42:false:success:nil"); + cd4.release(); + + const cd5 = exports.createConstructorDefaults("Test", 99, false, Status.Loading); + assert.equal(exports.describeConstructorDefaults(cd5), "Test:99:false:loading:nil"); + cd5.release(); + + assert.equal(exports.arrayWithDefault(), 6); + assert.equal(exports.arrayWithDefault([10, 20]), 30); + assert.equal(exports.arrayWithOptionalDefault(), -1); + assert.equal(exports.arrayWithOptionalDefault(null), -1); + assert.equal(exports.arrayWithOptionalDefault([5, 5]), 10); + assert.equal(exports.arrayMixedDefaults(), "Sum: 30!"); + assert.equal(exports.arrayMixedDefaults("Total"), "Total: 30!"); + assert.equal(exports.arrayMixedDefaults("Total", [1, 2, 3]), "Total: 6!"); + assert.equal(exports.arrayMixedDefaults("Val", [100], "?"), "Val: 100?"); + assert.equal(exports.arrayMixedDefaults(undefined, [5, 5]), "Sum: 10!"); + assert.equal(exports.arrayMixedDefaults(undefined, undefined, "?"), "Sum: 30?"); +} diff --git a/Tests/prelude.mjs b/Tests/prelude.mjs index 953c9b93..350386e4 100644 --- a/Tests/prelude.mjs +++ b/Tests/prelude.mjs @@ -9,6 +9,7 @@ import { getImports as getClosureSupportImports } from './BridgeJSRuntimeTests/J import { getImports as getSwiftClassSupportImports } from './BridgeJSRuntimeTests/JavaScript/SwiftClassSupportTests.mjs'; import { getImports as getOptionalSupportImports } from './BridgeJSRuntimeTests/JavaScript/OptionalSupportTests.mjs'; import { getImports as getArraySupportImports, ArrayElementObject } from './BridgeJSRuntimeTests/JavaScript/ArraySupportTests.mjs'; +import { getImports as getDefaultArgumentImports } from './BridgeJSRuntimeTests/JavaScript/DefaultArgumentTests.mjs'; import { getImports as getJSClassSupportImports, JSClassWithArrayMembers } from './BridgeJSRuntimeTests/JavaScript/JSClassSupportTests.mjs'; /** @type {import('../.build/plugins/PackageToJS/outputs/PackageTests/test.d.ts').SetupOptionsFn} */ @@ -163,6 +164,7 @@ export async function setupOptions(options, context) { SwiftClassSupportImports: getSwiftClassSupportImports(importsContext), OptionalSupportImports: getOptionalSupportImports(importsContext), ArraySupportImports: getArraySupportImports(importsContext), + DefaultArgumentImports: getDefaultArgumentImports(importsContext), JSClassSupportImports: getJSClassSupportImports(importsContext), }; }, @@ -786,68 +788,6 @@ function BridgeJSRuntimeTests_runJsWorks(instance, exports) { assert.equal(exports.Services.Graph.GraphOperations.nodeCount(42), 42); assert.equal(exports.Services.Graph.GraphOperations.nodeCount(0), 0); - // Test default parameters - assert.equal(exports.testStringDefault(), "Hello World"); - assert.equal(exports.testStringDefault("Custom Message"), "Custom Message"); - - assert.equal(exports.testIntDefault(), 42); - assert.equal(exports.testIntDefault(100), 100); - - assert.equal(exports.testBoolDefault(), true); - assert.equal(exports.testBoolDefault(false), false); - - assert.equal(exports.testOptionalDefault(), null); - assert.equal(exports.testOptionalDefault("Test"), "Test"); - - assert.equal(exports.testMultipleDefaults(), "Default Title: -10 (false)"); - assert.equal(exports.testMultipleDefaults("Custom"), "Custom: -10 (false)"); - assert.equal(exports.testMultipleDefaults("Custom", 5), "Custom: 5 (false)"); - assert.equal(exports.testMultipleDefaults("Custom", undefined, true), "Custom: -10 (true)"); - assert.equal(exports.testMultipleDefaults("Custom", 5, true), "Custom: 5 (true)"); - - assert.equal(exports.testSimpleEnumDefault(), exports.Status.Success); - assert.equal(exports.testSimpleEnumDefault(exports.Status.Loading), exports.Status.Loading); - - assert.equal(exports.testDirectionDefault(), exports.Direction.North); - assert.equal(exports.testDirectionDefault(exports.Direction.South), exports.Direction.South); - - assert.equal(exports.testRawStringEnumDefault(), exports.Theme.Light); - assert.equal(exports.testRawStringEnumDefault(exports.Theme.Dark), exports.Theme.Dark); - - const holder = exports.testEmptyInit() - assert.notEqual(holder, null); - holder.release(); - - const customHolder = new exports.StaticPropertyHolder(); - assert.deepEqual(exports.testEmptyInit(customHolder), customHolder); - customHolder.release(); - - assert.equal(exports.testComplexInit(), "Hello, DefaultGreeter!"); - const customGreeter = new exports.Greeter("CustomName"); - assert.equal(exports.testComplexInit(customGreeter), "Hello, CustomName!"); - - customGreeter.release(); - - const cd1 = new exports.ConstructorDefaults(); - assert.equal(cd1.describe(), "Default:42:true:success:nil"); - cd1.release(); - - const cd2 = new exports.ConstructorDefaults("Custom"); - assert.equal(cd2.describe(), "Custom:42:true:success:nil"); - cd2.release(); - - const cd3 = new exports.ConstructorDefaults("Custom", 100); - assert.equal(cd3.describe(), "Custom:100:true:success:nil"); - cd3.release(); - - const cd4 = new exports.ConstructorDefaults("Custom", undefined, false); - assert.equal(cd4.describe(), "Custom:42:false:success:nil"); - cd4.release(); - - const cd5 = new exports.ConstructorDefaults("Test", 99, false, exports.Status.Loading); - assert.equal(cd5.describe(), "Test:99:false:loading:nil"); - cd5.release(); - testProtocolSupport(exports); testArraySupport(exports); } @@ -1224,18 +1164,21 @@ function testArraySupport(exports) { assert.equal(exports.roundTripOptionalGreeterArrayType(null), null); og1.release(); optGreeterResult.forEach(g => g.release()); - // Default values - assert.equal(exports.arrayWithDefault(), 6); - assert.equal(exports.arrayWithDefault([10, 20]), 30); - assert.equal(exports.arrayWithOptionalDefault(), -1); - assert.equal(exports.arrayWithOptionalDefault(null), -1); - assert.equal(exports.arrayWithOptionalDefault([5, 5]), 10); - assert.equal(exports.arrayMixedDefaults(), "Sum: 30!"); - assert.equal(exports.arrayMixedDefaults("Total"), "Total: 30!"); - assert.equal(exports.arrayMixedDefaults("Total", [1, 2, 3]), "Total: 6!"); - assert.equal(exports.arrayMixedDefaults("Val", [100], "?"), "Val: 100?"); - assert.equal(exports.arrayMixedDefaults(undefined, [5, 5]), "Sum: 10!"); - assert.equal(exports.arrayMixedDefaults(undefined, undefined, "?"), "Sum: 30?"); + const helper1 = new exports.Greeter("Helper1"); + const jsProcessor1 = { + count: 1, name: "Processor1", optionalTag: null, optionalCount: null, + direction: null, optionalTheme: null, httpStatus: null, apiResult: null, + helper: helper1, optionalHelper: null, + increment(by) { this.count += by; }, + getValue() { return this.count; }, + setLabelElements(a, b) { }, getLabel() { return ""; }, + isEven() { return this.count % 2 === 0; }, + processGreeter(g) { return ""; }, createGreeter() { return new exports.Greeter("P1"); }, + processOptionalGreeter(g) { return ""; }, createOptionalGreeter() { return null; }, + handleAPIResult(r) { }, getAPIResult() { return null; } + }; + + helper1.release(); } /** @param {import('./../.build/plugins/PackageToJS/outputs/PackageTests/bridge-js.d.ts').Exports} exports */