1 | import * as t from '@babel/types';
|
2 | import { AST, Fragment, Operation } from 'graphql-tool-utilities';
|
3 | import { EnumFormat } from '../../types';
|
4 | export interface Options {
|
5 | schemaTypesPath: string;
|
6 | enumFormat?: EnumFormat;
|
7 | addTypename?: boolean;
|
8 | }
|
9 | export interface OperationOptions extends Options {
|
10 | partial?: boolean;
|
11 | }
|
12 | export declare type NamespaceExportableType = t.TSInterfaceDeclaration;
|
13 | export declare class FileContext {
|
14 | private path;
|
15 | private options;
|
16 | readonly schemaImports: t.ImportDeclaration | null;
|
17 | private importedTypes;
|
18 | constructor(path: string, options: Options);
|
19 | import(type: string): void;
|
20 | }
|
21 | export declare class OperationContext {
|
22 | operation: Operation | Fragment;
|
23 | ast: AST;
|
24 | options: OperationOptions;
|
25 | file: FileContext;
|
26 | readonly typeName: string;
|
27 | readonly namespace: t.TSModuleDeclaration | null;
|
28 | readonly exported: t.TSInterfaceDeclaration[];
|
29 | private exportedTypes;
|
30 | constructor(operation: Operation | Fragment, ast: AST, options: OperationOptions, file: FileContext);
|
31 | export(type: NamespaceExportableType): t.TSTypeReference;
|
32 | }
|