The fields an object needs to be stored in a LexicalList. Your objects can have any other field.
LexicalList
import type { Item } from "staquia";interface Task extends Item<number> { title: string;}// A new object starts with an empty position: the list gives it oneconst task: Task = { id: 1, title: "Write", position: "" }; Copy
import type { Item } from "staquia";interface Task extends Item<number> { title: string;}// A new object starts with an empty position: the list gives it oneconst task: Task = { id: 1, title: "Write", position: "" };
The type of the id.
id
The unique identifier of the object, never null or undefined.
null
undefined
The position of the object as a string, kept in sync by the list. Store it and sort by it.
The fields an object needs to be stored in a
LexicalList. Your objects can have any other field.Example