Skip to main content

synergies

Classes

Interfaces

References

Provider

Renames and re-exports SynergyProvider

Type aliases

AtomDraft

Ƭ AtomDraft<T>: Draft<{ current: T ; trigger: () => WritableDraft<{ current: T ; trigger: () => WritableDraft<{ current: T; trigger: () => WritableDraft<...>; }> }> }>

Type parameters

Name
T

Defined in

types.ts:35


AtomTuple

Ƭ AtomTuple<T>: { [I in keyof T]: Atom<T[I]> } & { length: T["length"] }

Type parameters

NameType
Textends [...any[]]

Defined in

types.ts:6


AtomWithValueArray

Ƭ AtomWithValueArray<T>: { [I in keyof T]: Object } & { length: T["length"] }

Type parameters

NameType
Textends any[] = any[]

Defined in

types.ts:52


DraftTuple

Ƭ DraftTuple<T>: { [I in keyof T]: AtomDraft<T[I]> } & { length: T["length"] } & any[]

Type parameters

NameType
Textends [...any[]]

Defined in

types.ts:10


Flatten

Ƭ Flatten<Arr, Result>: Arr extends readonly [] ? Result : Arr extends readonly [infer Head, ...infer Tail] ? Head extends ReadonlyArray<any> ? Flatten<readonly [...Head, ...Tail], Result> : Flatten<Tail, readonly [...Result, Head]> : never

Type parameters

NameType
Arrextends ReadonlyArray<unknown>
Resultextends ReadonlyArray<unknown> = []

Defined in

types.ts:18


Listener

Ƭ Listener: () => void

Type declaration

▸ (): void

Returns

void

Defined in

types.ts:40


Middleware

Ƭ Middleware<T>: (next: MiddlewareNextFunction<T>) => (updatedAtoms: AtomWithValueArray<T>) => void | Promise<void>

Type parameters

NameType
Textends any[] = any[]

Type declaration

▸ (next): (updatedAtoms: AtomWithValueArray<T>) => void | Promise<void>

Parameters
NameType
nextMiddlewareNextFunction<T>
Returns

fn

▸ (updatedAtoms): void | Promise<void>

Parameters
NameType
updatedAtomsAtomWithValueArray<T>
Returns

void | Promise<void>

Defined in

types.ts:60


MiddlewareNextFunction

Ƭ MiddlewareNextFunction<T>: (newUpdatedAtoms: AtomWithValueArray<T>) => void

Type parameters

NameType
Textends any[] = any[]

Type declaration

▸ (newUpdatedAtoms): void

Parameters
NameType
newUpdatedAtomsAtomWithValueArray<T>
Returns

void

Defined in

types.ts:56


SynergyTuple

Ƭ SynergyTuple<T>: { [I in keyof T]: Synergy<T[I][]> } & { length: T["length"] } & any[]

Type parameters

NameType
Textends [...any[][]]

Defined in

types.ts:14

Variables

MiddlewareProvider

Const MiddlewareProvider: NamedExoticComponent<MiddlewareProviderProps>

Defined in

middleware-provider.tsx:10

Functions

SynergyProvider

SynergyProvider<T>(props): Element

Type parameters

NameType
Textends any[]

Parameters

NameType
propsProviderProps<T>

Returns

Element

Defined in

provider.tsx:40


createAtom

createAtom<T>(defaultValue, name?): Atom<T>

Type parameters

Name
T

Parameters

NameType
defaultValueT
name?string

Returns

Atom<T>

Defined in

helpers.ts:8


createSynergy

createSynergy<T>(...atoms): Synergy<T>

Type parameters

NameType
Textends any[]

Parameters

NameType
...atomsSynergyTuple<T>

Returns

Synergy<T>

Defined in

helpers.ts:10