Skip to content

Welshman Docs / @welshman/store / adapter

Function: adapter() ​

adapter<Source, Target>(__namedParameters): object

Defined in: packages/store/src/index.ts:128

Type Parameters ​

• Source

• Target

Parameters ​

__namedParameters ​

backward ​

(x) => Source

forward ​

(x) => Target

store ​

Writable<Source>

Returns ​

object

set() ​

set: (x) => void

Parameters ​

x ​

Target

Returns ​

void

update() ​

update: (f) => void

Parameters ​

f ​

(x) => Target

Returns ​

void

subscribe() ​

Subscribe on value changes.

Parameters ​

this ​

void

run ​

Subscriber<Target>

subscription callback

invalidate? ​

Invalidator<Target>

cleanup callback

Returns ​

Unsubscriber