(
settings: Gio.Settings,
key: string,
valueType: 'string' | 'boolean',
value: string | boolean
)
| 38 | } |
| 39 | |
| 40 | function setDynamic( |
| 41 | settings: Gio.Settings, |
| 42 | key: string, |
| 43 | valueType: 'string' | 'boolean', |
| 44 | value: string | boolean |
| 45 | ) { |
| 46 | switch (valueType) { |
| 47 | case 'string': |
| 48 | assert(typeof value === 'string', 'invalid value'); |
| 49 | return settings.set_string(key, value); |
| 50 | case 'boolean': |
| 51 | assert(typeof value === 'boolean', 'invalid value'); |
| 52 | return settings.set_boolean(key, value); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | export class RequiredSettingsModule { |
| 57 | mutterSettings: Gio.Settings; |
no test coverage detected