import "@prisma-next/psl-parser/format"; import { Connection } from "vscode-languageserver"; import { DocumentAst, ParseDiagnostic, Range, SourceFile } from "@prisma-next/psl-parser/syntax"; import "@prisma-next/framework-components/authoring"; import { SymbolTable } from "@prisma-next/psl-parser"; import "@prisma-next/psl-parser/interpret"; import "@prisma-next/config/config-types"; //#region src/diagnostic-mapping.d.ts declare const ParseDiagnosticSeverity: { readonly Error: 1; readonly Warning: 2; readonly Information: 3; readonly Hint: 4; }; interface LspDiagnostic { readonly range: Range; readonly message: string; readonly code: string; readonly severity: number; } declare function mapParseDiagnostics(diagnostics: readonly ParseDiagnostic[]): readonly LspDiagnostic[]; //#endregion //#region src/project-artifacts.d.ts interface DocumentArtifacts { readonly document: DocumentAst; readonly sourceFile: SourceFile; readonly diagnostics: readonly LspDiagnostic[]; /** * Interpreter findings, computed on first pull at diagnostics-assembly time * and memoized on this artifacts instance — the store drops the instance on * `documentChanged` / `documentClosed`, which is the invalidation. */ interpretDiagnostics(): readonly LspDiagnostic[]; } //#endregion //#region src/server.d.ts interface LanguageServer { dispose(): void; /** * Exposed for future features (completion, semantic tokens); nothing consumes * them yet. */ getDocumentAst(uri: string): DocumentArtifacts | undefined; getProjectSymbolTable(uri: string): SymbolTable | undefined; } declare function createServer(connection: Connection): LanguageServer; //#endregion //#region src/start-server.d.ts declare function startServer(): LanguageServer; //#endregion export { type LanguageServer, type LspDiagnostic, ParseDiagnosticSeverity, createServer, mapParseDiagnostics, startServer }; //# sourceMappingURL=index.d.mts.map