Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Documenting Js.Undefined #165

@johnridesabike

Description

@johnridesabike

There are some official Belt functions that use Js.Undefined, but it's not documented on the Reason or BuckleScript docs. The page on option mentions how to use Js.Nullable for interoperability, but not Undefined.

Some questions I have about Js.Undefined.t:

  • Is it obsolete now that option is unboxed?
  • Can you nest it?
  • Can you annotate externals with it as polymorphic instead of a concrete type? (Js.Undefined.t('a))

I had long assumed it was deprecated, but it’s been referenced in a recent BuckleScript blog post. I think that as long as it’s still being officially used on the BuckleScript site, it should be explained in the docs.

I know its API has basic documentation but there’s no explanation as to how it works or what its purpose is.

I would submit a PR myself, but I don't understand the type enough to adequately write about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsTechnical writing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions