mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Update to TS 3.0 insiders
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user