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
Typings for methods such as Vector3.mul don't appear to account for unions of valid types, e.g. number | Vector3 as opposed to just number or Vector3 (both of which are valid).
Calling these methods with unions that only contain valid types should probably be considered valid, e.g. Vector3.one.mul(condition ? Vector3.one : 1); should not throw a type error because the method could only be called with a valid type as the argument in this case.
Typings for methods such as
Vector3.mul
don't appear to account for unions of valid types, e.g.number | Vector3
as opposed to justnumber
orVector3
(both of which are valid).Calling these methods with unions that only contain valid types should probably be considered valid, e.g.
Vector3.one.mul(condition ? Vector3.one : 1);
should not throw a type error because the method could only be called with a valid type as the argument in this case.Here is a playground link demonstrating the behavior: https://roblox-ts.com/playground/#code/PTAEBUAsFMGdtAFwO4HtQEMBOCBuGAbASwBMAoANWgGNFUsBmAOgC9otUmBbAVwIAoGASgDcoEKH68CiIgAcCATyIA7AOagABlVr0GoAFSgVPLgCN2moZRp1Grdp2n8dd5qhXQh4sFL6yFZXUtVz1DUFDGKzIyCSgiWFBYSFQ+ElALUHxidItqDB54ENs9bj5NUHyVTGpqaDlEUGgiRBgsTGNTC3b6DsiGAFpKniwcFUQlUBIE6iwiLlUMRDhMNQxVWEbWhB4VIg8kRTkETRNzdlAAHwiSqJtdezYOMoFELB4EAH5QAEZQAC4bg93J5RDEJABleZEAjYDLQSAYXD7doJJoAD0gRDMLWg6VUSBgU2gADNVC19ipEqgSUw6bEwABhABiWAwXDgZE8yFALLZHP4Qhe-DeH1A336Dg4AOM0B5fPZXhEDKBdgATLB7uqpU4+CL3l9fjLImqmB4lUA.
The text was updated successfully, but these errors were encountered: