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
This definition generates a type User and a const UserSchema. The type's $typeName property is strongly typed, but the schema's typeName property is not:
This means the schema's property cannot be used to construct an instance of the type, and it cannot be used to narrow down a message by using the property as a descriminator.
If it's possible without breaking changes, we should change the generated schema to support this.
The text was updated successfully, but these errors were encountered:
From #994 (comment):
It would be very convenient to include a strongly typed type name in the schema for a generated message. For example:
This definition generates a
type User
and aconst UserSchema
. The type's$typeName
property is strongly typed, but the schema'stypeName
property is not:This means the schema's property cannot be used to construct an instance of the type, and it cannot be used to narrow down a message by using the property as a descriminator.
If it's possible without breaking changes, we should change the generated schema to support this.
The text was updated successfully, but these errors were encountered: