( input: ASTNode, )
| 80 | throw new Error(`Expected InterfaceTypeDefinitionNode. Got ${input.kind}`); |
| 81 | } |
| 82 | export function assertUnionTypeDefinitionNode( |
| 83 | input: ASTNode, |
| 84 | ): asserts input is UnionTypeDefinitionNode { |
| 85 | if (input.kind === 'UnionTypeDefinition') { |
| 86 | return; |
| 87 | } |
| 88 | throw new Error(`Expected InterfaceTypeDefinitionNode. Got ${input.kind}`); |
| 89 | } |
| 90 | export function assertNamedTypeNode(input: ASTNode): asserts input is NamedTypeNode { |
| 91 | if (input.kind === 'NamedType') { |
| 92 | return; |