/// import { EventEmitter } from 'events'; import { Operation, Fragment } from 'graphql-tool-utilities/ast'; export interface Options { graphQLFiles: string; schemaPath: string; addTypename: boolean; } export interface RunOptions { watch?: boolean; } export interface Build { documentPath: string; definitionPath: string; operations: Operation[]; fragments: Fragment[]; } export declare class Builder extends EventEmitter { watching: boolean; private globs; private schemaPath; private schema; private options; private documentCache; constructor({graphQLFiles, schemaPath, ...options}: Options); once(event: 'error', handler: (error: Error) => void): this; once(event: 'build', handler: (built: Build) => void): this; once(event: 'start', handler: () => void): this; once(event: 'end', handler: () => void): this; on(event: 'error', handler: (error: Error) => void): this; on(event: 'build', handler: (built: Build) => void): this; on(event: 'start', handler: () => void): this; on(event: 'end', handler: () => void): this; emit(event: 'error', error: Error): boolean; emit(event: 'build', built: Build): boolean; emit(event: 'start'): boolean; emit(event: 'end'): boolean; run({watch: watchGlobs}?: { watch?: boolean; }): Promise; private generate(); private updateSchema(); private updateDocumentForFile(file); private removeDocumentForFile(file); }