Skip to content

Js.Nullable doesn't have toOption/fromOption #2531

@flash-gordon

Description

@flash-gordon

In bs-platform 2.2 there are Js.{Null,Undefined}.{fromOption,toOption} but Js.Nullable still has only from_opt/to_opt:
https://github.com/BuckleScript/bucklescript/blob/92c31ee1e3989e12ffc00a88d6a8e296a1ea1c2c/jscomp/others/js_null_undefined.ml#L27-L47

Also, Js has toOption but is missing the fromOption counterpart: https://github.com/BuckleScript/bucklescript/blob/92c31ee1e3989e12ffc00a88d6a8e296a1ea1c2c/jscomp/runtime/js.ml#L64

I did some research but found no apparent reason for this partially-implemented API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions