Skip to content

Interface: SignalOptions<T>

API / @xmachines/play-signals / SignalOptions

Defined in: packages/play-signals/src/types.ts:27

The options of a Signal.State

Param

equals

The optional equality function of your own. It decides if the value changed

Example

import { Signal } from "@xmachines/play-signals";
import type { SignalOptions } from "@xmachines/play-signals";
const options: SignalOptions<number> = {
equals: (a, b) => a === b,
};
const count = new Signal.State(0, options);

Type Parameters

Type Parameter
T

Properties

PropertyTypeDescriptionDefined in
equals?(a, b) => booleanThe equality function of your own. It decides if the value changedpackages/play-signals/src/types.ts:34