MCPcopy Index your code
hub / github.com/KaTeX/KaTeX / assertSymbolNodeType

Function assertSymbolNodeType

src/parseNode.ts:25–33  ·  view source on GitHub ↗
(node: AnyParseNode | null | undefined)

Source from the content-addressed store, hash-verified

23 * returns null.
24 */
25export function assertSymbolNodeType(node: AnyParseNode | null | undefined): SymbolParseNode {
26 const typedNode = checkSymbolNodeType(node);
27 if (!typedNode) {
28 throw new Error(
29 `Expected node of symbol group type, but got ` +
30 (node ? `node of type ${node.type}` : String(node)));
31 }
32 return typedNode;
33}
34
35/**
36 * 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…