Clarifying appropriate use cases for Literal types in the guides #2149
u-harshitha007
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While reading the typing guides, I noticed that Literal types are introduced,
but there isn’t much guidance on when they should or should not be used.
New users often try to apply Literal to dynamic values or user input,
which doesn’t provide useful guarantees and can lead to confusion
when using type checkers.
Would it be acceptable to add a short, non-normative note in the guides
clarifying appropriate use cases for Literal types?
Beta Was this translation helpful? Give feedback.
All reactions