Improve api docs representation of LiteralUnion
s
#795
Labels
c: docs
Improvements or additions to documentation
p: 1-normal
Nothing urgent
s: needs decision
Needs team/maintainer decision
Milestone
Clear and concise description of the problem
Currently
LiteralUnions
are displayed as their full generic type. This is unessesarily bulky.Suggested solution
Since we usually only expect the specified values from that type, we might as well just display them.
LiteralUnion<"abbr" | "date" | "unix" | "wide", string>
->"abbr" | "date" | "unix" | "wide"
Alternative
Change the representation to either:
"abbr" | "date" | "unix" | "wide" | string
LiteralUnion<"abbr" | "date" | "unix" | "wide">
Additional context
Found while writing issue #794.
The text was updated successfully, but these errors were encountered: