DevicePreferences
Reports device and accessibility preferences, and tells the ui when they
change. Separate from ThemeSource because these never touch the
document; they only steer behaviour such as animation and default controls.
This is an interface exported by @mapcairn/core, checked against version 0.2.0.
Signature
import type { DevicePreferences } from "@mapcairn/core";
interface DevicePreferences
Methods
get
get(): DevicePreferencesValue;
The current preferences. The same object is returned until something changes.
subscribe
subscribe(listener: (value: DevicePreferencesValue) => void): () => void;
Calls the listener when a preference changes. Returns the unsubscribe function.
listener((value: DevicePreferencesValue) => void)