diff --git a/packages/@rescript/runtime/Stdlib_Null.resi b/packages/@rescript/runtime/Stdlib_Null.resi index 1855cb2e11..c20f13142b 100644 --- a/packages/@rescript/runtime/Stdlib_Null.resi +++ b/packages/@rescript/runtime/Stdlib_Null.resi @@ -104,11 +104,12 @@ external toOption: t<'a> => option<'a> = "#null_to_opt" /** Turns an `option` into a `Null.t`. `None` will be converted to `null`. +`None` compiles to `undefined`, but after calling `Null.fromOption`, the result will be `null` instead of `undefined`. ## Examples ```rescript let optString: option = None -let asNull = optString->Null.fromOption // Null.t +let asNull = optString->Null.fromOption // Null.t, will compile to 'null' Console.log(asNull == Null.null) // Logs `true` to the console. ``` */ diff --git a/packages/@rescript/runtime/Stdlib_Nullable.resi b/packages/@rescript/runtime/Stdlib_Nullable.resi index 1fbb44a314..493e6a38ed 100644 --- a/packages/@rescript/runtime/Stdlib_Nullable.resi +++ b/packages/@rescript/runtime/Stdlib_Nullable.resi @@ -102,6 +102,7 @@ external toOption: t<'a> => option<'a> = "#nullable_to_opt" /** Turns an `option` into a `Nullable.t`. +`None` compiles to `undefined` and after running `Nullable.fromOption` on it, it will continue to be `undefined`. ## Examples ```rescript