UNPKG

js.foresight

Version:

Predicts mouse trajectory to trigger actions as users approach elements, enabling anticipatory UI updates or pre-loading. Made with vanilla javascript and usable in every framework.

11 lines 584 B
/** * Checks if a setting should be updated. * Returns true if the newValue is defined and different from the currentValue. * Uses a type predicate to narrow the type of newValue in the calling scope. * * @param newValue The potentially new value for the setting (can be undefined). * @param currentValue The current value of the setting. * @returns True if the setting should be updated, false otherwise. */ export declare function shouldUpdateSetting<T>(newValue: T | undefined, currentValue: T): newValue is NonNullable<T>; //# sourceMappingURL=shouldUpdateSetting.d.ts.map