跳到主要内容

bn.callAll

callAll(actions): Promise<CallAllResponse>

description Call multiple custom actions in sequence and return all results.

example

const results = await bn.callAll([
{ action: 'action1', payload: { data: 'test1' } },
{ action: 'action2', payload: { data: 'test2' } }
])
console.log(results)
{
results: [
{ result: { data: 'test1' } },
{ error: 'error', result: null }
]
}

Parameters

NameType
actions{ action: string ; payload?: any }[]

Returns

Promise<CallAllResponse>

Interface: CallAllResponse

NameTypeDescription
results{ error?: any ; result: any }[]