Class: Synergy<T>
Type parameters
Name | Type |
---|---|
T | extends any [] = any [] |
Hierarchy
Synergy
↳
Atom
Constructors
constructor
• new Synergy<T
>(atoms
)
Type parameters
Name | Type |
---|---|
T | extends any [] = any [] |
Parameters
Name | Type |
---|---|
atoms | any |
Defined in
Properties
atoms
• Readonly
atoms: AtomTuple
<T
>
Defined in
Methods
combine
▸ combine<R
>(...otherSynergies
): Synergy
<[...T[], ...Flatten<R, []>[]]>
Type parameters
Name | Type |
---|---|
R | extends any [] |
Parameters
Name | Type |
---|---|
...otherSynergies | SynergyTuple <R > |
Returns
Synergy
<[...T[], ...Flatten<R, []>[]]>
Defined in
createAction
▸ createAction<A
>(handler
): () => (...args
: A
) => Promise
<void
>
Type parameters
Name | Type |
---|---|
A | extends any [] |
Parameters
Name | Type |
---|---|
handler | (...args : A ) => (...drafts : DraftTuple <T >) => void | Promise <void > |
Returns
fn
▸ (): (...args
: A
) => Promise
<void
>
Returns
fn
▸ (...args
): Promise
<void
>
Parameters
Name | Type |
---|---|
...args | A |
Returns
Promise
<void
>
Defined in
createProviderState
▸ createProviderState(initialState?
): Record
<symbol
, AtomContextData
<T
[number
]>>
internal
Parameters
Name | Type |
---|---|
initialState? | Record <symbol , any > |
Returns
Record
<symbol
, AtomContextData
<T
[number
]>>
Defined in
createSelector
▸ createSelector<R
>(selectorFn
): () => any
Type parameters
Name |
---|
R |
Parameters
Name | Type |
---|---|
selectorFn | (...args : T ) => R |
Returns
fn
▸ (): any
Returns
any
Defined in
useSet
▸ useSet(): (...args
: T
) => Promise
<void
>
Returns
fn
▸ (...args
): Promise
<void
>
Parameters
Name | Type |
---|---|
...args | T |
Returns
Promise
<void
>
Defined in
useValue
▸ useValue(): any
Returns
any