(
settings: Gio.Settings,
key: string,
valueType: 'string' | 'boolean'
)
| 25 | } |
| 26 | |
| 27 | function getDynamic( |
| 28 | settings: Gio.Settings, |
| 29 | key: string, |
| 30 | valueType: 'string' | 'boolean' |
| 31 | ): string | boolean { |
| 32 | switch (valueType) { |
| 33 | case 'string': |
| 34 | return settings.get_string(key)!; |
| 35 | case 'boolean': |
| 36 | return settings.get_boolean(key); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | function setDynamic( |
| 41 | settings: Gio.Settings, |
no test coverage detected