/** * The type of a source file */ import { Source } from 'graphql'; export declare enum SourceType { /** * A graphql schema definition file defining types */ GRAPHQLS = 0, /** * A metadata file in JSON format */ JSON = 1, /** * A metadata file in YAML format */ YAML = 2 } /** * A source file in a project */ export declare class ProjectSource { readonly name: string; readonly body: string; readonly filePath: string | undefined; /** * The file type as derived from the name */ readonly type: SourceType; constructor(name: string, body: string, filePath?: string | undefined); static fromConfig(config: SourceConfig | ProjectSource): ProjectSource; toGraphQLSource(): Source; static fromGraphQLSource(source: Source): ProjectSource | undefined; } export interface SourceConfig { readonly name: string; readonly body: string; } export type SourceLike = SourceConfig | ProjectSource;