debt - remove duplicated types

This commit is contained in:
Johannes Rieken
2019-09-02 11:19:40 +02:00
parent 86dce614df
commit c842995673
3 changed files with 11 additions and 27 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vs/nls';
import * as vscode from 'vscode';
import { IDisposable } from 'vs/base/common/lifecycle';
import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/common/extensionDescriptionRegistry';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
@@ -11,28 +12,11 @@ import { ExtensionActivationError, MissingDependencyError } from 'vs/workbench/s
const NO_OP_VOID_PROMISE = Promise.resolve<void>(undefined);
export interface IExtensionMemento {
get<T>(key: string): T | undefined;
get<T>(key: string, defaultValue: T): T;
update(key: string, value: any): Promise<void>;
}
export interface IExtensionContext {
subscriptions: IDisposable[];
workspaceState: IExtensionMemento;
globalState: IExtensionMemento;
extensionPath: string;
storagePath: string;
globalStoragePath: string;
asAbsolutePath(relativePath: string): string;
readonly logPath: string;
}
/**
* Represents the source code (module) of an extension.
*/
export interface IExtensionModule {
activate?(ctx: IExtensionContext): Promise<IExtensionAPI>;
activate?(ctx: vscode.ExtensionContext): Promise<IExtensionAPI>;
deactivate?(): void;
}