Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/js_of_ocaml/js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ module Js = struct

type string_array

type number_t = float

class type number = object
method toString : js_string t meth

Expand All @@ -271,7 +269,7 @@ module Js = struct

method charAt : int -> js_string t meth

method charCodeAt : int -> number_t meth
method charCodeAt : int -> number t meth

(* This may return NaN... *)
method concat : js_string t -> js_string t meth
Expand All @@ -291,7 +289,7 @@ module Js = struct

method lastIndexOf_from : js_string t -> int -> int meth

method localeCompare : js_string t -> number_t meth
method localeCompare : js_string t -> number t meth

method _match : regExp t -> match_result_handle t opt meth

Expand Down Expand Up @@ -354,6 +352,8 @@ module Js = struct

and normalization = js_string

type number_t = number t

(* string is used by ppx_js, it needs to come before any use of the
new syntax in this file *)
external string : string -> js_string t = "caml_jsstring_of_string"
Expand Down
8 changes: 4 additions & 4 deletions lib/js_of_ocaml/js.mli
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ val nfkc : normalization t

(** Specification of Javascript number objects. *)

type number_t = float

class type number = object
method toString : js_string t meth

Expand All @@ -245,7 +243,7 @@ and js_string = object

method charAt : int -> js_string t meth

method charCodeAt : int -> number_t meth
method charCodeAt : int -> number t meth

(* This may return NaN... *)
method concat : js_string t -> js_string t meth
Expand All @@ -265,7 +263,7 @@ and js_string = object

method lastIndexOf_from : js_string t -> int -> int meth

method localeCompare : js_string t -> number_t meth
method localeCompare : js_string t -> number t meth

method _match : regExp t -> match_result_handle t opt meth

Expand Down Expand Up @@ -328,6 +326,8 @@ and regExp = object
method lastIndex : int prop
end

type number_t = number t

(** Specification of the string constructor, considered as an object. *)
class type string_constr = object
method fromCharCode : int -> js_string t meth
Expand Down
Loading