(node: AnyParseNode | null | undefined)
| 23 | * returns null. |
| 24 | */ |
| 25 | export 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, |
no test coverage detected
searching dependent graphs…