as constto allow ts to properly type our enum values.
as consthere to allow the enum values to be correctly inferred. The
as constcan also be added to the values instead, or omitted if the
valuesalready are defined using a variable that typescript can type correctly.
Refthat was returned by calling
builder.enumTypeor by using the typescript enum. They can be used either as arguments, or as field return types: