import * as code from 'vscode'; import * as ls from 'vscode-languageserver-protocol'; import ProtocolCompletionItem from './protocolCompletionItem'; export interface Converter { asUri(value: string): code.Uri; asDocumentSelector(value: ls.DocumentSelector): code.DocumentSelector; asPosition(value: undefined | null): undefined; asPosition(value: ls.Position): code.Position; asPosition(value: ls.Position | undefined | null): code.Position | undefined; asRange(value: undefined | null): undefined; asRange(value: ls.Range): code.Range; asRange(value: ls.Range | undefined | null): code.Range | undefined; asRanges(items: ReadonlyArray, token?: code.CancellationToken): Promise; asDiagnostic(diagnostic: ls.Diagnostic): code.Diagnostic; asDiagnostics(diagnostics: ls.Diagnostic[], token?: code.CancellationToken): Promise; asDiagnosticSeverity(value: number | undefined | null): code.DiagnosticSeverity; asDiagnosticTag(tag: ls.DiagnosticTag): code.DiagnosticTag | undefined; asHover(hover: undefined | null): undefined; asHover(hover: ls.Hover): code.Hover; asHover(hover: ls.Hover | undefined | null): code.Hover | undefined; asCompletionResult(value: undefined | null, allCommitCharacters?: string[], token?: code.CancellationToken): Promise; asCompletionResult(value: ls.CompletionList, allCommitCharacters?: string[], token?: code.CancellationToken): Promise; asCompletionResult(value: ls.CompletionItem[], allCommitCharacters?: string[], token?: code.CancellationToken): Promise; asCompletionResult(value: ls.CompletionItem[] | ls.CompletionList | undefined | null, allCommitCharacters?: string[], token?: code.CancellationToken): Promise; asCompletionItem(item: ls.CompletionItem, defaultCommitCharacters?: string[]): ProtocolCompletionItem; asTextEdit(edit: undefined | null): undefined; asTextEdit(edit: ls.TextEdit): code.TextEdit; asTextEdit(edit: ls.TextEdit | undefined | null): code.TextEdit | undefined; asTextEdits(items: undefined | null, token?: code.CancellationToken): Promise; asTextEdits(items: ls.TextEdit[], token?: code.CancellationToken): Promise; asTextEdits(items: ls.TextEdit[] | undefined | null, token?: code.CancellationToken): Promise; asSignatureHelp(item: undefined | null, token?: code.CancellationToken): Promise; asSignatureHelp(item: ls.SignatureHelp, token?: code.CancellationToken): Promise; asSignatureHelp(item: ls.SignatureHelp | undefined | null, token?: code.CancellationToken): Promise; asSignatureInformation(item: ls.SignatureInformation, token?: code.CancellationToken): Promise; asSignatureInformations(items: ls.SignatureInformation[], token?: code.CancellationToken): Promise; asParameterInformation(item: ls.ParameterInformation): code.ParameterInformation; asParameterInformations(item: ls.ParameterInformation[], token?: code.CancellationToken): Promise; asLocation(item: ls.Location): code.Location; asLocation(item: undefined | null): undefined; asLocation(item: ls.Location | undefined | null): code.Location | undefined; asDeclarationResult(item: undefined | null, token?: code.CancellationToken): Promise; asDeclarationResult(item: ls.Declaration, token?: code.CancellationToken): Promise; asDeclarationResult(item: ls.DeclarationLink[], token?: code.CancellationToken): Promise; asDeclarationResult(item: ls.Declaration | ls.DeclarationLink[] | undefined | null, token?: code.CancellationToken): Promise; asDefinitionResult(item: undefined | null, token?: code.CancellationToken): Promise; asDefinitionResult(item: ls.Definition, token?: code.CancellationToken): Promise; asDefinitionResult(item: ls.DefinitionLink[], token?: code.CancellationToken): Promise; asDefinitionResult(item: ls.Definition | ls.DefinitionLink[] | undefined | null, token?: code.CancellationToken): Promise; asReferences(values: undefined | null, token?: code.CancellationToken): Promise; asReferences(values: ls.Location[], token?: code.CancellationToken): Promise; asReferences(values: ls.Location[] | undefined | null, token?: code.CancellationToken): Promise; asDocumentHighlightKind(item: number): code.DocumentHighlightKind; asDocumentHighlight(item: ls.DocumentHighlight): code.DocumentHighlight; asDocumentHighlights(values: undefined | null, token?: code.CancellationToken): Promise; asDocumentHighlights(values: ls.DocumentHighlight[], token?: code.CancellationToken): Promise; asDocumentHighlights(values: ls.DocumentHighlight[] | undefined | null, token?: code.CancellationToken): Promise; asSymbolKind(item: ls.SymbolKind): code.SymbolKind; asSymbolTag(item: ls.SymbolTag): code.SymbolTag | undefined; asSymbolTags(items: undefined | null): undefined; asSymbolTags(items: ReadonlyArray): code.SymbolTag[]; asSymbolTags(items: ReadonlyArray | undefined | null): code.SymbolTag[] | undefined; asSymbolInformation(item: ls.SymbolInformation | ls.WorkspaceSymbol): code.SymbolInformation; asSymbolInformations(values: undefined | null, token?: code.CancellationToken): Promise; asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[], token?: code.CancellationToken): Promise; asSymbolInformations(values: ls.SymbolInformation[] | ls.WorkspaceSymbol[] | undefined | null, token?: code.CancellationToken): Promise; asDocumentSymbol(value: ls.DocumentSymbol, token?: code.CancellationToken): code.DocumentSymbol; asDocumentSymbols(value: undefined | null, token?: code.CancellationToken): Promise; asDocumentSymbols(value: ls.DocumentSymbol[], token?: code.CancellationToken): Promise; asDocumentSymbols(value: ls.DocumentSymbol[] | undefined | null, token?: code.CancellationToken): Promise; asCommand(item: ls.Command): code.Command; asCommands(items: undefined | null, token?: code.CancellationToken): Promise; asCommands(items: ls.Command[], token?: code.CancellationToken): Promise; asCommands(items: ls.Command[] | undefined | null, token?: code.CancellationToken): Promise; asCodeAction(item: undefined | null, token?: code.CancellationToken): Promise; asCodeAction(item: ls.CodeAction, token?: code.CancellationToken): Promise; asCodeAction(item: ls.CodeAction | undefined | null, token?: code.CancellationToken): Promise; asCodeActionKind(item: null | undefined): undefined; asCodeActionKind(item: ls.CodeActionKind): code.CodeActionKind; asCodeActionKind(item: ls.CodeActionKind | null | undefined): code.CodeActionKind | undefined; asCodeActionKinds(item: null | undefined): undefined; asCodeActionKinds(items: ls.CodeActionKind[]): code.CodeActionKind[]; asCodeActionKinds(item: ls.CodeActionKind[] | null | undefined): code.CodeActionKind[] | undefined; asCodeActionResult(items: (ls.Command | ls.CodeAction)[], token?: code.CancellationToken): Promise<(code.Command | code.CodeAction)[]>; asCodeLens(item: ls.CodeLens): code.CodeLens; asCodeLens(item: undefined | null): undefined; asCodeLens(item: ls.CodeLens | undefined | null): code.CodeLens | undefined; asCodeLenses(items: undefined | null, token?: code.CancellationToken): Promise; asCodeLenses(items: ls.CodeLens[], token?: code.CancellationToken): Promise; asCodeLenses(items: ls.CodeLens[] | undefined | null, token?: code.CancellationToken): Promise; asWorkspaceEdit(item: undefined | null, token?: code.CancellationToken): Promise; asWorkspaceEdit(item: ls.WorkspaceEdit, token?: code.CancellationToken): Promise; asWorkspaceEdit(item: ls.WorkspaceEdit | undefined | null, token?: code.CancellationToken): Promise; asDocumentLink(item: ls.DocumentLink): code.DocumentLink; asDocumentLinks(items: undefined | null, token?: code.CancellationToken): Promise; asDocumentLinks(items: ls.DocumentLink[], token?: code.CancellationToken): Promise; asDocumentLinks(items: ls.DocumentLink[] | undefined | null, token?: code.CancellationToken): Promise; asColor(color: ls.Color): code.Color; asColorInformation(ci: ls.ColorInformation): code.ColorInformation; asColorInformations(colorPresentations: undefined | null, token?: code.CancellationToken): Promise; asColorInformations(colorPresentations: ls.ColorInformation[], token?: code.CancellationToken): Promise; asColorInformations(colorInformation: ls.ColorInformation[] | undefined | null, token?: code.CancellationToken): Promise; asColorPresentation(cp: ls.ColorPresentation): code.ColorPresentation; asColorPresentations(colorPresentations: undefined | null, token?: code.CancellationToken): Promise; asColorPresentations(colorPresentations: ls.ColorPresentation[], token?: code.CancellationToken): Promise; asColorPresentations(colorPresentations: ls.ColorPresentation[] | undefined | null, token?: code.CancellationToken): Promise; asFoldingRangeKind(kind: string | undefined): code.FoldingRangeKind | undefined; asFoldingRange(r: ls.FoldingRange): code.FoldingRange; asFoldingRanges(foldingRanges: undefined | null, token?: code.CancellationToken): Promise; asFoldingRanges(foldingRanges: ls.FoldingRange[], token?: code.CancellationToken): Promise; asFoldingRanges(foldingRanges: ls.FoldingRange[] | undefined | null, token?: code.CancellationToken): Promise; asSelectionRange(selectionRange: ls.SelectionRange): code.SelectionRange; asSelectionRanges(selectionRanges: undefined | null, token?: code.CancellationToken): Promise; asSelectionRanges(selectionRanges: ls.SelectionRange[], token?: code.CancellationToken): Promise; asSelectionRanges(selectionRanges: ls.SelectionRange[] | undefined | null, token?: code.CancellationToken): Promise; asInlineValue(value: ls.InlineValue): code.InlineValue; asInlineValues(values: undefined | null, token?: code.CancellationToken): Promise; asInlineValues(values: ls.InlineValue[], token?: code.CancellationToken): Promise; asInlineValues(values: ls.InlineValue[] | undefined | null, token?: code.CancellationToken): Promise; asInlayHint(value: ls.InlayHint, token?: code.CancellationToken): Promise; asInlayHints(values: undefined | null, token?: code.CancellationToken): Promise; asInlayHints(values: ls.InlayHint[], token?: code.CancellationToken): Promise; asInlayHints(values: ls.InlayHint[] | undefined | null, token?: code.CancellationToken): Promise; asSemanticTokensLegend(value: ls.SemanticTokensLegend): code.SemanticTokensLegend; asSemanticTokens(value: undefined | null, token?: code.CancellationToken): Promise; asSemanticTokens(value: ls.SemanticTokens, token?: code.CancellationToken): Promise; asSemanticTokens(value: ls.SemanticTokens | undefined | null, token?: code.CancellationToken): Promise; asSemanticTokensEdit(value: ls.SemanticTokensEdit): code.SemanticTokensEdit; asSemanticTokensEdits(value: undefined | null, token?: code.CancellationToken): Promise; asSemanticTokensEdits(value: ls.SemanticTokensDelta, token?: code.CancellationToken): Promise; asSemanticTokensEdits(value: ls.SemanticTokensDelta | undefined | null, token?: code.CancellationToken): Promise; asCallHierarchyItem(item: null): undefined; asCallHierarchyItem(item: ls.CallHierarchyItem): code.CallHierarchyItem; asCallHierarchyItem(item: ls.CallHierarchyItem | null): code.CallHierarchyItem | undefined; asCallHierarchyItems(items: null, token?: code.CancellationToken): Promise; asCallHierarchyItems(items: ls.CallHierarchyItem[], token?: code.CancellationToken): Promise; asCallHierarchyItems(items: ls.CallHierarchyItem[] | null, token?: code.CancellationToken): Promise; asCallHierarchyIncomingCall(item: ls.CallHierarchyIncomingCall, token?: code.CancellationToken): Promise; asCallHierarchyIncomingCalls(items: null, token?: code.CancellationToken): Promise; asCallHierarchyIncomingCalls(items: ReadonlyArray, token?: code.CancellationToken): Promise; asCallHierarchyIncomingCalls(items: ReadonlyArray | null, token?: code.CancellationToken): Promise; asCallHierarchyOutgoingCall(item: ls.CallHierarchyOutgoingCall, token?: code.CancellationToken): Promise; asCallHierarchyOutgoingCalls(items: null, token?: code.CancellationToken): Promise; asCallHierarchyOutgoingCalls(items: ReadonlyArray, token?: code.CancellationToken): Promise; asCallHierarchyOutgoingCalls(items: ReadonlyArray | null, token?: code.CancellationToken): Promise; asLinkedEditingRanges(value: null | undefined, token?: code.CancellationToken): Promise; asLinkedEditingRanges(value: ls.LinkedEditingRanges, token?: code.CancellationToken): Promise; asLinkedEditingRanges(value: ls.LinkedEditingRanges | null | undefined, token?: code.CancellationToken): Promise; asTypeHierarchyItem(item: null): undefined; asTypeHierarchyItem(item: ls.TypeHierarchyItem): code.TypeHierarchyItem; asTypeHierarchyItem(item: ls.TypeHierarchyItem | null): code.TypeHierarchyItem | undefined; asTypeHierarchyItems(items: null, token?: code.CancellationToken): Promise; asTypeHierarchyItems(items: ls.TypeHierarchyItem[], token?: code.CancellationToken): Promise; asTypeHierarchyItems(items: ls.TypeHierarchyItem[] | null, token?: code.CancellationToken): Promise; asGlobPattern(pattern: ls.GlobPattern): code.GlobPattern | undefined; asInlineCompletionResult(value: undefined | null, token?: code.CancellationToken): Promise; asInlineCompletionResult(value: ls.InlineCompletionList, token?: code.CancellationToken): Promise; asInlineCompletionResult(value: ls.InlineCompletionItem[], token?: code.CancellationToken): Promise; asInlineCompletionResult(value: ls.InlineCompletionItem[] | ls.InlineCompletionList | undefined | null, token?: code.CancellationToken): Promise; asInlineCompletionItem(item: ls.InlineCompletionItem): code.InlineCompletionItem; } export interface URIConverter { (value: string): code.Uri; } export declare function createConverter(uriConverter: URIConverter | undefined, trustMarkdown: boolean | { readonly enabledCommands: readonly string[]; }, supportHtml: boolean): Converter;