Function: switchAccount()

switchAccount(args: { lix: Pick<Lix, "db">; to: Pick<{ id: LixGenerated<string>; name: string; }, "id" | "name">[]; }): Promise<void>

Switch the current account to the provided account.

Examples

One active account

await switchAccount({ lix, to: [otherAccount] });

Multiple active accounts

await switchAccount({ lix, to: [account1, account2] });

Parameters

ParameterType
args{ lix: Pick<Lix, "db">; to: Pick<{ id: LixGenerated<string>; name: string; }, "id" | "name">[]; }
args.lixPick<Lix, "db">
args.toPick<{ id: LixGenerated<string>; name: string; }, "id" | "name">[]

Returns

Promise<void>