@nstudio/nativescript-compiler 9.2.0-alpha.16 → 9.2.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +3 -0
  2. package/dist/kit/kit-index.js +9 -0
  3. package/dist/kotlin/access.js +14 -15
  4. package/dist/kotlin/arguments.js +2 -2
  5. package/dist/kotlin/assignment.js +22 -13
  6. package/dist/kotlin/builtins.js +67 -0
  7. package/dist/kotlin/calls.js +3 -2
  8. package/dist/kotlin/class-declaration.js +16 -1
  9. package/dist/kotlin/class-methods.js +2 -2
  10. package/dist/kotlin/components.js +2 -7
  11. package/dist/kotlin/core-api.js +3 -22
  12. package/dist/kotlin/declarations.js +86 -9
  13. package/dist/kotlin/expression-statements.js +13 -1
  14. package/dist/kotlin/functions.js +2 -4
  15. package/dist/kotlin/global-calls.js +1 -4
  16. package/dist/kotlin/literals.js +3 -10
  17. package/dist/kotlin/names.js +6 -4
  18. package/dist/kotlin/native/api.js +1 -1
  19. package/dist/kotlin/native/classfiles.js +2 -13
  20. package/dist/kotlin/operators.js +36 -30
  21. package/dist/kotlin/optional-chains.js +3 -10
  22. package/dist/kotlin/overrides.js +5 -17
  23. package/dist/kotlin/placement.js +1 -12
  24. package/dist/kotlin/state-backend.js +6 -2
  25. package/dist/kotlin/statements.js +1 -13
  26. package/dist/kotlin/translator.js +3 -11
  27. package/dist/kotlin/type-tests.js +1 -1
  28. package/dist/kotlin/types.js +6 -23
  29. package/dist/program/core-facts.js +9 -0
  30. package/dist/semantics/classes.js +15 -0
  31. package/dist/semantics/facts.js +38 -2
  32. package/dist/semantics/lang.js +29 -0
  33. package/dist/semantics/lower.js +144 -0
  34. package/dist/semantics/lowering-methods.js +120 -3
  35. package/dist/semantics/marks.js +30 -0
  36. package/dist/semantics/placement.js +9 -3
  37. package/dist/semantics/refusals.js +12 -11
  38. package/dist/semantics/signals.js +11 -0
  39. package/dist/semantics/states/missing.js +7 -0
  40. package/dist/semantics/tdz.js +142 -8
  41. package/dist/semantics/throws.js +1 -1
  42. package/dist/semantics/translator-methods.js +1 -1
  43. package/dist/swift/access.js +13 -17
  44. package/dist/swift/assignment.js +30 -16
  45. package/dist/swift/calls.js +13 -5
  46. package/dist/swift/classes.js +22 -10
  47. package/dist/swift/components.js +3 -7
  48. package/dist/swift/control-flow.js +1 -1
  49. package/dist/swift/conversion.js +5 -2
  50. package/dist/swift/core-api.js +11 -31
  51. package/dist/swift/declarations.js +1 -6
  52. package/dist/swift/expression-statements.js +7 -0
  53. package/dist/swift/expressions.js +6 -2
  54. package/dist/swift/from-any.js +1 -1
  55. package/dist/swift/functions.js +5 -6
  56. package/dist/swift/global-calls.js +1 -5
  57. package/dist/swift/lenient.js +0 -7
  58. package/dist/swift/literals.js +8 -3
  59. package/dist/swift/method-values.js +1 -19
  60. package/dist/swift/modules.js +5 -3
  61. package/dist/swift/names.js +3 -12
  62. package/dist/swift/native/api.js +3 -1
  63. package/dist/swift/native/calls.js +1 -1
  64. package/dist/swift/native/dispatch.js +2 -8
  65. package/dist/swift/object-classes.js +84 -1
  66. package/dist/swift/operators.js +37 -34
  67. package/dist/swift/optional-chains.js +1 -8
  68. package/dist/swift/parameters.js +0 -4
  69. package/dist/swift/placement.js +5 -15
  70. package/dist/swift/results.js +0 -4
  71. package/dist/swift/state-backend.js +3 -2
  72. package/dist/swift/statements.js +1 -13
  73. package/dist/swift/static-calls.js +2 -3
  74. package/dist/swift/syntax.js +9 -5
  75. package/dist/swift/translator.js +1 -11
  76. package/dist/swift/type-facts.js +3 -3
  77. package/dist/swift/types.js +3 -3
  78. package/dist/targets/ios/build.js +1 -1
  79. package/dist/types/adapter-api.d.ts +3 -3
  80. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  81. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  82. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  83. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  84. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  85. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  86. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  87. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  88. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  89. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  90. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  91. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  92. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  93. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  94. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  95. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  96. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  97. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  98. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  99. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  100. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  101. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  102. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  103. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  104. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  105. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  106. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  107. package/kit-android/generated/manifest.json +21 -18
  108. package/kit-android/generated/source-lines.json +1 -1
  109. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +547 -51
  110. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  111. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +52 -6
  112. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Language.kt +33 -0
  113. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +9 -1
  114. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  115. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Values.kt +137 -28
  116. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +1 -1
  117. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  118. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  119. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  120. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  121. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  122. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  123. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  124. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  125. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  126. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  127. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  128. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  129. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  130. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  131. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  132. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  133. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +2 -2
  134. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +52 -43
  135. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  136. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +66 -51
  137. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +67 -51
  138. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +24 -6
  139. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +143 -32
  140. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  141. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  142. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  143. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  144. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  145. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  146. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  148. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +4 -4
  149. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1272 -824
  150. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  151. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
  152. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  153. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  154. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  155. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  156. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +202 -188
  157. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  158. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +3 -3
  159. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  160. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  161. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  162. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  163. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  164. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  165. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  166. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +1 -2
  167. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  168. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  169. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  170. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  171. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +17 -17
  172. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  173. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  174. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  175. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  176. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  177. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  178. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  179. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  180. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +413 -73
  181. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  182. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +14 -1
  183. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  184. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  185. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  186. package/package.json +2 -2
@@ -3725,9 +3725,7 @@ public struct FunctionCell_ListViewBaseOpt_AnyOpt_to_AnyOpt {
3725
3725
  {
3726
3726
  jsBoxedFunction(Self(f: __f)) {
3727
3727
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
3728
- return try __f(
3729
- jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) }),
3730
- jsArg(__a, 1))
3728
+ return try __f((try jsCast(jsArg(__a, 0), ListViewBase.self)), jsArg(__a, 1))
3731
3729
  }
3732
3730
  }
3733
3731
  }
@@ -3973,9 +3971,7 @@ public struct FunctionCell_SegmentedBarBaseOpt_Double_to_Double {
3973
3971
  jsBoxedFunction(Self(f: __f)) {
3974
3972
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
3975
3973
  return try __f(
3976
- jsUnlessNullish(
3977
- jsArg(__a, 0), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
3978
- (try jsConvertedNumber(jsArg(__a, 1))))
3974
+ (try jsCast(jsArg(__a, 0), SegmentedBarBase.self)), (try jsConvertedNumber(jsArg(__a, 1))))
3979
3975
  }
3980
3976
  }
3981
3977
  }
@@ -4160,9 +4156,7 @@ public struct FunctionCell_TabViewBaseOpt_Double_to_Double {
4160
4156
  {
4161
4157
  jsBoxedFunction(Self(f: __f)) {
4162
4158
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4163
- return try __f(
4164
- jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? TabViewBase) ?? TabViewBase(jsObject: $0) }),
4165
- (try jsConvertedNumber(jsArg(__a, 1))))
4159
+ return try __f((try jsCast(jsArg(__a, 0), TabViewBase.self)), (try jsConvertedNumber(jsArg(__a, 1))))
4166
4160
  }
4167
4161
  }
4168
4162
  }
@@ -1255,6 +1255,9 @@ public struct FunctionCell_AnyOpt_Double_AnyOpt_to_Void {
1255
1255
  guard let value else { throw jsNoObject() }
1256
1256
  return value
1257
1257
  }
