Union Types #18
WendellAdriel
started this conversation in
Ideas
Replies: 2 comments
-
@WendellAdriel do you have any ideas to implement? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have created a PR to implement this feature in #20. My flow: flowchart TD
A[StrictusUnion] --> B{Validate Types}
B -->|Yes| C{Validate Value}
B -->|No| Z[StrictusTypeException]
C -->|Yes| D{Detect Value Type}
C -->|No| Z[StrictusTypeException]
D -->|Int| E[StrictusInteger]
D -->|String| G[StrictusString]
D -->|Float| H[StrictusFloat]
D -->|Boolean| I[StrictusBoolean]
D -->|Array| K[StrictusArray]
D -->|Object| L[StrictusObject]
D -->|Class| M[StrictusInstance]
D -->|Enum| N[StrictusEnum]
D -->|No| Z[StrictusTypeException]
A[StrictusUnion] --> F[Update Value] --> O{Immutable}
O -->|Yes| Y[ImmutableStrictusException]
O -->|No| C
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@ccmiller2018 and I was talking about adding support for union types in Strictus.
This discussion will be used to talk about how we will approach the implementation of this feature.
Beta Was this translation helpful? Give feedback.
All reactions