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
exportinterfaceSomething{foo: false;// this is the problembar: string;}
It's doing this because in non-concrete schema form, it's true that bar != "someval", even though it's still possible that a value could arrive later and make it true.
These kinds of computed fields are a very powerful use case for CUE, and we want to be able to use them in schema without messing up language codegen. It'd be great if cuetsy could be smart enough to figure this out on its own. Or, if there's too much ambiguity, we could consider introducing a hinting attribute like @cuetsy(asBase) to indicate to the analyzer that it should just render the TS type corresponding to the incomplete kind of the field.
The text was updated successfully, but these errors were encountered:
Currently, the following input:
will be translated as follows:
It's doing this because in non-concrete schema form, it's true that
bar != "someval"
, even though it's still possible that a value could arrive later and make it true.These kinds of computed fields are a very powerful use case for CUE, and we want to be able to use them in schema without messing up language codegen. It'd be great if cuetsy could be smart enough to figure this out on its own. Or, if there's too much ambiguity, we could consider introducing a hinting attribute like
@cuetsy(asBase)
to indicate to the analyzer that it should just render the TS type corresponding to the incomplete kind of the field.The text was updated successfully, but these errors were encountered: