docs: fix type of 'value' param in setUserDefaults (#33481)

This commit is contained in:
Samuel Attard 2022-03-29 14:47:06 -07:00 committed by GitHub
parent 94498b923e
commit 4c988a5a24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,11 +177,11 @@ Some popular `key` and `type`s are:
* `NSPreferredWebServices`: `dictionary`
* `NSUserDictionaryReplacementItems`: `array`
### `systemPreferences.setUserDefault(key, type, value)` _macOS_
### `systemPreferences.setUserDefault<Type extends keyof UserDefaultTypes>(key, type, value)` _macOS_
* `key` string
* `type` string - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`.
* `value` string
* `type` Type - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`.
* `value` UserDefaultTypes[Type]
Set the value of `key` in `NSUserDefaults`.