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.
This commit is contained in:
Nathan Shively-Sanders
2019-09-26 10:33:05 -07:00
parent 792b469dea
commit c5f1369cbd
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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');
}
}
@@ -40,7 +40,7 @@ const optsWithEnableFunc: CspHtmlWebpackPlugin.AdditionalOptions = {
// $ExpectType string
htmlPluginData.html;
if (htmlPluginData.plugin.apply) {
if (htmlPluginData.plugin.apply as any) {
}
return true;