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 have searched the existing issues before opening this feature request.
Describe the feature you would like to see.
In the admin area for servers, administrators can give a server unlimited bandwidth by omitting any value (essentially null) from the bandwidth allocation field. This is a little tricky to implement internally as null is a very ambiguous value-can indicate that the request simply does not want to modify the bandwidth field.
It can also be extremely confusing if it is an optional field in an API request as null can mean if its optional or if its marked as unlimited, and this is virtually impossible to differentiate as a type in Typescript. For example, determine whether the type below indicates whether the admin wants the field to stay untouched or mark it as unlimited. (Don't say just use undefined because you should refrain from using undefined as much as possible).
Instead of using null as an indicator for no limitation on a resource, it should be switched to -1 as it's a defined value and clearly indicates that a field is unlimited (because you cannot allocate negative resources).
Additional context to this request.
No response
The text was updated successfully, but these errors were encountered:
Is there an existing feature request for this?
Describe the feature you would like to see.
In the admin area for servers, administrators can give a server unlimited bandwidth by omitting any value (essentially
null
) from the bandwidth allocation field. This is a little tricky to implement internally asnull
is a very ambiguous value-can indicate that the request simply does not want to modify the bandwidth field.It can also be extremely confusing if it is an optional field in an API request as
null
can mean if its optional or if its marked as unlimited, and this is virtually impossible to differentiate as a type in Typescript. For example, determine whether the type below indicates whether the admin wants the field to stay untouched or mark it as unlimited. (Don't say just useundefined
because you should refrain from usingundefined
as much as possible).Describe the solution you'd like.
Instead of using
null
as an indicator for no limitation on a resource, it should be switched to-1
as it's a defined value and clearly indicates that a field is unlimited (because you cannot allocate negative resources).Additional context to this request.
No response
The text was updated successfully, but these errors were encountered: