import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; import { RootTypingDef } from './_types'; export interface ScalarBase extends Pick, 'description' | 'serialize' | 'parseValue' | 'parseLiteral'> { } export interface ScalarConfig { /** * Any deprecation info for this scalar type */ deprecation?: string; /** * Adds this type as a method on the Object/Interface definition blocks */ asNexusMethod?: string; /** * Root type information for this type */ rootTyping?: RootTypingDef; } export interface NexusScalarTypeConfig extends ScalarBase, ScalarConfig { /** * The name of the scalar type */ name: T; } export declare class NexusScalarTypeDef { readonly name: TypeName; protected config: NexusScalarTypeConfig; constructor(name: TypeName, config: NexusScalarTypeConfig); get value(): NexusScalarTypeConfig; } export declare type NexusScalarExtensions = { nexus: { asNexusMethod?: string; rootTyping?: RootTypingDef; }; }; export declare function scalarType(options: NexusScalarTypeConfig): NexusScalarTypeDef; export declare function asNexusMethod(scalar: T, methodName: string, rootTyping?: RootTypingDef): T;