MCPcopy Create free account
hub / github.com/KaTeX/KaTeX / assertSymbolNodeType

Function assertSymbolNodeType

src/parseNode.ts:26–34  ·  view source on GitHub ↗
(node: AnyParseNode)

Source from the content-addressed store, hash-verified

24 * returns null.
25 */
26export function assertSymbolNodeType(node: AnyParseNode): SymbolParseNode {
27 const typedNode = checkSymbolNodeType(node);
28 if (!typedNode) {
29 throw new Error(
30 `Expected node of symbol group type, but got ` +
31 (node ? `node of type ${node.type}` : String(node)));
32 }
33 return typedNode;
34}
35
36/**
37 * Returns the node more strictly typed if it is of the given type. Otherwise,

Callers 3

handlerFunction · 0.90
parseCDFunction · 0.90
smash.tsFile · 0.90

Calls 1

checkSymbolNodeTypeFunction · 0.85

Tested by

no test coverage detected