@@ -40,7 +40,7 @@ extension SignedInteger where Self: ConstructibleFromJSValue {
40
40
/// If the value is too large to fit in the `Self` type, `nil` is returned.
41
41
///
42
42
/// - Parameter bigInt: The `JSBigIntExtended` to decode
43
- public init ? ( exactly bigInt: JSBigIntExtended ) {
43
+ public init ? ( exactly bigInt: some JSBigIntExtended ) {
44
44
self . init ( exactly: bigInt. int64Value)
45
45
}
46
46
@@ -49,7 +49,7 @@ extension SignedInteger where Self: ConstructibleFromJSValue {
49
49
/// Crash if the value is too large to fit in the `Self` type.
50
50
///
51
51
/// - Parameter bigInt: The `JSBigIntExtended` to decode
52
- public init ( _ bigInt: JSBigIntExtended ) {
52
+ public init ( _ bigInt: some JSBigIntExtended ) {
53
53
self . init ( bigInt. int64Value)
54
54
}
55
55
@@ -68,9 +68,11 @@ extension SignedInteger where Self: ConstructibleFromJSValue {
68
68
if let number = value. number {
69
69
return Self ( exactly: number. rounded ( . towardZero) )
70
70
}
71
+ #if !hasFeature(Embedded)
71
72
if let bigInt = value. bigInt as? JSBigIntExtended {
72
73
return Self ( exactly: bigInt)
73
74
}
75
+ #endif
74
76
return nil
75
77
}
76
78
}
@@ -87,7 +89,7 @@ extension UnsignedInteger where Self: ConstructibleFromJSValue {
87
89
/// Returns `nil` if the value is negative or too large to fit in the `Self` type.
88
90
///
89
91
/// - Parameter bigInt: The `JSBigIntExtended` to decode
90
- public init ? ( exactly bigInt: JSBigIntExtended ) {
92
+ public init ? ( exactly bigInt: some JSBigIntExtended ) {
91
93
self . init ( exactly: bigInt. uInt64Value)
92
94
}
93
95
@@ -96,7 +98,7 @@ extension UnsignedInteger where Self: ConstructibleFromJSValue {
96
98
/// Crash if the value is negative or too large to fit in the `Self` type.
97
99
///
98
100
/// - Parameter bigInt: The `JSBigIntExtended` to decode
99
- public init ( _ bigInt: JSBigIntExtended ) {
101
+ public init ( _ bigInt: some JSBigIntExtended ) {
100
102
self . init ( bigInt. uInt64Value)
101
103
}
102
104
@@ -114,9 +116,11 @@ extension UnsignedInteger where Self: ConstructibleFromJSValue {
114
116
if let number = value. number {
115
117
return Self ( exactly: number. rounded ( . towardZero) )
116
118
}
119
+ #if !hasFeature(Embedded)
117
120
if let bigInt = value. bigInt as? JSBigIntExtended {
118
121
return Self ( exactly: bigInt)
119
122
}
123
+ #endif
120
124
return nil
121
125
}
122
126
}
0 commit comments