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
Since we allow every possible value for a map option it makes sense to do the same for numbers.
Example usage:
Given a plugin with a number option (minValue = 0 and maxValue = 10). If no value is provided the plugin should completely ignore the option.
Currently defaultValue would default to 0 and therefore there is no way for the plugin to check if the option was provided by the user or not.
Suggested Solution
If we allow every possible number the plugin could define the defaultValue as -1 for example and then proceed accordingly.
Another solution would be not to set the defaultValue to 0 if it is not defined when calling addDeclaration.
What do you think?
The text was updated successfully, but these errors were encountered:
This sounds reasonable to me, originally I was going to say that we should instead provide an isSet function, but that complicates the class considerably. This seems like a good compromise.
Search Terms
plugin number declaration option
Problem
Since we allow every possible value for a map option it makes sense to do the same for numbers.
Example usage:
Given a plugin with a number option (minValue = 0 and maxValue = 10). If no value is provided the plugin should completely ignore the option.
Currently defaultValue would default to 0 and therefore there is no way for the plugin to check if the option was provided by the user or not.
Suggested Solution
If we allow every possible number the plugin could define the defaultValue as -1 for example and then proceed accordingly.
Another solution would be not to set the defaultValue to 0 if it is not defined when calling addDeclaration.
What do you think?
The text was updated successfully, but these errors were encountered: