Files
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

17 lines
450 B
TypeScript

import type { Node, Schema } from "prosemirror-model";
/**
* Check if a node is a list node.
*
* @param node The node to check
* @param schema The schema to check against
* @returns True if the node is a list node, false otherwise
*/
export function isList(node: Node, schema: Schema) {
return (
node.type === schema.nodes.bullet_list ||
node.type === schema.nodes.ordered_list ||
node.type === schema.nodes.checkbox_list
);
}