Skip to content

Commit 1cc2b54

Browse files
committed
more type replacement migrations
1 parent 84e04c7 commit 1cc2b54

File tree

57 files changed

+194
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+194
-17
lines changed

packages/@rescript/runtime/Js_array.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ parameter in the function.
3333
/**
3434
The type used to describe a JavaScript array.
3535
*/
36+
@deprecated({
37+
reason: "Use `array` directly instead.",
38+
migrate: %replace.type(: array),
39+
})
3640
type t<'a> = array<'a>
3741

3842
/**

packages/@rescript/runtime/Js_array2.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ let result = {
5454
/**
5555
The type used to describe a JavaScript array.
5656
*/
57+
@deprecated({
58+
reason: "Use `array` directly instead.",
59+
migrate: %replace.type(: array),
60+
})
5761
type t<'a> = array<'a>
5862

5963
/**

packages/@rescript/runtime/Js_date.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on MDN.) JavaScript stores dates as the number of milliseconds since the UNIX
2929
*epoch*, midnight 1 January 1970, UTC.
3030
*/
3131

32+
@deprecated({
33+
reason: "Use `Date.t` instead.",
34+
migrate: %replace.type(: Date.t),
35+
})
3236
type t = Stdlib_Date.t
3337

3438
/**

packages/@rescript/runtime/Js_dict.res

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
/*** Provides a simple key-value dictionary abstraction over native JavaScript objects */
2626

2727
/** The dict type */
28-
@deprecated({
29-
reason: "Use `dict` directly instead.",
30-
migrate: %replace.type(: dict),
31-
})
3228
type t<'a> = dict<'a>
3329

3430
/** The key type, an alias of string */

packages/@rescript/runtime/Js_dict.resi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ type t<'a> = dict<'a>
4848
/**
4949
The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys.
5050
*/
51+
@deprecated({
52+
reason: "Use `string` directly instead.",
53+
migrate: %replace.type(: string),
54+
})
5155
type key = string
5256

5357
/**

packages/@rescript/runtime/Js_global.res

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,17 @@ Contains functions available in the global scope (`window` in a browser context)
2727
*/
2828

2929
/** Identify an interval started by `Js.Global.setInterval`. */
30+
@deprecated({
31+
reason: "Use `intervalId` directly instead.",
32+
migrate: %replace.type(: intervalId),
33+
})
3034
type intervalId = Stdlib_Global.intervalId
3135

3236
/** Identify timeout started by `Js.Global.setTimeout`. */
37+
@deprecated({
38+
reason: "Use `timeoutId` directly instead.",
39+
migrate: %replace.type(: timeoutId),
40+
})
3341
type timeoutId = Stdlib_Global.timeoutId
3442

3543
/**

packages/@rescript/runtime/Js_json.resi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Efficient JSON encoding using JavaScript API
3131
/* ## Types */
3232

3333
/** The JSON data structure */
34+
@deprecated({
35+
reason: "Use `JSON.t` instead.",
36+
migrate: %replace.type(: JSON.t),
37+
})
3438
@unboxed
3539
type rec t = Stdlib_JSON.t =
3640
| Boolean(bool)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/*** ES6 Map API */
22

3+
@deprecated({
4+
reason: "Use `Map.t` instead.",
5+
migrate: %replace.type(: Map.t),
6+
})
37
type t<'k, 'v> = Stdlib_Map.t<'k, 'v>

packages/@rescript/runtime/Js_null.resi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
/*** Provides functionality for dealing with the `Js.null<'a>` type */
2626

27+
@deprecated({
28+
reason: "Use `null` directly instead.",
29+
migrate: %replace.type(: null),
30+
})
2731
@unboxed
2832
type t<+'a> = Primitive_js_extern.null<'a> = Value('a) | @as(null) Null
2933

packages/@rescript/runtime/Js_null_undefined.resi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
Contains functionality for dealing with values that can be both `null` and `undefined`
2727
*/
2828

29+
@deprecated({
30+
reason: "Use `nullable` directly instead.",
31+
migrate: %replace.type(: nullable),
32+
})
2933
@unboxed
3034
type t<+'a> = Primitive_js_extern.nullable<'a> =
3135
Value('a) | @as(null) Null | @as(undefined) Undefined

0 commit comments

Comments
 (0)