You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Generated by ReScript, PLEASE EDIT WITH CARE'use strict';varCaml_option=require("bs-platform/lib/js/caml_option.js");varm="hello word".match(/hello (world)?/);varm$1=m===null ? undefined : Caml_option.some(m);console.log(m$1);exports.m=m$1;/* m Not a pure module */
When I run that, it gives me the following result:
Since the capture group is not found, it gives me an undefined value instead of not appearing in the result array. So I would have to filter that out, either wrapping everything as an option or using Js.Nullable.isNullable. The thing is that this is not possible since the array values don't have a valid type for that function.
In order to actually reproduce the issue, try something like this:
Thank you for filing! Check list:
Let's consider this example in Reason bellow:
It compiles to the code bellow.
When I run that, it gives me the following result:
Since the capture group is not found, it gives me an undefined value instead of not appearing in the result array. So I would have to filter that out, either wrapping everything as an option or using
Js.Nullable.isNullable
. The thing is that this is not possible since the array values don't have a valid type for that function.In order to actually reproduce the issue, try something like this:
This gives me the following error:
The text was updated successfully, but these errors were encountered: