UNPKG

1.1 kBTypeScriptView Raw
1import { InlineSelection, FragmentOrSelection, Typename, Type, Leaf } from "./intermediates";
2import { Map } from "immutable";
3export declare type Fragments = {
4 [fragment: string]: InlineSelection;
5};
6declare type Curry<T, U, V> = (t: T) => (u: U) => V;
7export declare type ExtendedFieldType = Type<ExtendedSelection | Leaf | Typename>;
8export declare type ExtendedField = {
9 type: ExtendedFieldType;
10 optional: boolean;
11};
12export declare type __typename = string;
13export declare type fieldName = string;
14export declare type ByTypename<T> = Map<__typename, T>;
15export declare type ExtendedFields = Map<fieldName, ExtendedField>;
16export declare type ExtendedSelection = {
17 kind: "InlineSelection";
18 fields: ByTypename<ExtendedFields>;
19};
20export declare const ExtendedSelection: (inlineSelection: InlineSelection, fragments: Fragments) => ExtendedSelection;
21export declare const ExtendedFragmentOrSelection: Curry<Fragments, FragmentOrSelection, ExtendedSelection>;
22export declare const extendedSelectionsAreEqual: (lhs: ExtendedSelection, rhs: ExtendedSelection) => boolean;
23export {};