Use @types/node in extensions (#19692)

Switches builtin extensions to use @types/node for node definitions. Fixes a few errors that show up as a result of updating to a more modern version of node.d.ts
This commit is contained in:
Matt Bierner
2017-02-01 15:20:17 -08:00
committed by GitHub
parent c4f02ee14a
commit cda3584a99
18 changed files with 95 additions and 2368 deletions

View File

@@ -15,7 +15,7 @@ suite('window namespace tests', () => {
teardown(cleanUp);
test('editor, active text editor', () => {
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => {
return window.showTextDocument(doc).then((editor) => {
const active = window.activeTextEditor;
assert.ok(active);
@@ -31,7 +31,7 @@ suite('window namespace tests', () => {
test('editor, assign and check view columns', () => {
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => {
let p1 = window.showTextDocument(doc, ViewColumn.One).then(editor => {
assert.equal(editor.viewColumn, ViewColumn.One);
});
@@ -52,7 +52,7 @@ suite('window namespace tests', () => {
eventCounter += 1;
});
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => {
return window.showTextDocument(doc, ViewColumn.One).then(editor => {
assert.equal(eventCounter, 1);
return doc;
@@ -111,8 +111,8 @@ suite('window namespace tests', () => {
});
test('issue #5362 - Incorrect TextEditor passed by onDidChangeTextEditorSelection', (done) => {
const file10Path = join(workspace.rootPath, './10linefile.ts');
const file30Path = join(workspace.rootPath, './30linefile.ts');
const file10Path = join(workspace.rootPath || '', './10linefile.ts');
const file30Path = join(workspace.rootPath || '', './30linefile.ts');
let finished = false;
let failOncePlease = (err: Error) => {
@@ -291,7 +291,7 @@ suite('window namespace tests', () => {
});
test('editor, selection change kind', () => {
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => window.showTextDocument(doc)).then(editor => {
return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => window.showTextDocument(doc)).then(editor => {
return new Promise((resolve, reject) => {