@ginden/blinkstick-v2
Version:
Improved Blickstick API for Node.js
18 lines • 924 B
TypeScript
import type { BlinkStick } from './blinkstick';
import { ConditionalPick, JsonPrimitive } from 'type-fest';
/**
* Utility type that constrains T - useful for development not to accidentally use key that is not in T.
*/
export type Constraint<T, U extends T> = U;
/**
* @internal
*/
export type Properties = keyof ConditionalPick<BlinkStick, JsonPrimitive>;
export type SchedulableOperations = Constraint<keyof BlinkStick, 'loadLedCountFromDevice' | 'sendFeatureReport' | 'setFeatureReport' | 'setMode' | 'getFeatureReport'>;
/**
* @summary Limited version of BlinkStick that only includes schedulable operations and properties.
* @remarks All of these operations are related to device configuration and state management.
* This one is used only for Sync version
*/
export type LimitedBlinkStick<B extends BlinkStick> = Pick<B, SchedulableOperations | Properties>;
//# sourceMappingURL=schedulable-operations.d.ts.map