This repository was archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Documenting Js.Undefined #165
Copy link
Copy link
Open
Labels
docsTechnical writingTechnical writing
Description
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
optionis 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
Labels
docsTechnical writingTechnical writing