1258
+ public static func declared(_ id: String, _ __h: @escaping (Any?, Double, Any?) throws -> Void) -> (
1259
+ Any?, Double, Any?
1260
+ ) throws -> Void { jsDeclaredFunction(id, Self(f: __h)).f }
1258
1261
  public static func script(_ name: String, _ length: Int, _ __f: @escaping (Any?, Double, Any?) throws -> Void)
1259
1262
  -> JSFunctionObject
1260
1263
  {
@@ -3506,35 +3509,35 @@ public struct FunctionCell_FrameBaseOpt_String_String_to_Void {
3506
3509
  }
3507
3510
 
3508
3511
  public struct
3509
- FunctionCell_any_UIViewControllerContextTransitioningOpt_UIViewControllerOpt_UIViewControllerOpt_UINavigationController_Operation_to_Void
3512
+ FunctionCell_any_UIViewControllerContextTransitioning_Opt_UIViewControllerOpt_UIViewControllerOpt_UINavigationController_Operation_to_Void
3510
3513
  {
3511
3514
  public let f:
3512
3515
  (
3513
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3516
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3514
3517
  UINavigationController.Operation
3515
3518
  ) throws -> Void
3516
3519
  public static func implicit(
3517
3520
  _ value: (
3518
3521
  (
3519
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3522
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3520
3523
  UINavigationController.Operation
3521
3524
  ) throws -> Void
3522
3525
  )?
3523
3526
  ) -> (
3524
3527
  (
3525
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3528
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3526
3529
  UINavigationController.Operation
3527
3530
  ) throws -> Void
3528
3531
  )? { value }
3529
3532
  public static func present(
3530
3533
  _ value: (
3531
3534
  (
3532
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3535
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3533
3536
  UINavigationController.Operation
3534
3537
  ) throws -> Void
3535
3538
  )?
3536
3539
  ) throws -> (
3537
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3540
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3538
3541
  UINavigationController.Operation
3539
3542
  ) throws -> Void {
3540
3543
  guard let value else { throw jsNoObject() }
@@ -3544,15 +3547,15 @@ public struct
3544
3547
  _ name: String, _ length: Int,
3545
3548
  _ __f:
3546
3549
  @escaping (
3547
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3550
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3548
3551
  UINavigationController.Operation
3549
3552
  ) throws -> Void
3550
3553
  ) -> JSFunctionObject {
3551
3554
  jsBoxedFunction(Self(f: __f)) {
3552
3555
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
3553
3556
  try __f(
3554
- (jsArg(__a, 0) as? any UIViewControllerContextTransitioning), (jsArg(__a, 1) as? UIViewController),
3555
- (jsArg(__a, 2) as? UIViewController),
3557
+ (jsArg(__a, 0) as? (any UIViewControllerContextTransitioning)),
3558
+ (jsArg(__a, 1) as? UIViewController), (jsArg(__a, 2) as? UIViewController),
3556
3559
  jsNativeEnum(
3557
3560
  UINavigationController.Operation.self, jsNativeInteger(jsToNumber(jsArg(__a, 3)), Int.self)))
3558
3561
  return nil
@@ -3563,7 +3566,7 @@ public struct
3563
3566
  _ name: String, _ length: Int,
3564
3567
  _ __f: (
3565
3568
  (
3566
- any UIViewControllerContextTransitioning?, UIViewController?, UIViewController?,
3569
+ (any UIViewControllerContextTransitioning)?, UIViewController?, UIViewController?,
3567
3570
  UINavigationController.Operation
3568
3571
  ) throws -> Void
3569
3572
  )?
@@ -4291,9 +4294,7 @@ public struct FunctionCell_ListViewBaseOpt_AnyOpt_AnyOpt_to_Void {
4291
4294
  ) -> JSFunctionObject {
4292
4295
  jsBoxedFunction(Self(f: __f)) {
4293
4296
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4294
- try __f(
4295
- jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) }),
4296
- jsArg(__a, 1), jsArg(__a, 2))
4297
+ try __f((try jsCast(jsArg(__a, 0), ListViewBase.self)), jsArg(__a, 1), jsArg(__a, 2))
4297
4298
  return nil
4298
4299
  }
4299
4300
  }
@@ -4569,9 +4570,8 @@ public struct FunctionCell_SegmentedBarBaseOpt_Double_Double_to_Void {
4569
4570
  jsBoxedFunction(Self(f: __f)) {
4570
4571
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4571
4572
  try __f(
4572
- jsUnlessNullish(
4573
- jsArg(__a, 0), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
4574
- (try jsConvertedNumber(jsArg(__a, 1))), (try jsConvertedNumber(jsArg(__a, 2))))
4573
+ (try jsCast(jsArg(__a, 0), SegmentedBarBase.self)), (try jsConvertedNumber(jsArg(__a, 1))),
4574
+ (try jsConvertedNumber(jsArg(__a, 2))))
4575
4575
  return nil
4576
4576
  }
4577
4577
  }
@@ -4611,8 +4611,7 @@ public struct FunctionCell_SegmentedBarBaseOpt_JSArray_SegmentedBarItem_Opt_JSAr
4611
4611
  jsBoxedFunction(Self(f: __f)) {
4612
4612
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4613
4613
  try __f(
4614
- jsUnlessNullish(
4615
- jsArg(__a, 0), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
4614
+ (try jsCast(jsArg(__a, 0), SegmentedBarBase.self)),
4616
4615
  try jsArrayOrNil(
4617
4616
  jsArg(__a, 1), as: JSArray<SegmentedBarItem>.self,
4618
4617
  { try (jsCastPresent($0) as SegmentedBarItem) }),
@@ -4749,8 +4748,8 @@ public struct FunctionCell_TabViewBaseOpt_Double_Double_to_Void {
4749
4748
  jsBoxedFunction(Self(f: __f)) {
4750
4749
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4751
4750
  try __f(
4752
- jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? TabViewBase) ?? TabViewBase(jsObject: $0) }),
4753
- (try jsConvertedNumber(jsArg(__a, 1))), (try jsConvertedNumber(jsArg(__a, 2))))
4751
+ (try jsCast(jsArg(__a, 0), TabViewBase.self)), (try jsConvertedNumber(jsArg(__a, 1))),
4752
+ (try jsConvertedNumber(jsArg(__a, 2))))
4754
4753
  return nil
4755
4754
  }
4756
4755
  }
