( input: ASTNode, )
| 102 | throw new Error(`Expected ScalarTypeDefinitionNode. Got ${input.kind}`); |
| 103 | } |
| 104 | export function assertInputObjectTypeDefinitionNode( |
| 105 | input: ASTNode, |
| 106 | ): asserts input is InputObjectTypeDefinitionNode { |
| 107 | if (input.kind === 'InputObjectTypeDefinition') { |
| 108 | return; |
| 109 | } |
| 110 | throw new Error(`Expected InputObjectTypeDefinitionNode. Got ${input.kind}`); |
| 111 | } |
| 112 | export function assertListValueNode(input: ASTNode): asserts input is ListValueNode { |
| 113 | if (input.kind === 'ListValue') { |
| 114 | return; |