|
6 | 6 |
|
7 | 7 | @_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit |
8 | 8 |
|
9 | | -@JSFunction func jsRoundTripVoid() throws (JSException) -> Void |
| 9 | +@JSFunction func jsRoundTripVoid() throws(JSException) -> Void |
10 | 10 |
|
11 | | -@JSFunction func jsRoundTripNumber(_ v: Double) throws (JSException) -> Double |
| 11 | +@JSFunction func jsRoundTripNumber(_ v: Double) throws(JSException) -> Double |
12 | 12 |
|
13 | | -@JSFunction func jsRoundTripBool(_ v: Bool) throws (JSException) -> Bool |
| 13 | +@JSFunction func jsRoundTripBool(_ v: Bool) throws(JSException) -> Bool |
14 | 14 |
|
15 | | -@JSFunction func jsRoundTripString(_ v: String) throws (JSException) -> String |
| 15 | +@JSFunction func jsRoundTripString(_ v: String) throws(JSException) -> String |
16 | 16 |
|
17 | | -@JSFunction func jsThrowOrVoid(_ shouldThrow: Bool) throws (JSException) -> Void |
| 17 | +@JSFunction func jsThrowOrVoid(_ shouldThrow: Bool) throws(JSException) -> Void |
18 | 18 |
|
19 | | -@JSFunction func jsThrowOrNumber(_ shouldThrow: Bool) throws (JSException) -> Double |
| 19 | +@JSFunction func jsThrowOrNumber(_ shouldThrow: Bool) throws(JSException) -> Double |
20 | 20 |
|
21 | | -@JSFunction func jsThrowOrBool(_ shouldThrow: Bool) throws (JSException) -> Bool |
| 21 | +@JSFunction func jsThrowOrBool(_ shouldThrow: Bool) throws(JSException) -> Bool |
22 | 22 |
|
23 | | -@JSFunction func jsThrowOrString(_ shouldThrow: Bool) throws (JSException) -> String |
| 23 | +@JSFunction func jsThrowOrString(_ shouldThrow: Bool) throws(JSException) -> String |
24 | 24 |
|
25 | 25 | enum FeatureFlag: String { |
26 | 26 | case foo = "foo" |
27 | 27 | case bar = "bar" |
28 | 28 | } |
29 | 29 | extension FeatureFlag: _BridgedSwiftEnumNoPayload, _BridgedSwiftRawValueEnum {} |
30 | 30 |
|
31 | | -@JSFunction func jsRoundTripFeatureFlag(_ flag: FeatureFlag) throws (JSException) -> FeatureFlag |
| 31 | +@JSFunction func jsRoundTripFeatureFlag(_ flag: FeatureFlag) throws(JSException) -> FeatureFlag |
32 | 32 |
|
33 | 33 | @JSClass struct JsGreeter { |
34 | 34 | @JSGetter var name: String |
35 | | - @JSSetter func setName(_ value: String) throws (JSException) |
| 35 | + @JSSetter func setName(_ value: String) throws(JSException) |
36 | 36 | @JSGetter var `prefix`: String |
37 | | - @JSFunction init(_ name: String, _ `prefix`: String) throws (JSException) |
38 | | - @JSFunction func greet() throws (JSException) -> String |
39 | | - @JSFunction func changeName(_ name: String) throws (JSException) -> Void |
| 37 | + @JSFunction init(_ name: String, _ `prefix`: String) throws(JSException) |
| 38 | + @JSFunction func greet() throws(JSException) -> String |
| 39 | + @JSFunction func changeName(_ name: String) throws(JSException) -> Void |
40 | 40 | } |
41 | 41 |
|
42 | | -@JSFunction func runAsyncWorks() throws (JSException) -> JSPromise |
| 42 | +@JSFunction func runAsyncWorks() throws(JSException) -> JSPromise |
43 | 43 |
|
44 | | -@JSFunction(jsName: "$jsWeirdFunction") func _jsWeirdFunction() throws (JSException) -> Double |
| 44 | +@JSFunction(jsName: "$jsWeirdFunction") func _jsWeirdFunction() throws(JSException) -> Double |
45 | 45 |
|
46 | 46 | @JSClass(jsName: "$WeirdClass") struct _WeirdClass { |
47 | | - @JSFunction init() throws (JSException) |
48 | | - @JSFunction(jsName: "method-with-dashes") func method_with_dashes() throws (JSException) -> String |
| 47 | + @JSFunction init() throws(JSException) |
| 48 | + @JSFunction(jsName: "method-with-dashes") func method_with_dashes() throws(JSException) -> String |
49 | 49 | } |
50 | 50 |
|
51 | 51 | @JSClass struct StaticBox { |
52 | | - @JSFunction init(_ value: Double) throws (JSException) |
53 | | - @JSFunction func value() throws (JSException) -> Double |
54 | | - @JSFunction static func create(_ value: Double) throws (JSException) -> StaticBox |
55 | | - @JSFunction static func value() throws (JSException) -> Double |
56 | | - @JSFunction static func makeDefault() throws (JSException) -> StaticBox |
57 | | - @JSFunction(jsName: "with-dashes") static func with_dashes() throws (JSException) -> StaticBox |
| 52 | + @JSFunction init(_ value: Double) throws(JSException) |
| 53 | + @JSFunction func value() throws(JSException) -> Double |
| 54 | + @JSFunction static func create(_ value: Double) throws(JSException) -> StaticBox |
| 55 | + @JSFunction static func value() throws(JSException) -> Double |
| 56 | + @JSFunction static func makeDefault() throws(JSException) -> StaticBox |
| 57 | + @JSFunction(jsName: "with-dashes") static func with_dashes() throws(JSException) -> StaticBox |
58 | 58 | } |
59 | 59 |
|
60 | | -@JSFunction(from: .global) func parseInt(_ string: String) throws (JSException) -> Double |
| 60 | +@JSFunction(from: .global) func parseInt(_ string: String) throws(JSException) -> Double |
61 | 61 |
|
62 | 62 | @JSClass(from: .global) struct Animal { |
63 | 63 | @JSGetter var name: String |
64 | | - @JSSetter func setName(_ value: String) throws (JSException) |
| 64 | + @JSSetter func setName(_ value: String) throws(JSException) |
65 | 65 | @JSGetter var age: Double |
66 | | - @JSSetter func setAge(_ value: Double) throws (JSException) |
| 66 | + @JSSetter func setAge(_ value: Double) throws(JSException) |
67 | 67 | @JSGetter var isCat: Bool |
68 | | - @JSSetter func setIsCat(_ value: Bool) throws (JSException) |
69 | | - @JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws (JSException) |
70 | | - @JSFunction func bark() throws (JSException) -> String |
71 | | - @JSFunction func getIsCat() throws (JSException) -> Bool |
| 68 | + @JSSetter func setIsCat(_ value: Bool) throws(JSException) |
| 69 | + @JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws(JSException) |
| 70 | + @JSFunction func bark() throws(JSException) -> String |
| 71 | + @JSFunction func getIsCat() throws(JSException) -> Bool |
72 | 72 | } |
73 | 73 |
|
74 | 74 | @JSGetter(from: .global) var globalObject1: JSObject |
0 commit comments