Skip to content

Commit 830ec22

Browse files
committed
Js.Date.t -> Date.t
1 parent 1313bb8 commit 830ec22

File tree

12 files changed

+15
-19
lines changed

12 files changed

+15
-19
lines changed

compiler/ml/ast_untagged_variants.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ let type_to_instanceof_backed_obj (t : Types.type_expr) =
166166
| Tconstr (path, _, _) when Path.same path Predef.path_array -> Some Array
167167
| Tconstr (path, _, _) -> (
168168
match Path.name path with
169-
| "Js_date.t" -> Some Date
169+
| "Date.t" -> Some Date
170170
| "Js_re.t" -> Some RegExp
171171
| "Js_file.t" -> Some File
172172
| "Js_blob.t" -> Some Blob

runtime/Date.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type t = Js.Date.t
1+
type t
22

33
type msSinceEpoch = float
44

runtime/Date.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
A type representing a JavaScript date.
77
*/
8-
type t = Js.Date.t
8+
type t
99

1010
/**
1111
Time, in milliseconds, since / until the UNIX epoch (January 1, 1970 00:00:00 UTC).

runtime/Js_date.res

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

32-
type t
32+
type t = Date.t
3333

3434
@send
3535
/**

runtime/Pervasives.res

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
/**
2-
Since [others] depend on this file, its public mli files **should not
3-
export types** introduced here, otherwise it would cause
4-
conflicts here.
1+
/* Core type aliases */
52

6-
If the type exported here is also exported in modules from others,
7-
you will get a type not equivalent.
8-
*/
9-
@deprecated("Do not use. This will be removed in v13")
10-
external /* Internal */
3+
type date = Date.t
114

12-
__unsafe_cast: 'a => 'b = "%identity"
5+
/* Internal */
6+
7+
@deprecated("Do not use. This will be removed in v13")
8+
external __unsafe_cast: 'a => 'b = "%identity"
139

1410
/* Exceptions */
1511

tests/gentype_tests/typescript-react-example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/gentype_tests/typescript-react-example/src/Date.res

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
type t = Date.t

tests/gentype_tests/typescript-react-example/src/nested/Types.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ type instantiateTypeParameter = ocaml_array<someRecord>
122122
@genType @genType.as("Vector")
123123
type vector<'a> = ('a, 'a)
124124

125-
@genType type date = Js.Date.t
125+
@genType type date = Date.t
126126

127127
@genType let currentTime = Js.Date.make()
128128

tests/syntax_tests/data/idempotency/pupilfirst/shared/DateTime.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type t = Js.Date.t
1+
type t = Date.t
22

33
@val @module("date-fns")
44
external dateFormat: (t, string) => string = "format"

tests/syntax_tests/data/idempotency/pupilfirst/shared/DateTime.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type t = Js.Date.t
1+
type t = Date.t
22

33
type format =
44
| OnlyDate

0 commit comments

Comments
 (0)