Update to TS 3.0 insiders
This commit is contained in:
parent
b6902fd662
commit
3ea1e53bbd
8 changed files with 19 additions and 20 deletions
|
@ -131,7 +131,7 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
},
|
||||
doSignatureHelp(document: TextDocument, position: Position): SignatureHelp | null {
|
||||
updateCurrentTextDocument(document);
|
||||
let signHelp = jsLanguageService.getSignatureHelpItems(FILE_NAME, currentTextDocument.offsetAt(position));
|
||||
let signHelp = jsLanguageService.getSignatureHelpItems(FILE_NAME, currentTextDocument.offsetAt(position), undefined);
|
||||
if (signHelp) {
|
||||
let ret: SignatureHelp = {
|
||||
activeSignature: signHelp.selectedItemIndex,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.0.1",
|
||||
"description": "Dependencies shared by all extensions",
|
||||
"dependencies": {
|
||||
"typescript": "2.9.2"
|
||||
"typescript": "3.0.0-insiders.20180706"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node ./postinstall"
|
||||
|
|
|
@ -115,7 +115,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider
|
|||
}
|
||||
|
||||
// TS 3.0+ provides a span for just the symbol
|
||||
if ((item as any).nameSpan) {
|
||||
if (item.nameSpan) {
|
||||
return typeConverters.Range.fromTextSpan((item as any).nameSpan);
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ export class UpdateImportsOnFileRenameHandler {
|
|||
const isDirectoryRename = fs.lstatSync(newFile).isDirectory();
|
||||
await this.fileConfigurationManager.ensureConfigurationForDocument(document, undefined);
|
||||
|
||||
const args: Proto.GetEditsForFileRenameRequestArgs = {
|
||||
const args: Proto.GetEditsForFileRenameRequestArgs & { file: string } = {
|
||||
file: targetResource,
|
||||
oldFilePath: oldFile,
|
||||
newFilePath: newFile,
|
||||
|
|
|
@ -286,8 +286,7 @@ export default class TypeScriptServiceClientHost {
|
|||
if (diagnostic.code) {
|
||||
converted.code = diagnostic.code;
|
||||
}
|
||||
// TODO: requires TS 3.0
|
||||
const relatedInformation = (diagnostic as any).relatedInformation;
|
||||
const relatedInformation = diagnostic.relatedInformation;
|
||||
if (relatedInformation) {
|
||||
converted.relatedInformation = relatedInformation.map((info: any) => {
|
||||
let span = info.span;
|
||||
|
|
|
@ -11,11 +11,6 @@ import { TypeScriptServiceConfiguration } from './utils/configuration';
|
|||
import Logger from './utils/logger';
|
||||
import BufferSyncSupport from './features/bufferSyncSupport';
|
||||
|
||||
declare module './protocol' {
|
||||
export type JsxClosingTagRequestArgs = any;
|
||||
export type JsxClosingTagResponse = any;
|
||||
}
|
||||
|
||||
export interface ITypeScriptServiceClient {
|
||||
/**
|
||||
* Convert a resource (VS Code) to a normalized path (TypeScript).
|
||||
|
|
|
@ -72,13 +72,18 @@ export function markdownDocumentation(
|
|||
|
||||
export function addMarkdownDocumentation(
|
||||
out: MarkdownString,
|
||||
documentation: Proto.SymbolDisplayPart[],
|
||||
tags: Proto.JSDocTagInfo[]
|
||||
documentation: Proto.SymbolDisplayPart[] | undefined,
|
||||
tags: Proto.JSDocTagInfo[] | undefined
|
||||
): MarkdownString {
|
||||
out.appendMarkdown(plain(documentation));
|
||||
const tagsPreview = tagsMarkdownPreview(tags);
|
||||
if (tagsPreview) {
|
||||
out.appendMarkdown('\n\n' + tagsPreview);
|
||||
if (documentation) {
|
||||
out.appendMarkdown(plain(documentation));
|
||||
}
|
||||
|
||||
if (tags) {
|
||||
const tagsPreview = tagsMarkdownPreview(tags);
|
||||
if (tagsPreview) {
|
||||
out.appendMarkdown('\n\n' + tagsPreview);
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
typescript@2.9.2:
|
||||
version "2.9.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
|
||||
typescript@3.0.0-insiders.20180706:
|
||||
version "3.0.0-insiders.20180706"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-insiders.20180706.tgz#684c6c8ca1eefb11e79b6c072a92046ffd75184e"
|
||||
|
|
Loading…
Reference in a new issue