some extension namespace doc.

This commit is contained in:
Johannes Rieken 2015-11-16 21:29:35 +01:00
parent 10ce73b0c9
commit debef0a8f3

27
src/vs/vscode.d.ts vendored
View file

@ -2638,10 +2638,22 @@ declare namespace vscode {
export function setLanguageConfiguration(language: string, configuration: LanguageConfiguration): Disposable; export function setLanguageConfiguration(language: string, configuration: LanguageConfiguration): Disposable;
} }
/**
* Namespace to retrieve installed extensions.
*/
export namespace extensions { export namespace extensions {
/**
* Get an extension by id.
*
* @param extensionId An extension identifier in the form of: `publisher.name`.
* @return An extension or `undefined`.
*/
export function getExtension(extensionId: string): Extension<any>; export function getExtension(extensionId: string): Extension<any>;
/**
* @see [[extensions.getExtension]]
*/
export function getExtension<T>(extensionId: string): Extension<T>; export function getExtension<T>(extensionId: string): Extension<T>;
/** /**
@ -2651,6 +2663,14 @@ declare namespace vscode {
} }
} }
// TS 1.6 & node_module
export = vscode;
// when used for JS*
// declare module 'vscode' {
// export = vscode;
// }
/** /**
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
* and others. This API makes no assumption about what promise libary is being used which * and others. This API makes no assumption about what promise libary is being used which
@ -2754,10 +2774,3 @@ interface PromiseConstructor {
} }
declare var Promise: PromiseConstructor; declare var Promise: PromiseConstructor;
// TS 1.6 & node_module
// export = vscode;
declare module 'vscode' {
export = vscode;
}