Wraps an object with a position, writing it to the object's position field.
The list creates its items: use LexicalItem.from to create one from a stored position.
OptionalnextThe id of the next item in the list, or undefined if this is the last one.
OptionalpreviousThe id of the previous item in the list, or undefined if this is the first one.
The id of the wrapped object.
The value that the lexical item wraps.
StaticfromCreates an item from an object whose position string is already set, forging it with the system.
The item, or the error of system.forge (e.g. an InvalidCharacterError).
An object stored in a
LexicalList, with its position and the ids of its neighbors.Setting its
positionalso updates thepositionstring of the wrapped object, so your object is always ready to be saved.Example