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
Is your feature request related to a problem? Please describe.
Currently, there isn't a nice way to determine wether a Type is assignable from a different Type in ProtoFlux. This information can be useful in a variety of situations in which you need to analyze generic runtime types.
Describe the solution you'd like
A new ProtoFlux Node Is Assignable From that takes in two Type inputs and outputs a boolean wether type A is assignable from type B.
Describe alternatives you've considered
You can create an explicit cast and check if it was cast successful (not null), but that has readability problems, and I think conceptually a type check like this should be done before before the type is used / cast, not after it.
Additional Context
No response
Requesters
No response
The text was updated successfully, but these errors were encountered:
What if you sort of combined a cast into it too? So you have a reference and a Type as inputs and then it outputs a boolean value and the result of the cast?
I've had a few cases where this would be useful--introspection without actually casting the object (because it is a heavy operation!). Would love this.
Is your feature request related to a problem? Please describe.
Currently, there isn't a nice way to determine wether a
Type
is assignable from a differentType
in ProtoFlux. This information can be useful in a variety of situations in which you need to analyze generic runtime types.Describe the solution you'd like
A new ProtoFlux Node
Is Assignable From
that takes in twoType
inputs and outputs a boolean wether type A is assignable from type B.Describe alternatives you've considered
You can create an explicit cast and check if it was cast successful (not null), but that has readability problems, and I think conceptually a type check like this should be done before before the type is used / cast, not after it.
Additional Context
No response
Requesters
No response
The text was updated successfully, but these errors were encountered: