createAccount(
args: {id?:LixGenerated<string>;lix:Lix;name:string; }):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.
const account = await createAccount({ lix, name: "Jane" })| Parameter | Type |
|---|---|
args | { id?: LixGenerated<string>; lix: Lix; name: string; } |
args.id? | LixGenerated<string> |
args.lix | Lix |
args.name | string |
Promise<{ id: LixGenerated<string>; name: string; }>