-
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathts2swift.test.js.snap
More file actions
313 lines (241 loc) · 10.9 KB
/
ts2swift.test.js.snap
File metadata and controls
313 lines (241 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`ts2swift > snapshots Swift output for ArrayParameter.d.ts > ArrayParameter 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func checkArray(_ a: JSObject) throws(JSException) -> Void
@JSFunction func checkArrayWithLength(_ a: JSObject, _ b: Double) throws(JSException) -> Void
@JSFunction func checkArray(_ a: JSObject) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for Async.d.ts > Async 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func asyncReturnVoid() throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripInt(_ v: Double) throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripString(_ v: String) throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripBool(_ v: Bool) throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripFloat(_ v: Double) throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripDouble(_ v: Double) throws(JSException) -> JSPromise
@JSFunction func asyncRoundTripJSObject(_ v: JSObject) throws(JSException) -> JSPromise
"
`;
exports[`ts2swift > snapshots Swift output for Interface.d.ts > Interface 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func returnAnimatable() throws(JSException) -> Animatable
@JSClass struct Animatable {
@JSFunction func animate(_ keyframes: JSObject, _ options: JSObject) throws(JSException) -> JSObject
@JSFunction func getAnimations(_ options: JSObject) throws(JSException) -> JSObject
}
"
`;
exports[`ts2swift > snapshots Swift output for InvalidPropertyNames.d.ts > InvalidPropertyNames 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func createArrayBuffer() throws(JSException) -> ArrayBufferLike
@JSClass struct ArrayBufferLike {
@JSGetter var byteLength: Double
@JSFunction func slice(_ begin: Double, _ end: Double) throws(JSException) -> ArrayBufferLike
}
@JSFunction func createWeirdObject() throws(JSException) -> WeirdNaming
@JSClass struct WeirdNaming {
@JSGetter var normalProperty: String
@JSSetter func setNormalProperty(_ value: String) throws(JSException)
@JSGetter(jsName: "property-with-dashes") var property_with_dashes: Double
@JSSetter(jsName: "property-with-dashes") func setProperty_with_dashes(_ value: Double) throws(JSException)
@JSGetter(jsName: "123invalidStart") var _123invalidStart: Bool
@JSSetter(jsName: "123invalidStart") func set_123invalidStart(_ value: Bool) throws(JSException)
@JSGetter(jsName: "property with spaces") var property_with_spaces: String
@JSSetter(jsName: "property with spaces") func setProperty_with_spaces(_ value: String) throws(JSException)
@JSGetter(jsName: "@specialChar") var _specialChar: Double
@JSSetter(jsName: "@specialChar") func set_specialChar(_ value: Double) throws(JSException)
@JSGetter var constructor: String
@JSSetter func setConstructor(_ value: String) throws(JSException)
@JSGetter var \`for\`: String
@JSSetter func setFor(_ value: String) throws(JSException)
@JSGetter var \`Any\`: String
@JSSetter(jsName: "Any") func setAny(_ value: String) throws(JSException)
@JSFunction func \`as\`() throws(JSException) -> Void
@JSFunction func \`try\`() throws(JSException) -> Void
}
@JSClass(jsName: "$Weird") struct _Weird {
@JSFunction init() throws(JSException)
@JSFunction(jsName: "method-with-dashes") func method_with_dashes() throws(JSException) -> Void
}
@JSFunction func createWeirdClass() throws(JSException) -> _Weird
"
`;
exports[`ts2swift > snapshots Swift output for MultipleImportedTypes.d.ts > MultipleImportedTypes 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func createDatabaseConnection(_ config: JSObject) throws(JSException) -> DatabaseConnection
@JSClass struct DatabaseConnection {
@JSFunction func connect(_ url: String) throws(JSException) -> Void
@JSFunction func execute(_ query: String) throws(JSException) -> JSObject
@JSGetter var isConnected: Bool
@JSGetter var connectionTimeout: Double
@JSSetter func setConnectionTimeout(_ value: Double) throws(JSException)
}
@JSFunction func createLogger(_ level: String) throws(JSException) -> Logger
@JSClass struct Logger {
@JSFunction func log(_ message: String) throws(JSException) -> Void
@JSFunction func error(_ message: String, _ error: JSObject) throws(JSException) -> Void
@JSGetter var level: String
}
@JSFunction func getConfigManager() throws(JSException) -> ConfigManager
@JSClass struct ConfigManager {
@JSFunction func get(_ key: String) throws(JSException) -> JSObject
@JSFunction func set(_ key: String, _ value: JSObject) throws(JSException) -> Void
@JSGetter var configPath: String
}
"
`;
exports[`ts2swift > snapshots Swift output for PrimitiveParameters.d.ts > PrimitiveParameters 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func check(_ a: Double, _ b: Bool) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for PrimitiveReturn.d.ts > PrimitiveReturn 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func checkNumber() throws(JSException) -> Double
@JSFunction func checkBoolean() throws(JSException) -> Bool
"
`;
exports[`ts2swift > snapshots Swift output for ReExportFrom.d.ts > ReExportFrom 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func jsRoundTripNumber(_ v: Double) throws(JSException) -> Double
@JSClass struct JsGreeter {
@JSFunction init(_ name: String) throws(JSException)
@JSFunction func greet() throws(JSException) -> String
}
"
`;
exports[`ts2swift > snapshots Swift output for StringEnum.d.ts > StringEnum 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
enum FeatureFlag: String {
case foo = "foo"
case bar = "bar"
}
extension FeatureFlag: _BridgedSwiftEnumNoPayload, _BridgedSwiftRawValueEnum {}
@JSFunction func takesFeatureFlag(_ flag: FeatureFlag) throws(JSException) -> Void
@JSFunction func returnsFeatureFlag() throws(JSException) -> FeatureFlag
"
`;
exports[`ts2swift > snapshots Swift output for StringParameter.d.ts > StringParameter 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func checkString(_ a: String) throws(JSException) -> Void
@JSFunction func checkStringWithLength(_ a: String, _ b: Double) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for StringReturn.d.ts > StringReturn 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func checkString() throws(JSException) -> String
"
`;
exports[`ts2swift > snapshots Swift output for TS2SkeletonLike.d.ts > TS2SkeletonLike 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func createTS2Skeleton() throws(JSException) -> TypeScriptProcessor
@JSClass struct TypeScriptProcessor {
@JSFunction func convert(_ ts: String) throws(JSException) -> String
@JSFunction func validate(_ ts: String) throws(JSException) -> Bool
@JSGetter var version: String
}
@JSFunction func createCodeGenerator(_ format: String) throws(JSException) -> CodeGenerator
@JSClass struct CodeGenerator {
@JSFunction func generate(_ input: JSObject) throws(JSException) -> String
@JSGetter var outputFormat: String
}
"
`;
exports[`ts2swift > snapshots Swift output for TypeAlias.d.ts > TypeAlias 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func checkSimple(_ a: Double) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for TypeScriptClass.d.ts > TypeScriptClass 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSClass struct Greeter {
@JSGetter var name: String
@JSSetter func setName(_ value: String) throws(JSException)
@JSGetter var age: Double
@JSFunction init(_ name: String) throws(JSException)
@JSFunction func greet() throws(JSException) -> String
@JSFunction func changeName(_ name: String) throws(JSException) -> Void
}
"
`;
exports[`ts2swift > snapshots Swift output for VoidParameterVoidReturn.d.ts > VoidParameterVoidReturn 1`] = `
"// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// \`swift package bridge-js\`.
@_spi(Experimental) @_spi(BridgeJS) import JavaScriptKit
@JSFunction func check() throws(JSException) -> Void
"
`;