Get the type of a value that may be a container.
const doc = new LoroDoc();const map = doc.getMap("map");const list = doc.getList("list");const text = doc.getText("text");getType(map); // "Map"getType(list); // "List"getType(text); // "Text"getType(123); // "Json"getType("123"); // "Json"getType({}); // "Json" Copy
const doc = new LoroDoc();const map = doc.getMap("map");const list = doc.getList("list");const text = doc.getText("text");getType(map); // "Map"getType(list); // "List"getType(text); // "Text"getType(123); // "Json"getType("123"); // "Json"getType({}); // "Json"
Get the type of a value that may be a container.
Example