Skip to content

Commit ffc960a

Browse files
committed
format
1 parent aaa668d commit ffc960a

File tree

6 files changed

+14
-30
lines changed

6 files changed

+14
-30
lines changed

packages/@rescript/runtime/Js_float.res

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ therefore necessary to test for `_NaN`. Return `true` if the given value is
4747
reason: "Use `Float.isNaN` instead.",
4848
migrate: Float.isNaN(),
4949
})
50-
@val @scope("Number")
50+
@val
51+
@scope("Number")
5152
external isNaN: float => bool = "isNaN"
5253

5354
/**
@@ -74,7 +75,8 @@ Js.Float.isFinite(1234.)
7475
reason: "Use `Float.isFinite` instead.",
7576
migrate: Float.isFinite(),
7677
})
77-
@val @scope("Number")
78+
@val
79+
@scope("Number")
7880
external isFinite: float => bool = "isFinite"
7981

8082
/**

packages/@rescript/runtime/Js_null_undefined.resi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ let fromOption: option<'a> => t<'a>
109109
@deprecated({
110110
reason: "Use `Nullable.fromOption` instead.",
111111
migrate: Nullable.fromOption(),
112-
}) let from_opt: option<'a> => t<'a>
112+
})
113+
let from_opt: option<'a> => t<'a>
113114

114115
/**
115116
Maps `Js.null_undefined<'a>` to `option<'a>`.

packages/@rescript/runtime/Js_option.resi

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -59,57 +59,40 @@ let getExn: option<'a> => 'a
5959
%insert.unlabelledArgument(2),
6060
%insert.unlabelledArgument(0),
6161
),
62-
6362
})
6463
let equal: (('a, 'b) => bool, option<'a>, option<'b>) => bool
6564

6665
@deprecated({
6766
reason: "Use `Option.flatMap` instead.",
68-
migrate: Option.flatMap(
69-
%insert.unlabelledArgument(1),
70-
%insert.unlabelledArgument(0),
71-
),
67+
migrate: Option.flatMap(%insert.unlabelledArgument(1), %insert.unlabelledArgument(0)),
7268
migrateInPipeChain: Option.flatMap(%insert.unlabelledArgument(0)),
7369
})
7470
let andThen: ('a => option<'b>, option<'a>) => option<'b>
7571

7672
@deprecated({
7773
reason: "Use `Option.map` instead.",
78-
migrate: Option.map(
79-
%insert.unlabelledArgument(1),
80-
%insert.unlabelledArgument(0),
81-
),
74+
migrate: Option.map(%insert.unlabelledArgument(1), %insert.unlabelledArgument(0)),
8275
migrateInPipeChain: Option.map(%insert.unlabelledArgument(0)),
8376
})
8477
let map: ('a => 'b, option<'a>) => option<'b>
8578

8679
@deprecated({
8780
reason: "Use `Option.getOr` instead.",
88-
migrate: Option.getOr(
89-
%insert.unlabelledArgument(1),
90-
%insert.unlabelledArgument(0),
91-
),
81+
migrate: Option.getOr(%insert.unlabelledArgument(1), %insert.unlabelledArgument(0)),
9282
migrateInPipeChain: Option.getOr(%insert.unlabelledArgument(0)),
9383
})
9484
let getWithDefault: ('a, option<'a>) => 'a
9585

9686
@deprecated({
97-
reason:
98-
"Use `Option.getOr` instead. Note: `default` has special meaning in ES modules.",
99-
migrate: Option.getOr(
100-
%insert.unlabelledArgument(1),
101-
%insert.unlabelledArgument(0),
102-
),
87+
reason: "Use `Option.getOr` instead. Note: `default` has special meaning in ES modules.",
88+
migrate: Option.getOr(%insert.unlabelledArgument(1), %insert.unlabelledArgument(0)),
10389
migrateInPipeChain: Option.getOr(%insert.unlabelledArgument(0)),
10490
})
10591
let default: ('a, option<'a>) => 'a
10692

10793
@deprecated({
10894
reason: "Use `Option.filter` instead.",
109-
migrate: Option.filter(
110-
%insert.unlabelledArgument(1),
111-
%insert.unlabelledArgument(0),
112-
),
95+
migrate: Option.filter(%insert.unlabelledArgument(1), %insert.unlabelledArgument(0)),
11396
migrateInPipeChain: Option.filter(%insert.unlabelledArgument(0)),
11497
})
11598
let filter: ('a => bool, option<'a>) => option<'a>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ let copyWithin2 = Array.copyAllWithin([1, 2, 3, 4, 5], ~target=2)
123123
let copyWithinFrom1 = [1, 2, 3, 4, 5]->Array.copyWithinToEnd(~target=0, ~start=2)
124124
let copyWithinFrom2 = Array.copyWithinToEnd([1, 2, 3, 4, 5], ~target=0, ~start=2)
125125

126-
let copyWithinFromRange1 = [1, 2, 3, 4, 5, 6]->Array.copyWithin(~target=1, ~start=2, ~end=5)
127-
let copyWithinFromRange2 = Array.copyWithin([1, 2, 3, 4, 5, 6], ~target=1, ~start=2, ~end=5)
126+
let copyWithinFromRange1 = [1, 2, 3, 4, 5, 6]->Array.copyWithin(~start=2, ~target=1, ~end=5)
127+
let copyWithinFromRange2 = Array.copyWithin([1, 2, 3, 4, 5, 6], ~start=2, ~target=1, ~end=5)
128128

129129
let push1 = [1, 2, 3]->Array.push(4)
130130
let push2 = Array.push([1, 2, 3], 4)

tests/tools_tests/src/migrate/StdlibMigration_Float.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ let toStringWithRadix2 = Js.Float.toStringWithRadix(6.0, ~radix=2)
3232

3333
let parse1 = "123"->Js.Float.fromString
3434
let parse2 = Js.Float.fromString("123")
35-

tests/tools_tests/src/migrate/StdlibMigration_Nullable.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ let toOption2 = Js.Null_undefined.toOption(Js.Null_undefined.return(3))
2424

2525
let to_opt1 = Js.Null_undefined.return(4)->Js.Null_undefined.to_opt
2626
let to_opt2 = Js.Null_undefined.to_opt(Js.Null_undefined.return(4))
27-

0 commit comments

Comments
 (0)