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
I was thinking maybe the instanceGuard property of the component config could return a boolean instead of a t.check so you could do things like return instance.Parent?.IsA("Backpack"), this would lead to the component not being created if the parent of the instance is not a backpack.
For backwards compatibility, you could have have it return a t.check or a boolean, it wouldn't be too much trouble to handle both scenarios in the implementation.
This seems like it would be pretty easy to do, I could try implementing it if this sounds appealing at all and is approved.
The text was updated successfully, but these errors were encountered:
t.check is just (obj: unknown) => obj is T which is a boolean. You can just specify a function in instanceGuard that does whatever checks you want it to do.
I was thinking maybe the instanceGuard property of the component config could return a boolean instead of a t.check so you could do things like
return instance.Parent?.IsA("Backpack")
, this would lead to the component not being created if the parent of the instance is not a backpack.For backwards compatibility, you could have have it return a t.check or a boolean, it wouldn't be too much trouble to handle both scenarios in the implementation.
This seems like it would be pretty easy to do, I could try implementing it if this sounds appealing at all and is approved.
The text was updated successfully, but these errors were encountered: