import type { GraphQLScalarType } from "graphql"; export declare namespace Scalar { interface Options { /** * A function that transforms the JSON serialized value into its parsed value. * * @example * * ```ts * new Scalar({ * parse: (dateString) => new Date(dateString), * }); * ``` */ parse(serializedValue: TSerialized): NoInfer; /** * A function that transforms the parsed value into its JSON serialized value. * * @example * * ```ts * new Scalar({ * serialize: (date) => date.toISOString(), * }); * ``` */ serialize(parsedValue: TParsed): NoInfer; /** * A [predicate function](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) that determines whether the value * is the parsed value. Return `true` when the value is the parsed value. * * @defaultValue * Function that returns `true` when the value is a non-null object type. * * @example * * ```ts * new Scalar({ * is: (value) => value instanceof Date, * }); * ``` */ is?(value: TSerialized | TParsed): boolean; } } export declare class Scalar { private options; static fromGraphQLScalarType(scalarType: GraphQLScalarType, options?: Pick, NoInfer>, "is">): Scalar; constructor(options: Scalar.Options); parse(value: TSerialized): TParsed; serialize(value: TParsed): TSerialized; coerceToParsed(value: TSerialized | TParsed): TParsed; coerceToSerialized(value: TSerialized | TParsed): TSerialized; is(value: TSerialized | TParsed): value is TParsed; } //# sourceMappingURL=Scalar.d.cts.map