Fixes #11304: Update node.d.ts for extension to 4.x version to be in line with normal extension development

This commit is contained in:
Dirk Baeumer
2016-08-31 12:28:21 +02:00
parent e55a58c4fe
commit b7ab0e8c90
6 changed files with 4034 additions and 445 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The
let colorsDecorationType = window.createTextEditorDecorationType(decorationType);
disposables.push(colorsDecorationType);
let pendingUpdateRequests : { [key:string]:number; } = {};
let pendingUpdateRequests : { [key:string]: NodeJS.Timer; } = {};
// we care about all visible editors
window.visibleTextEditors.forEach(editor => {
+1 -1
View File
@@ -90,7 +90,7 @@ function updateConfiguration(settings: Settings) {
documents.all().forEach(triggerValidation);
}
let pendingValidationRequests : {[uri:string]:number} = {};
let pendingValidationRequests : { [uri:string]: NodeJS.Timer } = {};
const validationDelayMs = 200;
// The content of a text document has changed. This event is emitted
+10 -34
View File
@@ -4,40 +4,16 @@
*--------------------------------------------------------------------------------------------*/
/// <reference path="../src/vs/vscode.d.ts" />
/// <reference path="../src/typings/mocha.d.ts" />
/// <reference path="./node.d.ts" />
declare var define: {
(moduleName: string, dependencies: string[], callback: (...args: any[]) => any): any;
(moduleName: string, dependencies: string[], definition: any): any;
(moduleName: string, callback: (...args: any[]) => any): any;
(moduleName: string, definition: any): any;
(dependencies: string[], callback: (...args: any[]) => any): any;
(dependencies: string[], definition: any): any;
};
declare var require: {
toUrl(path: string): string;
(moduleName: string): any;
(dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
config(data: any): any;
onError: Function;
__$__nodeRequire<T>(moduleName: string): T;
};
// Declaring the following because the code gets compiled with es5, which lack definitions for console and timers.
declare var console: {
info(message?: any, ...optionalParams: any[]): void;
profile(reportName?: string): void;
assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
clear(): void;
dir(value?: any, ...optionalParams: any[]): void;
warn(message?: any, ...optionalParams: any[]): void;
error(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void;
profileEnd(): void;
};
declare function clearTimeout(handle: number): void;
declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
declare function clearInterval(handle: number): void;
declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
assert(value: any, message?: string, ...optionalParams: any[]): void;
dir(obj: any, options?: {showHidden?: boolean, depth?: number, colors?: boolean}): void;
error(message?: any, ...optionalParams: any[]): void;
info(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void;
time(label: string): void;
timeEnd(label: string): void;
trace(message?: any, ...optionalParams: any[]): void;
warn(message?: any, ...optionalParams: any[]): void;
};
+1 -1
View File
@@ -204,7 +204,7 @@ documents.onDidClose(event => {
connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
});
let pendingValidationRequests : {[uri:string]:number} = {};
let pendingValidationRequests : { [uri: string]: NodeJS.Timer; } = {};
const validationDelayMs = 200;
function cleanPendingValidation(textDocument: TextDocument): void {
+2767 -114
View File
File diff suppressed because it is too large Load Diff
+1254 -294
View File
File diff suppressed because it is too large Load Diff