diff --git a/jscomp/runtime/js_re.ml b/jscomp/runtime/js_re.ml index 75a2e6d4d..926d155fb 100644 --- a/jscomp/runtime/js_re.ml +++ b/jscomp/runtime/js_re.ml @@ -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 @@ -173,7 +173,7 @@ let result = re |. Js.Re.exec ~str:"The Quick Brown Fox Jumps Over The Lazy Dog" @see 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