Update extensions for TS 2.7

Update src to build with TS 2.7

Explicitly assign this.message in the else body
This commit is contained in:
Matt Bierner
2018-02-07 12:51:49 -08:00
parent d2d18a47fd
commit 308c1887df
17 changed files with 64 additions and 69 deletions

View File

@@ -581,7 +581,7 @@ class SuggestAdapter {
}
// the default text edit range
const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) || new Range(pos, pos))
const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) as Range || new Range(pos, pos))
.with({ end: pos });
for (let i = 0; i < list.items.length; i++) {
@@ -618,7 +618,7 @@ class SuggestAdapter {
const doc = this._documents.getDocumentData(resource).document;
const pos = TypeConverters.toPosition(position);
const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) || new Range(pos, pos)).with({ end: pos });
const wordRangeBeforePos = (doc.getWordRangeAtPosition(pos) as Range || new Range(pos, pos) ).with({ end: pos });
const newSuggestion = this._convertCompletionItem(resolvedItem, pos, wordRangeBeforePos, _id, _parentId);
if (newSuggestion) {
mixin(suggestion, newSuggestion, true);

View File

@@ -192,7 +192,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
// Simulate the updateWorkspaceFolders method on our data to do more validation
const newWorkspaceFolders = currentWorkspaceFolders.slice(0);
newWorkspaceFolders.splice(index, deleteCount, ...validatedDistinctWorkspaceFoldersToAdd.map(f => ({ uri: f.uri, name: f.name || basenameOrAuthority(f.uri) })));
newWorkspaceFolders.splice(index, deleteCount, ...validatedDistinctWorkspaceFoldersToAdd.map(f => ({ uri: f.uri, name: f.name || basenameOrAuthority(f.uri), index: undefined })));
for (let i = 0; i < newWorkspaceFolders.length; i++) {
const folder = newWorkspaceFolders[i];