import type { SerializableError } from "@0x706b/convenience-ts/Error"; import type * as T from "@effect-ts/core/Effect"; import { FunctionN } from "@effect-ts/core/Function"; import type * as U from "@effect-ts/core/Utils"; import type { ValueNode } from "graphql"; import { Any as _Any } from "ts-toolbelt"; export declare type ScalarSerializeF = ( u: unknown ) => T.Effect, A>; export declare type ScalarParseValueF = ( u: unknown ) => T.Effect, E>; export declare type ScalarParseLiteralF = ( valueNode: ValueNode ) => T.Effect, E>; export interface ScalarFunctions { parseLiteral: ScalarParseLiteralF; parseValue: ScalarParseValueF; serialize: ScalarSerializeF; } export declare type Scalar = { functions: ScalarFunctions; name: Name; }; export declare type ScalarE = Fs extends ScalarFunctions ? E : never; export declare type ScalarA = Fs extends ScalarFunctions ? A : never; export declare type ScalarEnv = _Any.Compute< S extends Scalar ? U.UnionToIntersection< { [k in keyof S["functions"]]: S["functions"][k] extends FunctionN ? Ret extends T.Effect ? unknown extends R ? never : R : never : never; }[keyof S["functions"]] > : never, "flat" >; export declare type SchemaScalars = { [n: string]: Scalar; }; export declare type SchemaScalarsEnv = S extends SchemaScalars ? U.UnionToIntersection< { [k in keyof S]: ScalarEnv; }[keyof S] > : never;