From b2519ad3c9aae518dd25c8357c010b60120a8ad0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Dec 2016 13:54:25 -0800 Subject: [PATCH] Add a few casts to work around issues in ts 2.1.4 (#16861) --- .../server/src/jsoncontributions/projectJSONContribution.ts | 2 +- .../contrib/defineKeybinding/common/smartSnippetInserter.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts index c3b9141b4a0..1d4ee68c675 100644 --- a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts +++ b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts @@ -247,7 +247,7 @@ export class ProjectJSONContribution implements JSONWorkerContribution { } return this.getNugetService('SearchQueryService').then(service => { let queryUrl = service + '?q=' + encodeURIComponent(pack) + '&take=' + 10; - return this.makeJSONRequest(queryUrl).then(resultObj => { + return this.makeJSONRequest(queryUrl).then(resultObj => { let itemResolved = false; if (Array.isArray(resultObj.data)) { let results = resultObj.data; diff --git a/src/vs/editor/contrib/defineKeybinding/common/smartSnippetInserter.ts b/src/vs/editor/contrib/defineKeybinding/common/smartSnippetInserter.ts index 1cda89ca5d0..7c0228ca05e 100644 --- a/src/vs/editor/contrib/defineKeybinding/common/smartSnippetInserter.ts +++ b/src/vs/editor/contrib/defineKeybinding/common/smartSnippetInserter.ts @@ -131,7 +131,7 @@ export class SmartSnippetInserter { acceptState = lastValidState; } - if (acceptState === State.AFTER_OBJECT) { + if (acceptState as State === State.AFTER_OBJECT) { return { position: this.offsetToPosition(model, acceptPosition), prepend: ',',