import { core , list , nullable } from 'nexus' ; export function withTypeArguments ( t ) { t . list . field ( 'typeArguments' , { type : nullable ( 'Node' ) } ) ; } export function hasTypeParameters ( t ) { t . field ( 'typeParameters' , { type : nullable ( list ( 'TypeParameterDeclaration' ) ) , } ) ; } export function signatureDeclarationBase ( t ) { hasTypeParameters ( t ) ; t . field ( 'nameText' , { type : nullable ( 'String' ) , resolve : ( root ) => ( root . name ? String ( root . name . escapedText ) : null ) , } ) ; t . field ( 'parameters' , { type : list ( 'ParameterDeclaration' ) } ) ; t . field ( 'type' , { type : nullable ( 'Node' ) } ) ; } export function functionLikeDeclaration ( t ) { signatureDeclarationBase ( t ) ; t . implements ( 'MaybeOptional' ) ; t . field ( 'asteriskToken' , { type : nullable ( 'Token' ) } ) ; t . field ( 'exclamationToken' , { type : nullable ( 'Token' ) } ) ; } export function nodeType ( t ) { t . implements ( 'Node' ) ; }