You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to inform users when they encounter specific errors related to a property.
In this example use case, we would like to inform the user that a property on a discriminated union can only be set when the discriminator matches the type.
interfaceBase{discriminator: boolean;foo: string|never;}interfaceUnionTypeAextendsBase{discriminator: true;foo: string;}interfaceUnionTypeBextendsBase{discriminator: false;/** * * {@errorCode 2322 | This property can only be set when discriminator is equal to `true`} * */foo: never;}typeDiscriminatedUnion=UnionTypeA|UnionTypeB;constbar: DiscriminatedUnion={discriminator: false,foo: ""}
The current error is shown as:
I based the syntax around what I have seen as prior art in the @link tag.
Apologies if this has been suggested or discussed before, I could not find anything from an initial search of issues.
The text was updated successfully, but these errors were encountered:
It would be nice to be able to inform users when they encounter specific errors related to a property.
In this example use case, we would like to inform the user that a property on a discriminated union can only be set when the discriminator matches the type.
The current error is shown as:
I based the syntax around what I have seen as prior art in the
@link
tag.Apologies if this has been suggested or discussed before, I could not find anything from an initial search of issues.
The text was updated successfully, but these errors were encountered: