UNPKG

1.58 kBTypeScriptView Raw
1import { WorkspaceFolder, NotificationHandler, PublishDiagnosticsParams } from "vscode-languageserver";
2import { QuickPickItem } from "vscode";
3import { GraphQLProject, DocumentUri } from "./project/base";
4import { ApolloConfig } from "./config";
5import { LanguageServerLoadingHandler } from "./loadingHandler";
6import { ServiceID, SchemaTag, ClientIdentity } from "./engine";
7export interface WorkspaceConfig {
8 clientIdentity?: ClientIdentity;
9}
10export declare class GraphQLWorkspace {
11 private LanguageServerLoadingHandler;
12 private config;
13 private _onDiagnostics?;
14 private _onDecorations?;
15 private _onSchemaTags?;
16 private _onConfigFilesFound?;
17 private _projectForFileCache;
18 private projectsByFolderUri;
19 constructor(LanguageServerLoadingHandler: LanguageServerLoadingHandler, config: WorkspaceConfig);
20 onDiagnostics(handler: NotificationHandler<PublishDiagnosticsParams>): void;
21 onDecorations(handler: NotificationHandler<any>): void;
22 onSchemaTags(handler: NotificationHandler<[ServiceID, SchemaTag[]]>): void;
23 onConfigFilesFound(handler: NotificationHandler<ApolloConfig[]>): void;
24 private createProject;
25 addProjectsInFolder(folder: WorkspaceFolder): Promise<void>;
26 reloadService(): void;
27 reloadProjectForConfig(configUri: DocumentUri): Promise<void>;
28 updateSchemaTag(selection: QuickPickItem): void;
29 removeProjectsInFolder(folder: WorkspaceFolder): void;
30 get projects(): GraphQLProject[];
31 projectForFile(uri: DocumentUri): GraphQLProject | undefined;
32}
33//# sourceMappingURL=workspace.d.ts.map
\No newline at end of file