API Feature Request: Fetch configuration default value #13948
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
feature-request
Request for new features or functionality
You know how you have your Default Settings file and then your own User Settings file? Whenever you use the API to get configuration values, it pulls it from the User Settings file if it exists there, otherwise it falls back to the Default Settings file.
It would be nice to have the option to specifically pull configuration values from the Default Settings file. The reason is this:
Lets say you have a configuration value that is meant to be a boolean. Some sort of true/false value for your extension. And then someone copies this configuration value over to their User Settings file but they accidentally change it to a string instead of a boolean.
Now in your extension code, you need to obviously do a type check on the fetch configuration value to make sure it's a boolean. If it's not a boolean, you should probably fall back to the default value. But there is no way to fetch the default configuration value from the Default Settings. The only solution for this is to also hardcode your default value within your code and grab it from there.
I can't see a way to grab default values from configuration, so it would be really nice to have this option. Thanks,
The text was updated successfully, but these errors were encountered: