@@ -14,36 +14,33 @@ import JavaScriptKit
1414 @JS init ( transform: @escaping ( String ) -> String ) {
1515 self . transform = transform
1616 }
17+ }
1718
18- @JS func getTransform( ) -> ( String ) -> String
19-
20- @JS func processWithCustom( _ text: String , customTransform: ( String ) -> String ) -> String
21-
22- @JS func printTogether(
23- person: Person ,
24- name: String ,
25- ratio: Double ,
26- customTransform: ( Person ? , String ? , Double ? ) -> String
27- ) -> String
19+ @JS func roundtripString( _ stringClosure: ( String ) -> String ) -> ( String ) -> String
20+ @JS func roundtripInt( _ intClosure: ( Int ) -> Int ) -> ( Int ) -> Int
21+ @JS func roundtripBool( _ boolClosure: ( Bool ) -> Bool ) -> ( Bool ) -> Bool
22+ @JS func roundtripFloat( _ floatClosure: ( Float ) -> Float ) -> ( Float ) -> Float
23+ @JS func roundtripDouble( _ doubleClosure: ( Double ) -> Double ) -> ( Double ) -> Double
2824
29- @JS func roundtrip( _ personClosure: ( Person ) -> String ) -> ( Person ) -> String
30- @JS func roundtripOptional( _ personClosure: ( Person ? ) -> String ) -> ( Person ? ) -> String
25+ @JS func roundtripOptionalString( _ stringClosure: ( String ? ) -> String ? ) -> ( String ? ) -> String ?
26+ @JS func roundtripOptionalInt( _ intClosure: ( Int ? ) -> Int ? ) -> ( Int ? ) -> Int ?
27+ @JS func roundtripOptionalBool( _ boolClosure: ( Bool ? ) -> Bool ? ) -> ( Bool ? ) -> Bool ?
28+ @JS func roundtripOptionalFloat( _ floatClosure: ( Float ? ) -> Float ? ) -> ( Float ? ) -> Float ?
29+ @JS func roundtripOptionalDouble( _ doubleClosure: ( Double ? ) -> Double ? ) -> ( Double ? ) -> Double ?
3130
32- @JS func processDirection( _ callback: ( Direction ) -> String ) -> String
33- @JS func processTheme( _ callback: ( Theme ) -> String ) -> String
34- @JS func processHttpStatus( _ callback: ( HttpStatus ) -> Int ) -> Int
35- @JS func processAPIResult( _ callback: ( APIResult ) -> String ) -> String
31+ @JS func roundtripPerson( _ personClosure: ( Person ) -> Person ) -> ( Person ) -> Person
32+ @JS func roundtripOptionalPerson( _ personClosure: ( Person ? ) -> Person ? ) -> ( Person ? ) -> Person ?
3633
37- @JS func makeDirectionChecker ( ) -> ( Direction ) -> Bool
38- @JS func makeThemeValidator ( ) -> ( Theme ) -> Bool
39- @JS func makeStatusCodeExtractor ( ) -> ( HttpStatus ) -> Int
40- @JS func makeAPIResultHandler ( ) -> ( APIResult ) -> String
34+ @JS func roundtripDirection ( _ callback : ( Direction ) -> Direction ) -> ( Direction ) -> Direction
35+ @JS func roundtripTheme ( _ callback : ( Theme ) -> Theme ) -> ( Theme ) -> Theme
36+ @JS func roundtripHttpStatus ( _ callback : ( HttpStatus ) -> HttpStatus ) -> ( HttpStatus ) -> HttpStatus
37+ @JS func roundtripAPIResult ( _ callback : ( APIResult ) -> APIResult ) -> ( APIResult ) -> APIResult
4138
42- @JS func processOptionalDirection ( _ callback: ( Direction ? ) -> String ) -> String
43- @JS func processOptionalTheme ( _ callback: ( Theme ? ) -> String ) -> String
44- @JS func processOptionalAPIResult ( _ callback: ( APIResult ? ) -> String ) -> String
45- @JS func makeOptionalDirectionFormatter ( ) -> ( Direction ? ) -> String
46- }
39+ @JS func roundtripOptionalDirection ( _ callback: ( Direction ? ) -> Direction ? ) -> ( Direction ? ) -> Direction ?
40+ @JS func roundtripOptionalTheme ( _ callback: ( Theme ? ) -> Theme ? ) -> ( Theme ? ) -> Theme ?
41+ @JS func roundtripOptionalHttpStatus ( _ callback: ( HttpStatus ? ) -> HttpStatus ? ) -> ( HttpStatus ? ) -> HttpStatus ?
42+ @JS func roundtripOptionalAPIResult ( _ callback : ( APIResult ? ) -> APIResult ? ) -> ( APIResult ? ) -> APIResult ?
43+ @ JS func roundtripOptionalDirectionFormatter ( _ callback : ( Direction ? ) -> Direction ? ) -> ( Direction ? ) -> Direction ?
4744
4845@JS enum Direction {
4946 case north
0 commit comments