Function: createAccount()

createAccount(args): Promise<{ id: LixGenerated<string>; name: string; }>

Inserts a new account into the Lix database.

Accounts represent different identities working with the same Lix file. Switching the active account is handled separately via switchAccount.

Parameters

args

id?

LixGenerated<string>

lix

Pick<Lix, "db">

lixcol_version_id?

string

name

string

Returns

Promise<{ id: LixGenerated<string>; name: string; }>

Example

const account = await createAccount({ lix, name: "Jane" })