-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathts2swift.test.js.snap
More file actions
567 lines (446 loc) · 20.7 KB
/
ts2swift.test.js.snap
File metadata and controls
567 lines (446 loc) · 20.7 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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
// 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(BridgeJS) import JavaScriptKit
@JSFunction func processNumbers(_ values: [Double]) throws(JSException) -> Void
@JSFunction func getNumbers() throws(JSException) -> [Double]
@JSFunction func transformNumbers(_ values: [Double]) throws(JSException) -> [Double]
@JSFunction func processStrings(_ values: [String]) throws(JSException) -> [String]
@JSFunction func processBooleans(_ values: [Bool]) throws(JSException) -> [Bool]
@JSFunction func processArraySyntax(_ values: [Double]) throws(JSException) -> [Double]
"
`;
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(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: JSValue) throws(JSException) -> JSPromise
"
`;
exports[`ts2swift > snapshots Swift output for Documentation.d.ts > Documentation 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(BridgeJS) import JavaScriptKit
/// Return a greeting for a user.
///
/// - Parameters:
/// - name: The user's name.
/// - Returns: The greeting message.
@JSFunction func greet(_ name: String) throws(JSException) -> String
@JSFunction func origin() throws(JSException) -> Point
/// Represents a 2D point.
@JSClass struct Point {
/// The horizontal position.
@JSGetter var x: Double
@JSSetter func setX(_ value: Double) throws(JSException)
/// Translate the point.
///
/// - Parameters:
/// - dx: Delta to apply on x.
/// - dy: Delta to apply on y.
/// - Returns: The moved point.
@JSFunction func translate(_ dx: Double, _ dy: Double) throws(JSException) -> Point
}
/// Move a point by the given delta.
///
/// - Parameters:
/// - point: The point to move.
/// - dx: Delta to apply on x.
/// - dy: Delta to apply on y.
@JSFunction func translatePoint(_ point: Point, _ dx: Double, _ dy: Double) throws(JSException) -> Point
/// A greeter that keeps the target name.
@JSClass struct Greeter {
/// Create a greeter.
///
/// - Parameters:
/// - name: Name to greet.
@JSFunction init(_ name: String) throws(JSException)
/// The configured name.
@JSGetter var targetName: String
/// Say hello.
///
/// - Returns: Greeting message.
@JSFunction func greet() throws(JSException) -> String
}
"
`;
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(BridgeJS) import JavaScriptKit
@JSFunction func returnAnimatable() throws(JSException) -> Animatable
@JSClass struct Animatable {
@JSFunction func animate(_ keyframes: JSValue, _ options: JSValue) throws(JSException) -> JSValue
@JSFunction func getAnimations(_ options: JSValue) throws(JSException) -> JSValue
}
"
`;
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(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(BridgeJS) import JavaScriptKit
@JSFunction func createDatabaseConnection(_ config: JSValue) throws(JSException) -> DatabaseConnection
@JSClass struct DatabaseConnection {
@JSFunction func connect(_ url: String) throws(JSException) -> Void
@JSFunction func execute(_ query: String) throws(JSException) -> JSValue
@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: JSValue) throws(JSException) -> Void
@JSGetter var level: String
}
@JSFunction func getConfigManager() throws(JSException) -> ConfigManager
@JSClass struct ConfigManager {
@JSFunction func get(_ key: String) throws(JSException) -> JSValue
@JSFunction func set(_ key: String, _ value: JSValue) throws(JSException) -> Void
@JSGetter var configPath: String
}
"
`;
exports[`ts2swift > snapshots Swift output for ObjectLikeTypes.d.ts > ObjectLikeTypes 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(BridgeJS) import JavaScriptKit
@JSFunction func acceptObject(_ v: JSObject) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for OptionalNullUndefined.d.ts > OptionalNullUndefined 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(BridgeJS) import JavaScriptKit
@JSFunction func roundTripNumberNull(_ value: Optional<Double>) throws(JSException) -> Optional<Double>
@JSFunction func roundTripNumberUndefined(_ value: JSUndefinedOr<Double>) throws(JSException) -> JSUndefinedOr<Double>
@JSFunction func roundTripStringNull(_ value: Optional<String>) throws(JSException) -> Optional<String>
@JSFunction func roundTripStringUndefined(_ value: JSUndefinedOr<String>) throws(JSException) -> JSUndefinedOr<String>
@JSFunction func roundTripBooleanNull(_ value: JSObject) throws(JSException) -> JSObject
@JSFunction func roundTripBooleanUndefined(_ value: JSObject) throws(JSException) -> JSObject
@JSFunction func optionalNumberParamNull(_ x: Double, _ maybe: Optional<Double>) throws(JSException) -> Double
@JSFunction func optionalNumberParamUndefined(_ x: Double, _ maybe: JSUndefinedOr<Double>) throws(JSException) -> Double
@JSFunction func roundTripMyInterfaceNull(_ value: Optional<MyInterface>) throws(JSException) -> Optional<MyInterface>
@JSClass struct MyInterface {
}
@JSFunction func roundTripMyInterfaceUndefined(_ value: JSUndefinedOr<MyInterface>) throws(JSException) -> JSUndefinedOr<MyInterface>
@JSClass struct WithOptionalFields {
@JSGetter var valueOrNull: Optional<MyInterface>
@JSSetter func setValueOrNull(_ value: Optional<MyInterface>) throws(JSException)
@JSGetter var valueOrUndefined: JSUndefinedOr<MyInterface>
@JSSetter func setValueOrUndefined(_ value: JSUndefinedOr<MyInterface>) throws(JSException)
}
"
`;
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(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(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(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 RecordDictionary.d.ts > RecordDictionary 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(BridgeJS) import JavaScriptKit
@JSFunction func takeRecord(_ value: [String: Double]) throws(JSException) -> Void
@JSFunction func returnRecord() throws(JSException) -> [String: String]
@JSFunction func optionalRecord(_ value: Optional<[String: Bool]>) throws(JSException) -> Optional<[String: Bool]>
@JSFunction func nestedRecord(_ value: [String: [String: Double]]) throws(JSException) -> [String: [String: Double]]
@JSFunction func recordWithArrayValues(_ values: [String: [Double]]) throws(JSException) -> [String: [Double]]
@JSFunction func recordWithObjects(_ values: [String: Optional<Box>]) throws(JSException) -> [String: Optional<Box>]
@JSClass struct Box {
@JSGetter var value: Double
@JSSetter func setValue(_ value: Double) throws(JSException)
}
@JSFunction func unsupportedKeyRecord(_ values: JSObject) throws(JSException) -> Void
"
`;
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(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(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(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(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: JSValue) 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(BridgeJS) import JavaScriptKit
@JSFunction func checkSimple(_ a: Double) throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for TypeAliasObject.d.ts > TypeAliasObject 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(BridgeJS) import JavaScriptKit
@JSFunction func console() throws(JSException) -> Console
/// Console from the environment.
@JSClass struct Console {
/// Log a message.
@JSFunction func log(_ message: String) 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(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
@JSFunction static func staticMethod(_ p1: Double, _ p2: String) throws(JSException) -> String
}
"
`;
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(BridgeJS) import JavaScriptKit
@JSFunction func check() throws(JSException) -> Void
"
`;
exports[`ts2swift > snapshots Swift output for WebIDLDOMDocs.d.ts > WebIDLDOMDocs 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(BridgeJS) import JavaScriptKit
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document)
@JSGetter var document: Document
/// A simple Document subset with WebIDL-derived comments.
@JSClass struct Document {
/// Creates an instance of the element for the specified tag.
///
/// - Parameters:
/// - tagName: The name of an element.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createElement)
@JSFunction func createElement(_ tagName: String, _ options: JSUndefinedOr<ElementCreationOptions>) throws(JSException) -> Element
/// Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.
///
/// If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
///
/// If one of the following conditions is true a "NamespaceError" DOMException will be thrown:
///
/// localName does not match the QName production.
/// Namespace prefix is not null and namespace is the empty string.
/// Namespace prefix is "xml" and namespace is not the XML namespace.
/// qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace.
/// namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".
///
/// When supplied, options's is can be used to create a customized built-in element.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createElementNS)
@JSFunction func createElementNS(_ namespaceURI: Optional<String>, _ qualifiedName: String, _ options: JSObject) throws(JSException) -> Element
/// Creates a TreeWalker object.
///
/// - Parameters:
/// - root: The root element or node to start traversing on.
/// - whatToShow: The type of nodes or elements to appear in the node list
/// - filter: A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
/// - Returns: The created TreeWalker.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createTreeWalker)
@JSFunction func createTreeWalker(_ root: Node, _ whatToShow: JSUndefinedOr<Double>, _ filter: JSUndefinedOr<JSObject>) throws(JSException) -> TreeWalker
}
@JSClass struct ElementCreationOptions {
@JSGetter var \`is\`: JSUndefinedOr<String>
@JSSetter func setIs(_ value: JSUndefinedOr<String>) throws(JSException)
}
@JSClass struct Element {
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
@JSGetter var textContent: Optional<String>
@JSSetter func setTextContent(_ value: Optional<String>) throws(JSException)
/// Returns a copy of node. If deep is true, the copy also includes the node's descendants.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
@JSFunction func cloneNode(_ subtree: JSObject) throws(JSException) -> Node
}
/// Minimal stubs to mirror lib.dom.d.ts documentation converted from WebIDL.
@JSClass struct Node {
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)
@JSGetter var textContent: Optional<String>
@JSSetter func setTextContent(_ value: Optional<String>) throws(JSException)
/// Returns a copy of node. If deep is true, the copy also includes the node's descendants.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
@JSFunction func cloneNode(_ subtree: JSObject) throws(JSException) -> Node
}
@JSClass struct TreeWalker {
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/TreeWalker/currentNode)
@JSGetter var currentNode: Node
@JSSetter func setCurrentNode(_ value: Node) throws(JSException)
/// Moves the currentNode to the next visible node in the document order.
///
/// [MDN Reference](https://developer.mozilla.org/docs/Web/API/TreeWalker/nextNode)
@JSFunction func nextNode() throws(JSException) -> Optional<Node>
}
"
`;