type apiKeyError
= [|`Dev |`Prod];
type validationErrors = [ | `AnalyticsPlatformMissing | `ApiKeyMissing(apiKeyError)];
This just gives a generic kinda cryptic syntax error message with no context and my editor (Emacs) pointed me to the later type decleration (CLI did point to the correct line).
As soon as I change it to [ |`Dev |`Prod] it reformats just fine.
Wondering if it's possible to detect something like this since it's probably quite common due to the similarities with array and poly variant declaration.