Skip to content

Commit e8ee831

Browse files
authored
Doc: replace camlp4 syntax with ppx syntax as it is the recommended approach now (#1010)
1 parent fa494b6 commit e8ee831

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lib/js_of_ocaml/js.mli

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type +'a constr
137137
(** A value of type [(t1 -> ... -> tn -> t Js.t) Js.constr] is a
138138
Javascript constructor expecting {i n} arguments of types [t1]
139139
to [tn] and returning a Javascript object of type [t Js.t]. Use
140-
the syntax extension [jsnew c (e1, ..., en)] to build an object
140+
the syntax extension [new%js c (e1, ..., en)] to build an object
141141
using constructor [c] and arguments [e1] to [en]. *)
142142

143143
(** {2 Callbacks to OCaml} *)
@@ -287,17 +287,17 @@ val string_constr : string_constr t
287287
(** The string constructor, as an object. *)
288288

289289
val regExp : (js_string t -> regExp t) constr
290-
(** Constructor of [RegExp] objects. The expression [jsnew regExp (s)]
290+
(** Constructor of [RegExp] objects. The expression [new%js regExp (s)]
291291
builds the regular expression specified by string [s]. *)
292292

293293
val regExp_withFlags : (js_string t -> js_string t -> regExp t) constr
294294
(** Constructor of [RegExp] objects. The expression
295-
[jsnew regExp (s, f)] builds the regular expression specified by
295+
[new%js regExp (s, f)] builds the regular expression specified by
296296
string [s] using flags [f]. *)
297297

298298
val regExp_copy : (regExp t -> regExp t) constr
299299
(** Constructor of [RegExp] objects. The expression
300-
[jsnew regExp (r)] builds a copy of regular expression [r]. *)
300+
[new%js regExp (r)] builds a copy of regular expression [r]. *)
301301

302302
(** Specification of Javascript regular arrays.
303303
Use [Js.array_get] and [Js.array_set] to access and set array elements. *)
@@ -379,11 +379,11 @@ val object_keys : 'a t -> js_string t js_array t
379379

380380
val array_empty : 'a js_array t constr
381381
(** Constructor of [Array] objects. The expression
382-
[jsnew array_empty ()] returns an empty array. *)
382+
[new%js array_empty ()] returns an empty array. *)
383383

384384
val array_length : (int -> 'a js_array t) constr
385385
(** Constructor of [Array] objects. The expression
386-
[jsnew array_length (l)] returns an array of length [l]. *)
386+
[new%js array_length (l)] returns an array of length [l]. *)
387387

388388
val array_get : 'a #js_array t -> int -> 'a optdef
389389
(** Array access: [array_get a i] returns the element at index [i]
@@ -539,38 +539,38 @@ class type date =
539539
end
540540

541541
val date_now : date t constr
542-
(** Constructor of [Date] objects: [jsnew date_now ()] returns a
542+
(** Constructor of [Date] objects: [new%js date_now ()] returns a
543543
[Date] object initialized with the current date. *)
544544

545545
val date_fromTimeValue : (float -> date t) constr
546-
(** Constructor of [Date] objects: [jsnew date_fromTimeValue (t)] returns a
546+
(** Constructor of [Date] objects: [new%js date_fromTimeValue (t)] returns a
547547
[Date] object initialized with the time value [t]. *)
548548

549549
val date_month : (int -> int -> date t) constr
550-
(** Constructor of [Date] objects: [jsnew date_fromTimeValue (y, m)]
550+
(** Constructor of [Date] objects: [new%js date_fromTimeValue (y, m)]
551551
returns a [Date] object corresponding to year [y] and month [m]. *)
552552

553553
val date_day : (int -> int -> int -> date t) constr
554-
(** Constructor of [Date] objects: [jsnew date_fromTimeValue (y, m, d)]
554+
(** Constructor of [Date] objects: [new%js date_fromTimeValue (y, m, d)]
555555
returns a [Date] object corresponding to year [y], month [m] and
556556
day [d]. *)
557557

558558
val date_hour : (int -> int -> int -> int -> date t) constr
559-
(** Constructor of [Date] objects: [jsnew date_fromTimeValue (y, m, d, h)]
559+
(** Constructor of [Date] objects: [new%js date_fromTimeValue (y, m, d, h)]
560560
returns a [Date] object corresponding to year [y] to hour [h]. *)
561561

562562
val date_min : (int -> int -> int -> int -> int -> date t) constr
563-
(** Constructor of [Date] objects: [jsnew date_fromTimeValue (y, m, d, h, m')]
563+
(** Constructor of [Date] objects: [new%js date_fromTimeValue (y, m, d, h, m')]
564564
returns a [Date] object corresponding to year [y] to minute [m']. *)
565565

566566
val date_sec : (int -> int -> int -> int -> int -> int -> date t) constr
567567
(** Constructor of [Date] objects:
568-
[jsnew date_fromTimeValue (y, m, d, h, m', s)]
568+
[new%js date_fromTimeValue (y, m, d, h, m', s)]
569569
returns a [Date] object corresponding to year [y] to second [s]. *)
570570

571571
val date_ms : (int -> int -> int -> int -> int -> int -> int -> date t) constr
572572
(** Constructor of [Date] objects:
573-
[jsnew date_fromTimeValue (y, m, d, h, m', s, ms)]
573+
[new%js date_fromTimeValue (y, m, d, h, m', s, ms)]
574574
returns a [Date] object corresponding to year [y]
575575
to millisecond [ms]. *)
576576

@@ -678,7 +678,7 @@ class type error =
678678

679679
val error_constr : (js_string t -> error t) constr
680680
(** Constructor of [Error] objects:
681-
[jsnew error_constr (msg)]
681+
[new%js error_constr (msg)]
682682
returns an [Error] object with the message [msg]. *)
683683

684684
val string_of_error : error t -> string

0 commit comments

Comments
 (0)