Skip to content

Commit 6720139

Browse files
committed
fix(platform-declarations-ios): Change 2^64-1 enum values to -1
`18446744073709551615` (`0xFFFFFFFFFFFFFFFF`) is an overflow to the JS numerical system and therefore incorrect. Integer values from `-(2^53-1)` to `(2^53-1)` only can be safely represented in JS (`Number​.MIN_SAFE_INTEGER` to `Number​.MAX_SAFE_INTEGER`) There's a fix in iOS Runtime's metadata generator which now automatically converts such values to signed. (NativeScript/ios-jsc#1151) refs NativeScript/ios-jsc#1150
1 parent 1c22a73 commit 6720139

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎tns-platform-declarations/ios/objc-x86_64/objc!MediaPlayer.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ declare const enum MPMediaType {
743743

744744
AnyVideo = 65280,
745745

746-
Any = 18446744073709551615
746+
Any = -1
747747
}
748748

749749
declare class MPMovieAccessLog extends NSObject implements NSCopying {

‎tns-platform-declarations/ios/objc-x86_64/objc!PassKit.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ declare const enum PKPassType {
375375

376376
Payment = 1,
377377

378-
Any = 18446744073709551615
378+
Any = -1
379379
}
380380

381381
declare class PKPayment extends NSObject {

‎tns-platform-declarations/ios/objc-x86_64/objc!SceneKit.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2939,7 +2939,7 @@ declare const enum SCNPhysicsCollisionCategory {
29392939

29402940
Static = 2,
29412941

2942-
All = 18446744073709551615
2942+
All = -1
29432943
}
29442944

29452945
declare class SCNPhysicsConeTwistJoint extends SCNPhysicsBehavior {

‎tns-platform-declarations/ios/objc-x86_64/objc!UIKit.d.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4354,7 +4354,7 @@ declare const enum UICollisionBehaviorMode {
43544354

43554355
Boundaries = 2,
43564356

4357-
Everything = 18446744073709551615
4357+
Everything = -1
43584358
}
43594359

43604360
declare class UIColor extends NSObject implements NSCopying, NSItemProviderReading, NSItemProviderWriting, NSSecureCoding {
@@ -4831,7 +4831,7 @@ declare const enum UIDataDetectorTypes {
48314831

48324832
None = 0,
48334833

4834-
All = 18446744073709551615
4834+
All = -1
48354835
}
48364836

48374837
interface UIDataSourceModelAssociation {
@@ -9348,7 +9348,7 @@ declare const enum UIPopoverArrowDirection {
93489348

93499349
Any = 15,
93509350

9351-
Unknown = 18446744073709551615
9351+
Unknown = -1
93529352
}
93539353

93549354
declare class UIPopoverBackgroundView extends UIView implements UIPopoverBackgroundViewMethods {
@@ -10286,7 +10286,7 @@ declare const enum UIRectCorner {
1028610286

1028710287
BottomRight = 8,
1028810288

10289-
AllCorners = 18446744073709551615
10289+
AllCorners = -1
1029010290
}
1029110291

1029210292
declare const enum UIRectEdge {

‎tns-platform-declarations/ios/objc-x86_64/objc!WebKit.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ declare const enum WKAudiovisualMediaTypes {
77

88
Video = 2,
99

10-
All = 18446744073709551615
10+
All = -1
1111
}
1212

1313
declare class WKBackForwardList extends NSObject {
@@ -88,7 +88,7 @@ declare const enum WKDataDetectorTypes {
8888

8989
LookupSuggestion = 64,
9090

91-
All = 18446744073709551615,
91+
All = -1,
9292

9393
SpotlightSuggestion = 64
9494
}

0 commit comments

Comments
 (0)