import { Response, RequestType, EventType } from './messages'; /** * The shutdown command is send from the client to the worker. * It is send once when the client descides to shutdown the * worker. The only event that is send after a shudown request * is the exit event. */ export declare namespace ShutdownRequest { let type: RequestType; } export interface ShutdownArguments { } export interface ShutdownResponse extends Response { } /** * The exit event is send from the client to the worker to * ask the worker to exit its process. */ export declare namespace ExitEvent { let type: EventType; } export interface ExitArguments { } /** * The initialize command is send from the client to the worker. * It is send once as the first command after starting up the * worker. */ export interface Capabilities { validation?: boolean; } export declare namespace InitializeRequest { let type: RequestType; } export interface InitializeArguments { rootFolder: string; capabilities: Capabilities; } export interface InitializeResponse extends Response { body?: { capabilities: Capabilities; }; } /** * The configuration change event is send from the client to the worker * when the client's configuration has changed. The event contains * the changed configuration as defined by the language worker statically * in it's extension manifest. */ export declare namespace DidChangeConfigurationEvent { let type: EventType; } export interface DidChangeConfigurationArguments { settings: any; } export declare namespace MessageSeverity { let Error: number; let Warning: number; let Info: number; } /** * The show message event is send from a worker to a client to ask * the client to display a particular message in the user interface */ export declare namespace ShowMessageEvent { let type: EventType; } export interface ShowMessageArguments { severity: number; message: string; } export declare namespace LogMessageEvent { let type: EventType; } export interface LogMessageArguments { severity: number; message: string; } export interface DocumentIdentifier { /** * A URI identifying the resource in the client. */ uri: string; } /** * The document event is send from the client to the worker to signal * newly opened, changed and closed documents. */ export declare namespace DidOpenDocumentEvent { let type: EventType; } export interface DidOpenDocumentArguments extends DocumentIdentifier { /** * The content of the opened document. */ content: string; } export declare namespace DidChangeDocumentEvent { let type: EventType; } export interface DidChangeDocumentArguments extends DocumentIdentifier { /** * The new content of the document. */ content: string; } export declare namespace DidCloseDocumentEvent { let type: EventType; } export interface DidCloseDocumentArguments extends DocumentIdentifier { } /** */ export declare namespace DidChangeFilesEvent { let type: EventType; } export declare namespace FileChangeType { let Created: number; let Changed: number; let Deleted: number; } export interface FileEvent { path: string; type: number; } export interface DidChangeFilesArguments { changes: FileEvent[]; } /** * Diagnostics events are send from the worker to clients to signal * results of validation runs */ export declare namespace PublishDiagnosticsEvent { let type: EventType; } export interface PublishDiagnosticsArguments { /** * The URI for which diagnostic information is reported. */ uri: string; /** * An array of diagnostic information items. */ diagnostics: Diagnostic[]; } export interface PublishDiagnosticsEvent { body: PublishDiagnosticsArguments; } /** * Position in document expressed as (zero-based) line and character offset. */ export interface Position { /** * Line Position in a document (zero-based) */ line: number; /** * Character offset on a line in a document (zero-based) */ character: number; } export declare namespace Severity { let Error: number; let Warning: number; let Info: number; } /** * Item of diagnostic information found in a DiagnosticEvent message. */ export interface Diagnostic { /** * Starting position at which text appies. */ start: Position; /** * The last position at which the text applies. Can be omitted. */ end?: Position; /** * The diagnostic's severity. Can be omitted. If omitted it is up to the * client to interpret diagnostics as error, warning or info. */ severity?: number; /** * The diagnostic code. Can be omitted. */ code?: string; /** * The diagnostic message. */ message: string; }