Skip to content

Commit

Permalink
runtime(Js.Re): port @mel.send externals to use @mel.this (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored Jan 20, 2025
1 parent 64ee24e commit b9c664e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jscomp/runtime/js_re.ml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ external unicode : t -> bool = "unicode"
[@@mel.get]
(** returns a bool indicating whether the [unicode] flag is set *)

external exec : str:string -> t -> result option = "exec"
external exec : str:string -> (t[@mel.this]) -> result option = "exec"
[@@mel.send] [@@mel.return null_to_opt]
(** executes a search on a given string using the given RegExp object
Expand All @@ -173,7 +173,7 @@ let result = re |. Js.Re.exec ~str:"The Quick Brown Fox Jumps Over The Lazy Dog"
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec> MDN
*)

external test : str:string -> t -> bool = "test"
external test : str:string -> (t[@mel.this]) -> bool = "test"
[@@mel.send]
(** tests whether the given RegExp object will match a given string
Expand Down

0 comments on commit b9c664e

Please sign in to comment.