mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 22:41:31 +01:00
Rename to use standard casing for TypeScript
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, ProviderResult, } from 'vscode';
|
||||
import * as Proto from '../protocol';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange } from '../utils/convert';
|
||||
|
||||
export class ReferencesCodeLens extends CodeLens {
|
||||
@@ -24,7 +24,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider
|
||||
private onDidChangeCodeLensesEmitter = new EventEmitter<void>();
|
||||
|
||||
public constructor(
|
||||
protected client: ITypescriptServiceClient
|
||||
protected client: ITypeScriptServiceClient
|
||||
) { }
|
||||
|
||||
public get onDidChangeCodeLenses(): Event<void> {
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as fs from 'fs';
|
||||
|
||||
import { workspace, TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Disposable } from 'vscode';
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { Delayer } from '../utils/async';
|
||||
import * as languageModeIds from '../utils/languageModeIds';
|
||||
|
||||
@@ -31,7 +31,7 @@ class SyncedBuffer {
|
||||
private readonly document: TextDocument,
|
||||
private readonly filepath: string,
|
||||
private readonly diagnosticRequestor: IDiagnosticRequestor,
|
||||
private readonly client: ITypescriptServiceClient
|
||||
private readonly client: ITypeScriptServiceClient
|
||||
) { }
|
||||
|
||||
public open(): void {
|
||||
@@ -106,7 +106,7 @@ export interface Diagnostics {
|
||||
|
||||
export default class BufferSyncSupport {
|
||||
|
||||
private readonly client: ITypescriptServiceClient;
|
||||
private readonly client: ITypeScriptServiceClient;
|
||||
|
||||
private _validate: boolean;
|
||||
private readonly modeIds: Set<string>;
|
||||
@@ -118,7 +118,7 @@ export default class BufferSyncSupport {
|
||||
private readonly diagnosticDelayer: Delayer<any>;
|
||||
|
||||
constructor(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
modeIds: string[],
|
||||
diagnostics: Diagnostics,
|
||||
validate: boolean
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { vsRangeToTsFileRange } from '../utils/convert';
|
||||
import FormattingConfigurationManager from './formattingConfigurationManager';
|
||||
import { applyCodeAction } from '../utils/codeAction';
|
||||
@@ -21,7 +21,7 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider
|
||||
private _supportedCodeActions?: Thenable<NumberSet>;
|
||||
|
||||
constructor(
|
||||
private readonly client: ITypescriptServiceClient,
|
||||
private readonly client: ITypeScriptServiceClient,
|
||||
private readonly formattingConfigurationManager: FormattingConfigurationManager,
|
||||
mode: string
|
||||
) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, TextEdit, Range, SnippetString, workspace, ProviderResult, CompletionContext, commands, Uri, MarkdownString } from 'vscode';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import TypingsStatus from '../utils/typingsStatus';
|
||||
|
||||
import * as PConst from '../protocol.const';
|
||||
@@ -144,7 +144,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
||||
private readonly commandId: string;
|
||||
|
||||
constructor(
|
||||
private client: ITypescriptServiceClient,
|
||||
private client: ITypeScriptServiceClient,
|
||||
mode: string,
|
||||
private typingsStatus: TypingsStatus
|
||||
) {
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
import { TextDocument, Position, CancellationToken, Location } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
export default class TypeScriptDefinitionProviderBase {
|
||||
constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
protected async getSymbolLocations(
|
||||
definitionType: 'definition' | 'implementation' | 'typeDefinition',
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { Position, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, ProviderResult, Range } from 'vscode';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
@@ -36,7 +36,7 @@ const directives: Directive[] = [
|
||||
|
||||
export default class DirectiveCommentCompletionProvider implements CompletionItemProvider {
|
||||
constructor(
|
||||
private client: ITypescriptServiceClient,
|
||||
private client: ITypeScriptServiceClient,
|
||||
) { }
|
||||
|
||||
public provideCompletionItems(document: TextDocument, position: Position, _token: CancellationToken): ProviderResult<CompletionItem[]> {
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
import { DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
|
||||
export default class TypeScriptDocumentHighlightProvider implements DocumentHighlightProvider {
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public async provideDocumentHighlights(
|
||||
resource: TextDocument,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Lo
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import * as PConst from '../protocol.const';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange } from '../utils/convert';
|
||||
|
||||
const outlineTypeTable: { [kind: string]: SymbolKind } = Object.create(null);
|
||||
@@ -29,7 +29,7 @@ outlineTypeTable[PConst.Kind.localFunction] = SymbolKind.Function;
|
||||
|
||||
export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolProvider {
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public async provideDocumentSymbols(resource: TextDocument, token: CancellationToken): Promise<SymbolInformation[]> {
|
||||
const filepath = this.client.normalizePath(resource.uri);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { workspace as Workspace, FormattingOptions, TextDocument, CancellationToken, window, Disposable, workspace } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import * as languageIds from '../utils/languageModeIds';
|
||||
|
||||
namespace FormattingConfiguration {
|
||||
@@ -27,7 +27,7 @@ export default class FormattingConfigurationManager {
|
||||
private formatOptions: { [key: string]: Proto.FormatCodeSettings | undefined; } = Object.create(null);
|
||||
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient
|
||||
private client: ITypeScriptServiceClient
|
||||
) {
|
||||
this.onDidCloseTextDocumentSub = Workspace.onDidCloseTextDocument((textDocument) => {
|
||||
const key = textDocument.uri.toString();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration, Disposable, languages, workspace } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange } from '../utils/convert';
|
||||
import FormattingConfigurationManager from './formattingConfigurationManager';
|
||||
|
||||
@@ -14,7 +14,7 @@ export class TypeScriptFormattingProvider implements DocumentRangeFormattingEdit
|
||||
private enabled: boolean = true;
|
||||
|
||||
public constructor(
|
||||
private readonly client: ITypescriptServiceClient,
|
||||
private readonly client: ITypeScriptServiceClient,
|
||||
private readonly formattingOptionsManager: FormattingConfigurationManager
|
||||
) { }
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
import { HoverProvider, Hover, TextDocument, Position, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tagsMarkdownPreview } from './previewer';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
export default class TypeScriptHoverProvider implements HoverProvider {
|
||||
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public async provideHover(document: TextDocument, position: Position, token: CancellationToken): Promise<Hover | undefined> {
|
||||
const filepath = this.client.normalizePath(document.uri);
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as Proto from '../protocol';
|
||||
import * as PConst from '../protocol.const';
|
||||
|
||||
import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens } from './baseCodeLensProvider';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
@@ -16,7 +16,7 @@ const localize = nls.loadMessageBundle();
|
||||
|
||||
export default class TypeScriptImplementationsCodeLensProvider extends TypeScriptBaseCodeLensProvider {
|
||||
public constructor(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
private readonly language: string
|
||||
) {
|
||||
super(client);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { Position, Range, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, window, Uri, ProviderResult, TextEditor, SnippetString, workspace } from 'vscode';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { DocCommandTemplateResponse } from '../protocol';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
@@ -48,7 +48,7 @@ class JsDocCompletionItem extends CompletionItem {
|
||||
export class JsDocCompletionProvider implements CompletionItemProvider {
|
||||
|
||||
constructor(
|
||||
private client: ITypescriptServiceClient,
|
||||
private client: ITypeScriptServiceClient,
|
||||
) { }
|
||||
|
||||
public provideCompletionItems(
|
||||
@@ -81,7 +81,7 @@ export class TryCompleteJsDocCommand {
|
||||
static COMMAND_NAME = '_typeScript.tryCompleteJsDoc';
|
||||
|
||||
constructor(
|
||||
private lazyClient: () => ITypescriptServiceClient
|
||||
private lazyClient: () => ITypeScriptServiceClient
|
||||
) { }
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, workspace, WorkspaceEdit, window, QuickPickItem, Selection } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsRangeToTsFileRange, tsLocationToVsPosition } from '../utils/convert';
|
||||
import FormattingOptionsManager from './formattingConfigurationManager';
|
||||
|
||||
@@ -17,7 +17,7 @@ export default class TypeScriptRefactorProvider implements CodeActionProvider {
|
||||
private selectRefactorCommandId: string;
|
||||
|
||||
constructor(
|
||||
private readonly client: ITypescriptServiceClient,
|
||||
private readonly client: ITypeScriptServiceClient,
|
||||
private formattingOptionsManager: FormattingOptionsManager,
|
||||
mode: string
|
||||
) {
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
import { ReferenceProvider, Location, TextDocument, Position, CancellationToken } from 'vscode';
|
||||
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
export default class TypeScriptReferenceSupport implements ReferenceProvider {
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public provideReferences(document: TextDocument, position: Position, options: { includeDeclaration: boolean }, token: CancellationToken): Promise<Location[]> {
|
||||
const filepath = this.client.normalizePath(document.uri);
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as Proto from '../protocol';
|
||||
import * as PConst from '../protocol.const';
|
||||
|
||||
import { TypeScriptBaseCodeLensProvider, ReferencesCodeLens } from './baseCodeLensProvider';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
@@ -16,7 +16,7 @@ const localize = nls.loadMessageBundle();
|
||||
|
||||
export default class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvider {
|
||||
public constructor(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
private readonly language: string
|
||||
) {
|
||||
super(client);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
import { RenameProvider, WorkspaceEdit, TextDocument, Position, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange, vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
export default class TypeScriptRenameProvider implements RenameProvider {
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public async provideRenameEdits(
|
||||
document: TextDocument,
|
||||
|
||||
@@ -7,13 +7,13 @@ import { SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterIn
|
||||
|
||||
import * as Previewer from './previewer';
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { vsPositionToTsFileLocation } from '../utils/convert';
|
||||
|
||||
export default class TypeScriptSignatureHelpProvider implements SignatureHelpProvider {
|
||||
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient) { }
|
||||
private client: ITypeScriptServiceClient) { }
|
||||
|
||||
public provideSignatureHelp(document: TextDocument, position: Position, token: CancellationToken): Promise<SignatureHelp | undefined | null> {
|
||||
const filepath = this.client.normalizePath(document.uri);
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as path from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import TsConfigProvider, { TSConfig } from '../utils/tsconfigProvider';
|
||||
import { isImplicitProjectConfigFile } from '../utils/tsconfig';
|
||||
|
||||
@@ -42,7 +42,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClient: () => ITypescriptServiceClient
|
||||
private readonly lazyClient: () => ITypeScriptServiceClient
|
||||
) {
|
||||
this.tsconfigProvider = new TsConfigProvider();
|
||||
|
||||
@@ -228,7 +228,7 @@ export default class TypeScriptTaskProviderManager {
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
|
||||
constructor(
|
||||
private readonly lazyClient: () => ITypescriptServiceClient
|
||||
private readonly lazyClient: () => ITypeScriptServiceClient
|
||||
) {
|
||||
vscode.workspace.onDidChangeConfiguration(this.onConfigurationChanged, this, this.disposables);
|
||||
this.onConfigurationChanged();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { tsTextSpanToVsRange } from '../utils/convert';
|
||||
|
||||
function getSymbolKind(item: Proto.NavtoItem): SymbolKind {
|
||||
@@ -23,7 +23,7 @@ function getSymbolKind(item: Proto.NavtoItem): SymbolKind {
|
||||
|
||||
export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbolProvider {
|
||||
public constructor(
|
||||
private client: ITypescriptServiceClient,
|
||||
private client: ITypeScriptServiceClient,
|
||||
private modeId: string) { }
|
||||
|
||||
public async provideWorkspaceSymbols(search: string, token: CancellationToken): Promise<SymbolInformation[]> {
|
||||
|
||||
@@ -22,7 +22,7 @@ import * as Proto from './protocol';
|
||||
import * as PConst from './protocol.const';
|
||||
|
||||
import TypeScriptServiceClient from './typescriptServiceClient';
|
||||
import { ITypescriptServiceClientHost } from './typescriptService';
|
||||
import { ITypeScriptServiceClientHost } from './typescriptService';
|
||||
|
||||
import BufferSyncSupport from './features/bufferSyncSupport';
|
||||
import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider';
|
||||
@@ -432,7 +432,7 @@ const styleCheckDiagnostics = [
|
||||
7030 // not all code paths return a value
|
||||
];
|
||||
|
||||
class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
|
||||
class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost {
|
||||
private client: TypeScriptServiceClient;
|
||||
private languages: LanguageProvider[] = [];
|
||||
private languagePerId: Map<string, LanguageProvider>;
|
||||
|
||||
@@ -10,7 +10,7 @@ import API from './utils/api';
|
||||
import { TypeScriptServerPlugin } from './utils/plugins';
|
||||
import { TypeScriptServiceConfiguration } from './utils/configuration';
|
||||
|
||||
export interface ITypescriptServiceClientHost {
|
||||
export interface ITypeScriptServiceClientHost {
|
||||
syntaxDiagnosticsReceived(event: Proto.DiagnosticEvent): void;
|
||||
semanticDiagnosticsReceived(event: Proto.DiagnosticEvent): void;
|
||||
configFileDiagnosticsReceived(event: Proto.ConfigFileDiagnosticEvent): void;
|
||||
@@ -18,7 +18,7 @@ export interface ITypescriptServiceClientHost {
|
||||
}
|
||||
|
||||
|
||||
export interface ITypescriptServiceClient {
|
||||
export interface ITypeScriptServiceClient {
|
||||
normalizePath(resource: Uri): string | null;
|
||||
asUrl(filepath: string): Uri;
|
||||
getWorkspaceRootForResource(resource: Uri): string | undefined;
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Reader } from './utils/wireProtocol';
|
||||
|
||||
import { workspace, window, Uri, CancellationToken, Disposable, Memento, MessageItem, EventEmitter, Event, commands, env } from 'vscode';
|
||||
import * as Proto from './protocol';
|
||||
import { ITypescriptServiceClient, ITypescriptServiceClientHost } from './typescriptService';
|
||||
import { ITypeScriptServiceClient, ITypeScriptServiceClientHost } from './typescriptService';
|
||||
import { TypeScriptServerPlugin } from './utils/plugins';
|
||||
import Logger from './utils/logger';
|
||||
|
||||
@@ -116,7 +116,7 @@ class RequestQueue {
|
||||
}
|
||||
}
|
||||
|
||||
export default class TypeScriptServiceClient implements ITypescriptServiceClient {
|
||||
export default class TypeScriptServiceClient implements ITypeScriptServiceClient {
|
||||
private static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet';
|
||||
private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME}:`;
|
||||
|
||||
@@ -160,7 +160,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
|
||||
private readonly disposables: Disposable[] = [];
|
||||
|
||||
constructor(
|
||||
private readonly host: ITypescriptServiceClientHost,
|
||||
private readonly host: ITypeScriptServiceClientHost,
|
||||
private readonly workspaceState: Memento,
|
||||
private readonly versionStatus: VersionStatus,
|
||||
public readonly plugins: TypeScriptServerPlugin[]
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
import { WorkspaceEdit, workspace } from 'vscode';
|
||||
import * as Proto from '../protocol';
|
||||
import { tsTextSpanToVsRange } from './convert';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
|
||||
|
||||
export async function applyCodeAction(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
action: Proto.CodeAction,
|
||||
file: string
|
||||
): Promise<boolean> {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { loadMessageBundle } from 'vscode-nls';
|
||||
import { dirname } from 'path';
|
||||
import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './tsconfig';
|
||||
@@ -27,10 +27,10 @@ const fileLimit = 500;
|
||||
class ExcludeHintItem {
|
||||
public configFileName?: string;
|
||||
private _item: vscode.StatusBarItem;
|
||||
private _client: ITypescriptServiceClient;
|
||||
private _client: ITypeScriptServiceClient;
|
||||
private _currentHint: Hint;
|
||||
|
||||
constructor(client: ITypescriptServiceClient) {
|
||||
constructor(client: ITypeScriptServiceClient) {
|
||||
this._client = client;
|
||||
this._item = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE);
|
||||
this._item.command = 'js.projectStatus.command';
|
||||
@@ -62,7 +62,7 @@ class ExcludeHintItem {
|
||||
}
|
||||
}
|
||||
|
||||
function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITypescriptServiceClient, isOpen: (path: string) => Promise<boolean>, memento: vscode.Memento): vscode.Disposable[] {
|
||||
function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITypeScriptServiceClient, isOpen: (path: string) => Promise<boolean>, memento: vscode.Memento): vscode.Disposable[] {
|
||||
const toDispose: vscode.Disposable[] = [];
|
||||
const projectHinted: ProjectHintedMap = Object.create(null);
|
||||
|
||||
@@ -125,7 +125,7 @@ function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITyp
|
||||
return toDispose;
|
||||
}
|
||||
|
||||
function createLargeProjectMonitorFromTypeScript(item: ExcludeHintItem, client: ITypescriptServiceClient): vscode.Disposable {
|
||||
function createLargeProjectMonitorFromTypeScript(item: ExcludeHintItem, client: ITypeScriptServiceClient): vscode.Disposable {
|
||||
|
||||
interface LargeProjectMessageItem extends vscode.MessageItem {
|
||||
index: number;
|
||||
@@ -154,7 +154,7 @@ function createLargeProjectMonitorFromTypeScript(item: ExcludeHintItem, client:
|
||||
}
|
||||
|
||||
function onConfigureExcludesSelected(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
configFileName: string
|
||||
) {
|
||||
if (!isImplicitProjectConfigFile(configFileName)) {
|
||||
@@ -172,7 +172,7 @@ function onConfigureExcludesSelected(
|
||||
}
|
||||
|
||||
export function create(
|
||||
client: ITypescriptServiceClient,
|
||||
client: ITypeScriptServiceClient,
|
||||
isOpen: (path: string) => Promise<boolean>,
|
||||
memento: vscode.Memento
|
||||
) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { MessageItem, workspace, Disposable, ProgressLocation, window, commands, Uri } from 'vscode';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { loadMessageBundle } from 'vscode-nls';
|
||||
|
||||
const localize = loadMessageBundle();
|
||||
@@ -13,10 +13,10 @@ const typingsInstallTimeout = 30 * 1000;
|
||||
|
||||
export default class TypingsStatus extends Disposable {
|
||||
private _acquiringTypings: { [eventId: string]: NodeJS.Timer } = Object.create({});
|
||||
private _client: ITypescriptServiceClient;
|
||||
private _client: ITypeScriptServiceClient;
|
||||
private _subscriptions: Disposable[] = [];
|
||||
|
||||
constructor(client: ITypescriptServiceClient) {
|
||||
constructor(client: ITypeScriptServiceClient) {
|
||||
super(() => this.dispose());
|
||||
this._client = client;
|
||||
|
||||
@@ -62,7 +62,7 @@ export class AtaProgressReporter {
|
||||
private _promises = new Map<number, Function>();
|
||||
private _disposable: Disposable;
|
||||
|
||||
constructor(client: ITypescriptServiceClient) {
|
||||
constructor(client: ITypeScriptServiceClient) {
|
||||
this._disposable = Disposable.from(
|
||||
client.onDidBeginInstallTypings(e => this._onBegin(e.eventId)),
|
||||
client.onDidEndInstallTypings(e => this._onEndOrTimeout(e.eventId)),
|
||||
|
||||
Reference in New Issue
Block a user