Skip to content

Commit 1b4f4be

Browse files
committed
more migrations
1 parent 6d1169d commit 1b4f4be

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

packages/@rescript/runtime/Js_array2.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ type t<'a> = array<'a>
6363
/**
6464
A type used to describe JavaScript objects that are like an array or are iterable.
6565
*/
66+
@deprecated({
67+
reason: "Use `Array.arrayLike` directly instead.",
68+
migrate: %replace.type(: Array.arrayLike),
69+
})
6670
type array_like<'a> = Stdlib_Array.arrayLike<'a>
6771

6872
/* commented out until bs has a plan for iterators

tests/tools_tests/src/expected/StdlibMigration_Array.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let shift2 = Array.shift([1, 2, 3])
44
let slice1 = [1, 2, 3]->Array.slice(~start=1, ~end=2)
55
let slice2 = Array.slice([1, 2, 3], ~start=1, ~end=2)
66

7-
external someArrayLike: Js_array2.array_like<string> = "whatever"
7+
external someArrayLike: Array.arrayLike<string> = "whatever"
88

99
let from1 = someArrayLike->Array.fromArrayLike
1010
let from2 = Array.fromArrayLike(someArrayLike)

tests/tools_tests/src/expected/StdlibMigration_BigInt.res.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ let fromStringExn2 = BigInt.fromStringOrThrow("123")
33

44
let land1 = 7n & 4n
55
let land2 = 7n & 4n
6+
let land3 = 7n->BigInt.toString->BigInt.fromStringOrThrow->BigInt.bitwiseAnd(4n)
67

78
let lor1 = 7n->BigInt.bitwiseOr(4n)
89
let lor2 = BigInt.bitwiseOr(7n, 4n)

tests/tools_tests/src/migrate/StdlibMigration_BigInt.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ let fromStringExn2 = Js.BigInt.fromStringExn("123")
33

44
let land1 = 7n->Js.BigInt.land(4n)
55
let land2 = Js.BigInt.land(7n, 4n)
6+
let land3 = 7n->Js.BigInt.toString->Js.BigInt.fromStringExn->Js.BigInt.land(4n)
67

78
let lor1 = 7n->Js.BigInt.lor(4n)
89
let lor2 = Js.BigInt.lor(7n, 4n)

tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_Array.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let shift2 = Array.shift([1, 2, 3])
66
let slice1 = [1, 2, 3]->Array.slice(~start=1, ~end=2)
77
let slice2 = Array.slice([1, 2, 3], ~start=1, ~end=2)
88

9-
external someArrayLike: Js_array2.array_like<string> = "whatever"
9+
external someArrayLike: Array.arrayLike<string> = "whatever"
1010

1111
let from1 = someArrayLike->Array.fromArrayLike
1212
let from2 = Array.fromArrayLike(someArrayLike)

tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_BigInt.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ let fromStringExn2 = BigInt.fromStringOrThrow("123")
55

66
let land1 = 7n & 4n
77
let land2 = 7n & 4n
8+
let land3 = 7n->BigInt.toString->BigInt.fromStringOrThrow->BigInt.bitwiseAnd(4n)
89

910
let lor1 = 7n->BigInt.bitwiseOr(4n)
1011
let lor2 = BigInt.bitwiseOr(7n, 4n)

0 commit comments

Comments
 (0)