@@ -4790,7 +4789,7 @@ public struct FunctionCell_TabViewBaseOpt_JSArray_TabViewItem_Opt_JSArray_TabVie
4790
4789
  jsBoxedFunction(Self(f: __f)) {
4791
4790
  jsFunction(name, length) { (__a: [Any?]) throws -> Any? in
4792
4791
  try __f(
4793
- jsUnlessNullish(jsArg(__a, 0), { (jsFlat($0) as? TabViewBase) ?? TabViewBase(jsObject: $0) }),
4792
+ (try jsCast(jsArg(__a, 0), TabViewBase.self)),
4794
4793
  try jsArrayOrNil(
4795
4794
  jsArg(__a, 1), as: JSArray<TabViewItem>.self, { try (jsCastPresent($0) as TabViewItem) }),
4796
4795
  try jsArrayOrNil(
@@ -43,11 +43,10 @@ public final class Object_eventName_object_index_section_view_ios_android: JSDyn
43
43
  public convenience init(jsObject: Any?) {
44
44
  self.init(
45
45
  eventName: jsLenientString(jsField(jsObject, "eventName")),
46
- object: jsUnlessNullish(
47
- jsField(jsObject, "object"), { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) }),
48
- index: jsLenientNumber(jsField(jsObject, "index")), section: jsLenientNumber(jsField(jsObject, "section")),
49
- view: (jsField(jsObject, "view") as? View), ios: jsField(jsObject, "ios"),
50
- android: jsField(jsObject, "android"), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
46
+ object: (jsField(jsObject, "object") as? ListViewBase), index: jsLenientNumber(jsField(jsObject, "index")),
47
+ section: jsLenientNumber(jsField(jsObject, "section")), view: (jsField(jsObject, "view") as? View),
48
+ ios: jsField(jsObject, "ios"), android: jsField(jsObject, "android"),
49
+ jsOrder: (jsObject as? JSDynamic)?.jsKeys)
51
50
  jsUnset = jsUnsetKeys(jsObject, ["ios", "android"])
52
51
  jsExtra = jsObject as? JSDynamic
53
52
  }
@@ -139,8 +138,7 @@ public final class Object_eventName_object_index_section_view_ios_android: JSDyn
139
138
  case 6:
140
139
  switch key {
141
140
  case "object":
142
- self.object = jsUnlessNullish(
143
- newValue, { (jsFlat($0) as? ListViewBase) ?? ListViewBase(jsObject: $0) })
141
+ self.object = (newValue as? ListViewBase)
144
142
  return
145
143
  default: break
146
144
  }
@@ -0,0 +1,130 @@
1
+ // Generated from @nativescript/core by tools/kit: edit core, not this file.
2
+
3
+ import CFNetwork
4
+ import CoreFoundation
5
+ import CoreGraphics
6
+ import CoreServices
7
+ import CoreText
8
+ import Dispatch
9
+ import Foundation
10
+ import ObjectiveC
11
+ import Photos
12
+ import QuartzCore
13
+ import Symbols
14
+ import SystemConfiguration
15
+ import UIKit
16
+ import WebKit
17
+
18
+ public final class Object_eventName_object_ios_android_: JSDynamic, JSObjectConvertible {
19
+ nonisolated deinit {}
20
+ public var eventName: String
21
+ public var object: Any? { didSet { jsWrote("object", oldValue != nil, self.object == nil) } }
22
+ public var ios: Any? { didSet { jsWrote("ios", oldValue != nil, self.ios == nil) } }
23
+ public var android: Any? { didSet { jsWrote("android", oldValue != nil, self.android == nil) } }
24
+ private var jsOrder: [String]?
25
+ public init(
26
+ eventName: String, object: Any? = nil, ios: Any? = nil, android: Any? = nil, jsOrder: [String]? = nil,
27
+ jsUnset: Set<String>? = nil
28
+ ) {
29
+ self.eventName = eventName
30
+ self.object = object
31
+ self.ios = ios
32
+ self.android = android
33
+ self.jsOrder = jsOrder
34
+ self.jsUnset = jsUnset
35
+ }
36
+ private var jsExtra: JSDynamic?
37
+ public convenience init(jsObject: Any?) {
38
+ self.init(
39
+ eventName: jsLenientString(jsField(jsObject, "eventName")), object: jsField(jsObject, "object"),
40
+ ios: jsField(jsObject, "ios"), android: jsField(jsObject, "android"),
41
+ jsOrder: (jsObject as? JSDynamic)?.jsKeys)
42
+ jsUnset = jsUnsetKeys(jsObject, ["object", "ios", "android"])
43
+ jsExtra = jsObject as? JSDynamic
44
+ }
45
+ private var jsUnset: Set<String>?
46
+ private func jsHas(_ key: String) -> Bool {
47
+ switch key {
48
+ case "object": return self.object != nil || jsUnset?.contains("object") == true
49
+ case "ios": return self.ios != nil || jsUnset?.contains("ios") == true
50
+ case "android": return self.android != nil || jsUnset?.contains("android") == true
51
+ default: return true
52
+ }
53
+ }
54
+ private func jsWrote(_ key: String, _ had: Bool, _ unset: Bool) {
55
+ let was = had || jsUnset?.contains(key) == true
56
+ if unset { jsUnset = (jsUnset ?? []).union([key]) } else { jsUnset?.remove(key) }
57
+ if !was {
58
+ jsOrder = (jsOrder ?? ["eventName", "object", "ios", "android"]).filter { $0 != key && jsHas($0) } + [key]
59
+ }
60
+ }
61
+ public var jsKeys: [String] {
62
+ let order = jsOrder ?? ["eventName", "object", "ios", "android"]
63
+ let keys = order + (jsExtra?.jsKeys ?? []).filter { !order.contains($0) }
64
+ return keys.filter(jsHas)
65
+ }
66
+ public var jsClassName: String? { nil }
67
+ public subscript(jsKey key: String) -> Any? {
68
+ get {
69
+ switch key.utf8.count {
70
+ case 3:
71
+ switch key {
72
+ case "ios": return self.ios
73
+ default: break
74
+ }
75
+ case 6:
76
+ switch key {
77
+ case "object": return self.object
78
+ default: break
79
+ }
80
+ case 7:
81
+ switch key {
82
+ case "android": return self.android
83
+ default: break
84
+ }
85
+ case 9:
86
+ switch key {
87
+ case "eventName": return self.eventName
88
+ default: break
89
+ }
90
+ default: break
91
+ }
92
+ return jsExtra?[jsKey: key] ?? nil
93
+ }
94
+ set {
95
+ switch key.utf8.count {
96
+ case 3:
97
+ switch key {
98
+ case "ios":
99
+ self.ios = newValue
100
+ return
101
+ default: break
102
+ }
103
+ case 6:
104
+ switch key {
105
+ case "object":
106
+ self.object = newValue
107
+ return
108
+ default: break
109
+ }
110
+ case 7:
111
+ switch key {
112
+ case "android":
113
+ self.android = newValue
114
+ return
115
+ default: break
116
+ }
117
+ case 9:
118
+ switch key {
119
+ case "eventName":
120
+ jsStoring { self.eventName = (try jsConvertedString(newValue)) }
121
+ return
122
+ default: break
123
+ }
124
+ default: break
125
+ }
126
+ if jsExtra == nil { jsExtra = JSObject() }
127
+ jsExtra?[jsKey: key] = newValue
128
+ }
129
+ }
130
+ }
@@ -35,8 +35,7 @@ public final class Object_eventName_object_oldIndex_newIndex: JSDynamic, JSObjec
35
35
  public convenience init(jsObject: Any?) {
36
36
  self.init(
37
37
  eventName: jsLenientString(jsField(jsObject, "eventName")),
38
- object: jsUnlessNullish(
39
- jsField(jsObject, "object"), { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) }),
38
+ object: (jsField(jsObject, "object") as? SegmentedBarBase),
40
39
  oldIndex: jsLenientNumber(jsField(jsObject, "oldIndex")),
41
40
  newIndex: jsLenientNumber(jsField(jsObject, "newIndex")), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
42
41
  jsExtra = jsObject as? JSDynamic
@@ -75,8 +74,7 @@ public final class Object_eventName_object_oldIndex_newIndex: JSDynamic, JSObjec
75
74
  case 6:
76
75
  switch key {
77
76
  case "object":
78
- self.object = jsUnlessNullish(
79
- newValue, { (jsFlat($0) as? SegmentedBarBase) ?? SegmentedBarBase(jsObject: $0) })
77
+ self.object = (newValue as? SegmentedBarBase)
80
78
  return
81
79
  default: break
82
80
  }
@@ -0,0 +1,115 @@
1
+ // Generated from @nativescript/core by tools/kit: edit core, not this file.
2
+
3
+ import CFNetwork
4
+ import CoreFoundation
5
+ import CoreGraphics
6
+ import CoreServices
7
+ import CoreText
8
+ import Dispatch
9
+ import Foundation
10
+ import ObjectiveC
11
+ import Photos
12
+ import QuartzCore
13
+ import Symbols
14
+ import SystemConfiguration
15
+ import UIKit
16
+ import WebKit
17
+
18
+ public final class Object_specified_substituted_reads: JSDynamic, JSObjectConvertible {
19
+ nonisolated deinit {}
20
+ public var specified: Any? { didSet { jsWrote("specified", oldValue != nil, self.specified == nil) } }
21
+ public var substituted: Any? { didSet { jsWrote("substituted", oldValue != nil, self.substituted == nil) } }
22
+ public var reads: Any? { didSet { jsWrote("reads", oldValue != nil, self.reads == nil) } }
23
+ private var jsOrder: [String]?
24
+ public init(
25
+ specified: Any? = nil, substituted: Any? = nil, reads: Any? = nil, jsOrder: [String]? = nil,
26
+ jsUnset: Set<String>? = nil
27
+ ) {
28
+ self.specified = specified
29
+ self.substituted = substituted
30
+ self.reads = reads
31
+ self.jsOrder = jsOrder
32
+ self.jsUnset = jsUnset
33
+ }
34
+ private var jsExtra: JSDynamic?
35
+ public convenience init(jsObject: Any?) {
36
+ self.init(
37
+ specified: jsField(jsObject, "specified"), substituted: jsField(jsObject, "substituted"),
38
+ reads: jsField(jsObject, "reads"), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
39
+ jsUnset = jsUnsetKeys(jsObject, ["specified", "substituted", "reads"])
40
+ jsExtra = jsObject as? JSDynamic
41
+ }
42
+ private var jsUnset: Set<String>?
43
+ private func jsHas(_ key: String) -> Bool {
44
+ switch key {
45
+ case "specified": return self.specified != nil || jsUnset?.contains("specified") == true
46
+ case "substituted": return self.substituted != nil || jsUnset?.contains("substituted") == true
47
+ case "reads": return self.reads != nil || jsUnset?.contains("reads") == true
48
+ default: return true
49
+ }
50
+ }
51
+ private func jsWrote(_ key: String, _ had: Bool, _ unset: Bool) {
52
+ let was = had || jsUnset?.contains(key) == true
53
+ if unset { jsUnset = (jsUnset ?? []).union([key]) } else { jsUnset?.remove(key) }
54
+ if !was {
55
+ jsOrder = (jsOrder ?? ["specified", "substituted", "reads"]).filter { $0 != key && jsHas($0) } + [key]
56
+ }
57
+ }
58
+ public var jsKeys: [String] {
59
+ let order = jsOrder ?? ["specified", "substituted", "reads"]
60
+ let keys = order + (jsExtra?.jsKeys ?? []).filter { !order.contains($0) }
61
+ return keys.filter(jsHas)
62
+ }
63
+ public var jsClassName: String? { nil }
64
+ public subscript(jsKey key: String) -> Any? {
65
+ get {
66
+ switch key.utf8.count {
67
+ case 5:
68
+ switch key {
69
+ case "reads": return self.reads
70
+ default: break
71
+ }
72
+ case 9:
73
+ switch key {
74
+ case "specified": return self.specified
75
+ default: break
76
+ }
77
+ case 11:
78
+ switch key {
79
+ case "substituted": return self.substituted
80
+ default: break
81
+ }
82
+ default: break
83
+ }
84
+ return jsExtra?[jsKey: key] ?? nil
85
+ }
86
+ set {
87
+ switch key.utf8.count {
88
+ case 5:
89
+ switch key {
90
+ case "reads":
91
+ self.reads = newValue
92
+ return
93
+ default: break
94
+ }
95
+ case 9:
96
+ switch key {
97
+ case "specified":
98
+ self.specified = newValue
99
+ return
100
+ default: break
101
+ }
102
+ case 11:
103
+ switch key {
104
+ case "substituted":
105
+ self.substituted = newValue
106
+ return
107
+ default: break
108
+ }
109
+ default: break
110
+ }
111
+ if jsExtra == nil { jsExtra = JSObject() }
112
+ jsExtra?[jsKey: key] = newValue
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,113 @@
1
+ // Generated from @nativescript/core by tools/kit: edit core, not this file.
2
+
3
+ import CFNetwork
4
+ import CoreFoundation
5
+ import CoreGraphics
6
+ import CoreServices
7
+ import CoreText
8
+ import Dispatch
9
+ import Foundation
10
+ import ObjectiveC
11
+ import Photos
12
+ import QuartzCore
13
+ import Symbols
14
+ import SystemConfiguration
15
+ import UIKit
16
+ import WebKit
17
+
18
+ public final class Object_substituted_values_reads: JSDynamic, JSObjectConvertible {
19
+ nonisolated deinit {}
20
+ public var substituted: Any? { didSet { jsWrote("substituted", oldValue != nil, self.substituted == nil) } }
21
+ public var values: JSRecord<Any?>?
22
+ public var reads: Any? { didSet { jsWrote("reads", oldValue != nil, self.reads == nil) } }
23
+ private var jsOrder: [String]?
24
+ public init(
25
+ substituted: Any? = nil, values: JSRecord<Any?>?, reads: Any? = nil, jsOrder: [String]? = nil,
26
+ jsUnset: Set<String>? = nil
27
+ ) {
28
+ self.substituted = substituted
29
+ self.values = values
30
+ self.reads = reads
31
+ self.jsOrder = jsOrder
32
+ self.jsUnset = jsUnset
33
+ }
34
+ private var jsExtra: JSDynamic?
35
+ public convenience init(jsObject: Any?) {
36
+ self.init(
37
+ substituted: jsField(jsObject, "substituted"),
38
+ values: jsRecordOrNil(jsField(jsObject, "values"), as: JSRecord<Any?>.self, { $0 }),
39
+ reads: jsField(jsObject, "reads"), jsOrder: (jsObject as? JSDynamic)?.jsKeys)
40
+ jsUnset = jsUnsetKeys(jsObject, ["substituted", "reads"])
41
+ jsExtra = jsObject as? JSDynamic
42
+ }
43
+ private var jsUnset: Set<String>?
44
+ private func jsHas(_ key: String) -> Bool {
45
+ switch key {
46
+ case "substituted": return self.substituted != nil || jsUnset?.contains("substituted") == true
47
+ case "reads": return self.reads != nil || jsUnset?.contains("reads") == true
48
+ default: return true
49
+ }
50
+ }
51
+ private func jsWrote(_ key: String, _ had: Bool, _ unset: Bool) {
52
+ let was = had || jsUnset?.contains(key) == true
53
+ if unset { jsUnset = (jsUnset ?? []).union([key]) } else { jsUnset?.remove(key) }
54
+ if !was { jsOrder = (jsOrder ?? ["substituted", "values", "reads"]).filter { $0 != key && jsHas($0) } + [key] }
55
+ }
56
+ public var jsKeys: [String] {
57
+ let order = jsOrder ?? ["substituted", "values", "reads"]
58
+ let keys = order + (jsExtra?.jsKeys ?? []).filter { !order.contains($0) }
59
+ return keys.filter(jsHas)
60
+ }
61
+ public var jsClassName: String? { nil }
62
+ public subscript(jsKey key: String) -> Any? {
63
+ get {
64
+ switch key.utf8.count {
65
+ case 5:
66
+ switch key {
67
+ case "reads": return self.reads
68
+ default: break
69
+ }
70
+ case 6:
71
+ switch key {
72
+ case "values": return self.values
73
+ default: break
74
+ }
75
+ case 11:
76
+ switch key {
77
+ case "substituted": return self.substituted
78
+ default: break
79
+ }
80
+ default: break
81
+ }
82
+ return jsExtra?[jsKey: key] ?? nil
83
+ }
84
+ set {
85
+ switch key.utf8.count {
86
+ case 5:
87
+ switch key {
88
+ case "reads":
89
+ self.reads = newValue
90
+ return
91
+ default: break
92
+ }
93
+ case 6:
94
+ switch key {
95
+ case "values":
96
+ self.values = jsRecordOrNil(newValue, as: JSRecord<Any?>.self, { $0 })
97
+ return
98
+ default: break
99
+ }
100
+ case 11:
101
+ switch key {
102
+ case "substituted":
103
+ self.substituted = newValue
104
+ return
105
+ default: break
106
+ }
107
+ default: break
108
+ }
109
+ if jsExtra == nil { jsExtra = JSObject() }
110
+ jsExtra?[jsKey: key] = newValue
111
+ }
112
+ }
113
+ }