Conversation
| /** | ||
| * @title BooleanExpression | ||
| */ | ||
| export type BooleanExpression = |
There was a problem hiding this comment.
I changed expressions to be based on the type they resolve to rather than the type of the operand. This makes it possible for us to restrict the types of operands for various operators.
There was a problem hiding this comment.
The transpiler we're using to go from TS to JSON schema looks for @title in a comments so we can get rid of the add titles to schema script.
I added the necessary comments to all the types we're exposing and double checked the python doesn't have types with incorrect names.
|
|
||
| class PathExpression( | ||
| RootModel[Union[bool, float, str, UnaryPathExpression, BinaryPathExpression]] | ||
| class Expression( |
There was a problem hiding this comment.
One annoyance here that might be resolvable, the code gen tool to convert JSON schema to python puts this expression out of order. It puts it above NumberExpression so the python is invalid... I think that's just a bug with the tool, but it's easy enough to manually move it.
Instructions
developmentSummary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)