vscode-typescript-languageservice
Advanced tools
Comparing version 0.26.10 to 0.26.11
@@ -23,3 +23,3 @@ import * as vscode from 'vscode-languageserver'; | ||
doComplete: (uri: string, position: vscode.Position, options?: ts.GetCompletionsAtPositionOptions | undefined) => Promise<vscode.CompletionItem[]>; | ||
doCompletionResolve: (item: vscode.CompletionItem, newOffset?: number | undefined) => Promise<vscode.CompletionItem>; | ||
doCompletionResolve: (item: vscode.CompletionItem, newPosition?: vscode.Position | undefined) => Promise<vscode.CompletionItem>; | ||
doHover: (uri: string, position: vscode.Position, documentOnly?: boolean) => vscode.Hover | undefined; | ||
@@ -26,0 +26,0 @@ doFormatting: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined) => Promise<vscode.TextEdit[]>; |
@@ -5,2 +5,2 @@ import type * as ts from 'typescript'; | ||
import type { LanguageServiceHost } from '../'; | ||
export declare function register(languageService: ts.LanguageService, getTextDocument: (uri: string) => TextDocument | undefined, getTextDocument2: (uri: string) => TextDocument | undefined, host: LanguageServiceHost): (item: vscode.CompletionItem, newOffset?: number | undefined) => Promise<vscode.CompletionItem>; | ||
export declare function register(languageService: ts.LanguageService, getTextDocument: (uri: string) => TextDocument | undefined, getTextDocument2: (uri: string) => TextDocument | undefined, host: LanguageServiceHost): (item: vscode.CompletionItem, newPosition?: vscode.Position | undefined) => Promise<vscode.CompletionItem>; |
@@ -10,10 +10,13 @@ "use strict"; | ||
function register(languageService, getTextDocument, getTextDocument2, host) { | ||
return async (item, newOffset) => { | ||
return async (item, newPosition) => { | ||
var _a, _b, _c, _d; | ||
const data = item.data; | ||
const fileName = data.fileName; | ||
const offset = newOffset !== null && newOffset !== void 0 ? newOffset : data.offset; | ||
const name = data.name; | ||
const source = data.source; | ||
let offset = data.offset; | ||
const document = getTextDocument(data.uri); | ||
if (newPosition && document) { | ||
offset = document.offsetAt(newPosition); | ||
} | ||
const [formatOptions, preferences] = document ? await Promise.all([ | ||
@@ -20,0 +23,0 @@ (_b = (_a = host.getFormatOptions) === null || _a === void 0 ? void 0 : _a.call(host, document)) !== null && _b !== void 0 ? _b : {}, |
{ | ||
"name": "vscode-typescript-languageservice", | ||
"version": "0.26.10", | ||
"version": "0.26.11", | ||
"main": "out/index.js", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/shared": "^0.26.10", | ||
"@volar/shared": "^0.26.11", | ||
"upath": "^2.0.1", | ||
@@ -25,3 +25,3 @@ "vscode-languageserver": "^8.0.0-next.1", | ||
}, | ||
"gitHead": "3ce471a464906197af53ff0c48ea901d4a58358e" | ||
"gitHead": "85f19387725d4a8951626a09e6361ac9d5b67c23" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112481
2199
Updated@volar/shared@^0.26.11