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
I get a type error pointing to the enum in ["null", enum]:
error TS2322: Type 'Type' is not assignable to type 'DefinedType'.
Type 'Type' is not assignable to type 'FixedType & LogicalTypeExtension'.
Type 'Type' is missing the following properties from type 'FixedType': type, size
If I inline the union it works fine... but I don't want to do that. It'd work for one of my unions, but another one is a union of a couple thousand entries, and I need it in multiple places so that'd get unwieldy fast.
I also tried using the name of the enum as a named type in the record, but that doesn't seem to work.
Thanks for the useful library!
The text was updated successfully, but these errors were encountered:
Hi @svirpridon. This is an issue with the typings, the underlying library supports this. Until this is fixed, it is safe to use an any cast here. Alternatively, you can use the name approach you mention by using the registry option:
Hi,
I have a use case where I have an enum I want to declare outside the record. It works fine if I'm not using a union:
But when I go to make it nullable with:
I get a type error pointing to the
enum
in["null", enum]
:If I inline the union it works fine... but I don't want to do that. It'd work for one of my unions, but another one is a union of a couple thousand entries, and I need it in multiple places so that'd get unwieldy fast.
I also tried using the name of the enum as a named type in the record, but that doesn't seem to work.
Thanks for the useful library!
The text was updated successfully, but these errors were encountered: