@typespec/compiler
Version:
TypeSpec Compiler Preview
23 lines • 1.06 kB
TypeScript
import { TextDocument } from "vscode-languageserver-textdocument";
import { Diagnostic } from "vscode-languageserver/node.js";
import { IdentifierNode } from "../core/types.js";
import { Server, ServerHost } from "../server/index.js";
import { TestHostOptions } from "./test-host.js";
import { TestFileSystem } from "./types.js";
export interface TestServerHost extends ServerHost, TestFileSystem {
server: Server;
logMessages: readonly string[];
getOpenDocument(path: string): TextDocument | undefined;
addOrUpdateDocument(path: string, content: string): TextDocument;
openDocument(path: string): TextDocument;
getDiagnostics(path: string): readonly Diagnostic[];
getURL(path: string): string;
}
export declare function createTestServerHost(options?: TestHostOptions & {
workspaceDir?: string;
}): Promise<TestServerHost>;
/**
* Extracts all identifiers marked with trailing empty comments from source
*/
export declare function getTestIdentifiers(source: string): IdentifierNode[];
//# sourceMappingURL=test-server-host.d.ts.map