-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Currently, because of the leading | symbol , the following code is invalid TypeScript:
type ReduxAction =
| { type: "INCREMENT" }
| { type: "DECREMENT" }
| { type: "SET_VALUE", value: number };I suggest we relax the syntax such that a single leading pipe symbol is allowed (but not required) in a union type declaration. Flow and F#, for example, both allow this syntax.
This change is backwards-compatible and gives developers a little more code formatting freedom.
jwbay, svieira, Lenne231 and GoToLoop
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript