From c5f1369cbd7e6493ed8b7ec0c113e29b58ad31ff Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 26 Sep 2019 10:33:05 -0700 Subject: [PATCH] Silence upcoming error in TS 3.7 The error tries make sure you don't use a truthy check on a function instead of calling. But the code in the tests is in fact checking for the presence of the function. --- types/chrome-apps/test/index.ts | 6 +++--- .../csp-html-webpack-plugin-tests.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/chrome-apps/test/index.ts b/types/chrome-apps/test/index.ts index 6dbbabc263..c868772db1 100644 --- a/types/chrome-apps/test/index.ts +++ b/types/chrome-apps/test/index.ts @@ -813,9 +813,9 @@ chrome.enterprise.deviceAttributes.getDeviceAnnotatedLocation((loc) => loc.charA // ENTERPRISE - PLATFORM KEYS -if (chrome.enterprise.platformKeys.getTokens) { - if (chrome.enterprise.platformKeys.importCertificate) { - if (chrome.enterprise.platformKeys.removeCertificate) { +if (chrome.enterprise.platformKeys.getTokens as any) { + if (chrome.enterprise.platformKeys.importCertificate as any) { + if (chrome.enterprise.platformKeys.removeCertificate as any) { console.log('API Present'); } } diff --git a/types/csp-html-webpack-plugin/csp-html-webpack-plugin-tests.ts b/types/csp-html-webpack-plugin/csp-html-webpack-plugin-tests.ts index b58bf2f7ff..2dec8f583c 100755 --- a/types/csp-html-webpack-plugin/csp-html-webpack-plugin-tests.ts +++ b/types/csp-html-webpack-plugin/csp-html-webpack-plugin-tests.ts @@ -40,7 +40,7 @@ const optsWithEnableFunc: CspHtmlWebpackPlugin.AdditionalOptions = { // $ExpectType string htmlPluginData.html; - if (htmlPluginData.plugin.apply) { + if (htmlPluginData.plugin.apply as any) { } return true;