|
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 | | -@JSFunction(from: .global) func parseInt(_ string: String) throws (JSException) -> Double |
| 51 | +@JSFunction(from: .global) func parseInt(_ string: String) throws(JSException) -> Double |
52 | 52 |
|
53 | 53 | @JSClass(from: .global) struct Animal { |
54 | 54 | @JSGetter var name: String |
55 | | - @JSSetter func setName(_ value: String) throws (JSException) |
| 55 | + @JSSetter func setName(_ value: String) throws(JSException) |
56 | 56 | @JSGetter var age: Double |
57 | | - @JSSetter func setAge(_ value: Double) throws (JSException) |
| 57 | + @JSSetter func setAge(_ value: Double) throws(JSException) |
58 | 58 | @JSGetter var isCat: Bool |
59 | | - @JSSetter func setIsCat(_ value: Bool) throws (JSException) |
60 | | - @JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws (JSException) |
61 | | - @JSFunction func bark() throws (JSException) -> String |
62 | | - @JSFunction func getIsCat() throws (JSException) -> Bool |
| 59 | + @JSSetter func setIsCat(_ value: Bool) throws(JSException) |
| 60 | + @JSFunction init(_ name: String, _ age: Double, _ isCat: Bool) throws(JSException) |
| 61 | + @JSFunction func bark() throws(JSException) -> String |
| 62 | + @JSFunction func getIsCat() throws(JSException) -> Bool |
63 | 63 | } |
64 | 64 |
|
65 | 65 | @JSGetter(from: .global) var globalObject1: JSObject |
0 commit comments